Files
iron-arc/docs/monetization.md
T
SoftwareApp a26e0b93b5 m7c: Play Billing and a complete deletion path
- billing module with a testable seam: models (product ids, purchase events),
  StoreClient + PlayStoreClient over in_app_purchase, Entitlements persisted in
  SharedPreferences, BillingService orchestrating query/buy/restore/grant.
- rules encoded: grant before completePurchase (Play refunds unacknowledged
  purchases after three days), pending purchases are shown but never granted,
  restorePurchases on start so a reinstall keeps the purchase, and Remove Ads
  only hides interstitials - rewarded video stays available.
- ads gate: AdsService.adsRemoved stops both the counter and the preload, so an
  owner never requests an interstitial.
- settings sheet: shop section (price from the store, never hardcoded),
  "restore purchases", and "delete local data" with confirmation; the existing
  mail-based deletion request stays the account-deletion path since the app has
  no accounts.
- 9 new tests with a fake store cover purchase, restore, pending, cancel,
  error, restart persistence, missing store and a store that throws. 17 total.
- verified on device: the app talks to the real Play Billing service
  (IInAppBillingService in logcat) and degrades to "no products created"
  without a crash; com.android.vending.BILLING is in the merged manifest.
- docs: monetization 7c (rules + verification), decision D6 (local entitlement
  until purchases affect the server), compliance rows for billing/restore/
  deletion, blocked.md 3c (create remove_ads in the Console).
- release 0.9.0 (13).
2026-10-25 04:06:44 +01:00

191 lines
9.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Monetarisierung — Freemium + Werbung (fair)
| Feld | Wert |
|---|---|
| Version | 0.1 (Pre-M0) |
| Gültig ab | M7 (nach MVP-3) — hier nur als Vertrag festgehalten |
| Bezug | [GDD](GDD.md) · [compliance-play-store.md](compliance-play-store.md) |
---
## 1. Grundsätze
1. **Kein Pay-to-Win.** Alles Spielrelevante ist erfarmbar; Käufe = Kosmetik, Zeit, Komfort, Stil.
2. **Werbung unterbricht kein Gameplay.** Keine Ads in der Aim-Phase, keine Interstitials in Leveln.
3. **Keine Lootboxen mit Zufall und Gameplay-Power** (vermeidet Odds-Disclosure-Pflichten und Jugendschutzrisiken).
4. **Consent vor Personalisierung** (UMP/TCF v2.2, EEA/UK/CH); „Datenschutz-Optionen" in den Settings.
5. **Klare Preise** inkl. MwSt., regionale Preisstaffelung, „Käufe wiederherstellen".
## 2. Werbung
| Platzierung | Format | Cap | Belohnung / Regel |
|---|---|---|---|
| Sieger-Screen | Interstitial | 1 pro 2 Matches | nie in den ersten 3 Matches, nie bei `mode=ranked` unter 13 J. |
| „Belohnungen ×2" | Rewarded | 5/Tag | doppelte Scrap/Pass-XP |
| „Zweite Chance" (nach Niederlage) | Rewarded | 1/Match | nur Kampagne/Training, **nicht Ranked** |
| Shop-Tab „Gratis-Scrap" | Rewarded | 3/Tag | 50 Scrap |
| Garage / Kampagnen-Karte | Banner (adaptive) | dauerhaft | nie im Gameplay |
**Technik:** AdMob + AdMob-Mediation (Bidding), `google_mobile_ads`, UMP-SDK für Consent.
Frequenz-Caps und Schalter kommen aus **Remote Config** (LiveOps, kein App-Update nötig).
Test-IDs sind in Debug-Builds Pflicht; Release erst nach `Remove Ads`-Logik und Consent-Gate.
## 3. IAP-Katalog (Google Play Billing)
| Produkt | Typ | Preis (DE, inkl. MwSt.) | Inhalt |
|---|---|---|---|
| **Remove Ads** | Non-Consumable | 4,99 € | entfernt Interstitial + Banner (Rewarded bleibt freiwillig) |
| **Season Pass** | Non-Consumable (saisonal) | 6,99 € | 50 Stufen, Kosmetik, 1 Panzer-Skin, +1 Waffen-Slot |
| **Season Pass Premium+** | Non-Consumable | 12,99 € | Pass + 10 Stufen-Skip + exklusiver Skin |
| **Starter Pack** | Consumable (1×/Account) | 2,99 € | Panzer + Skin + 500 Cores |
| **Cores klein/mittel/groß** | Consumable | 1,99 / 4,99 / 9,99 € | Hard Currency |
| **Cosmetic Bundle** | Non-Consumable | 2,99–7,99 € | Themes, Krater-Effekte, Emotes |
| **Loadout-Slot** | Non-Consumable | 1,99 € | +1 Deck-Slot (max. 2 kaufbar) |
Regeln: kein Abo in MVP-3 · Preise über Play Console gepflegt (nicht hartkodiert) ·
`queryPurchases` beim Start + „Restore"-Button · Pending Transactions korrekt behandeln.
## 4. Economy
| Quelle | Scrap | Cores |
|---|---|---|
| Match-Sieg | 120 | – |
| Match-Niederlage | 60 | – |
| Daily Seed (erste Runde) | 300 | – |
| Season-Pass (Free-Track) | 1.200 gesamt | 60 gesamt |
| Kampagne (pro Kapitel) | 250 | 10 |
| Wochenturnier (Top 100) | 500–2.000 | 25–100 |
| Senke | Scrap | Cores |
|---|---|---|
| Waffe craften | 300–900 | – |
| Panzer freischalten | 2.500–6.000 | – |
| Skin | – | 250–800 |
| Crafting-Zeit überspringen | – | 20–60 |
**Kein Energy-System.** Anti-Bot: ab dem 15. Match/Tag −50 % Belohnungen, ab dem 25. keine.
Crafting-Zeiten max. 4 h (mild), kein „Pay-to-Skip"-Druck in den ersten 7 Tagen.
## 5. Umsatzmodell (Sanity-Check, keine Prognose)
Annahmen: 10.000 DAU, Tier-1-Mix, konservative eCPM.
| Quelle | Menge/Tag | eCPM | Umsatz/Tag |
|---|---|---|---|
| Rewarded | 25.000 Impressions | 10 € | 250 € |
| Interstitial | 7.500 Impressions | 5 € | 37 € |
| Banner | 30.000 Impressions | 0,35 € | 10 € |
| IAP (2 % Konversion, 3,50 € ARPPU) | – | – | ~230 € |
⇒ **ARPDAU ≈ 0,05 €**. Bei 1.000 DAU entsprechend ~50 €/Tag. Break-even hängt an UA-Kosten,
nicht an der Technik.
## 6. KPI-Ziele & Kill-Kriterien (Soft Launch)
| KPI | Ziel | Kill |
|---|---|---|
| D1 / D7 / D30 | 42 % / 15 % / 6 % | D1 < 30 % |
| Session-Länge / Sessions pro Tag | 8 Min. / 3,5 | – |
| ARPDAU (Ads + IAP) | ≥ 0,05 € | < 0,025 € |
| Crash-free Users | ≥ 99,5 % | < 99,0 % |
| Match-Abbruchrate | < 8 % | > 15 % |
| Ads-/IAP-Split | 60/40 | – |
## 7. Testplan (A/B über Remote Config)
1. Interstitial-Cap 1:2 vs. 1:3 (Retention vs. ARPDAU).
2. Rewarded-Platzierung „×2" vs. „+50 % sofort".
3. Starter-Pack-Preis 2,99 € vs. 3,99 € (Conversion vs. ARPPU).
4. Pass-Preis 6,99 € vs. 5,99 € (nur eine Kohorte pro Region).
Jeder Test: mind. 7 Tage, eine Variable, Entscheidung nach ARPDAU **und** D7 (nie nur Umsatz).
## 7a. Umsetzungsstand (M7a, 2026-10-24)
| Punkt | Wert |
|---|---|
| AdMob **App ID** | `ca-app-pub-3909261635234286~8769927442` (in `AndroidManifest.xml`, im Release-APK verifiziert) |
| Ad-Unit-IDs | Googles **Test-Units** (Rewarded `…/5224354917`, Interstitial `…/1033173712`) |
| SDK | `google_mobile_ads`, initialisiert beim App-Start |
| Frequenz-Caps | Interstitial erst ab Match 4, dann jeder 2. Match (`AdsService`) |
| Rewarded | Test-Button im UI, Belohnung wird quittiert |
| **Offen** | echte Ad-Unit-IDs, **UMP-Consent (Pflicht vor Live-Ads in der EU)**, „Remove Ads"-IAP |
## 7b. UMP-Consent (M7b, umgesetzt)
| Punkt | Umsetzung |
|---|---|
| Ablauf | `requestConsentInfoUpdate` → `loadAndShowConsentFormIfRequired` → **erst danach** `MobileAds.initialize()` |
| Gate | Ohne `canRequestAds() == true` werden **keine** Ads geladen (fail-safe) |
| Einstiegspunkt | Zahnrad in der Statusleiste → „Datenschutz-Optionen“ (`showPrivacyOptionsForm`) |
| Debug | `ConsentDebugSettings` mit EEA-Geografie + Testgerät `8FE2A5A74DC63E67AB86EE55E600589C` |
| Statusanzeige | „Consent: … · Ads: aktiv/inaktiv · Rewarded: geladen“ |
### Ergebnis der Gerätetests
**Vor der AdMob-Konfiguration** (2026-10-24):
```
ads: consent update failed (3) Publisher misconfiguration: no form(s) configured
ads: consent=ConsentStatus.unknown → canRequestAds() lieferte true
```
Das war der Release-Blocker: ohne Nachricht hätte die App in der EU ohne Einwilligung geworben.
**Nach dem Veröffentlichen der Consent-Nachricht** (2026-10-25, Redmi Note 10):
| Schritt | Nachweis |
|---|---|
| Formular erscheint beim Start | UI-Dump: „Iron Arc benötigt Ihre Einwilligung … 210 Partner …“, Buttons „Einwilligen“ / „Optionen verwalten“ |
| Zustimmung wirkt | `ads: consent form handled`, `ads: consent=ConsentStatus.obtained privacyOptionsRequired=true` |
| **Ads erst danach** | `ads: SDK initialised` → `ads: interstitial ready` → `ads: rewarded ready` (jeweils nach dem Consent-Callback) |
| Einstiegspunkt funktioniert | Zahnrad → „Datenschutz-Optionen“ öffnet das Formular erneut; nach Bestätigung `ads: privacy options closed, consent=ConsentStatus.obtained` |
| Statusanzeige | „Werbe-Status: Consent: Zustimmung erteilt · Ads: aktiv · Rewarded: geladen“ |
Damit sind die drei Play-Anforderungen erfüllt: Einwilligung **vor** der ersten Ad-Anfrage,
keine Ads ohne Zustimmung, und ein **dauerhafter** Weg, die Einwilligung zu ändern.
## 7c. Play Billing (M7c, umgesetzt 2026-10-25)
**Katalog** aus §3, aber bewusst klein gestartet: nur **Remove Ads** (`remove_ads`,
Non-Consumable) ist im UI. Season Pass, Starter Pack und Cores brauchen eine Ökonomie,
die es noch nicht gibt – die IDs stehen bereits in `ProductIds`, damit die Erweiterung
eine Datenzeile ist und kein Umbau.
| Baustein | Datei |
|---|---|
| Katalog + Ereignismodelle | `lib/src/billing/models.dart` |
| Store-Schnittstelle + Play-Implementierung | `lib/src/billing/store_client.dart` |
| Besitzstand (persistiert) | `lib/src/billing/entitlements.dart` |
| Ablaufsteuerung | `lib/src/billing/billing_service.dart` |
| UI | Einstellungen-Sheet: „Werbung entfernen“, „Käufe wiederherstellen“ |
**Regeln, die eingehalten werden**
1. Preise kommen ausschließlich aus dem Store (`queryProductDetails`), nichts ist hartkodiert.
2. `restorePurchases` läuft **beim Start** – Neuinstallation stellt den Besitz wieder her.
3. `purchased`/`restored` → erst Entitlement schreiben, dann `completePurchase`
(Play erstattet nach 3 Tagen nicht bestätigte Käufe automatisch).
4. `pending` wird gemeldet, aber **nie** freigeschaltet (z. B. Barzahlung im Laden).
5. Besitz wird sofort persistiert (`iron_arc.entitlements`), damit ein Absturz zwischen
Store-Ereignis und Bestätigung nichts verliert.
6. Remove Ads schaltet nur **Interstitials** ab (`AdsService.adsRemoved`); Rewarded bleibt
freiwillig – sonst wäre die Belohnung für Käufer weg.
7. Ohne Play-Dienst (Seitelladen, kein Konto) gibt es keinen Crash, sondern einen klaren
Zustand: „Play Store nicht erreichbar“ bzw. „Keine Produkte im Play Store angelegt“.
**Verifikation:** 9 Unit-Tests mit einem Fake-Store (`app/test/billing_test.dart`) decken
Kauf, Restore, Pending, Abbruch, Fehler, Neustart-Persistenz und den Fall „kein Store“ ab.
Auf dem Gerät wurde zusätzlich geprüft, dass die App den echten Billing-Dienst anspricht
(`IInAppBillingService` im Logcat) und ohne angelegte Produkte sauber degradiert.
**Noch offen:** serverseitige Belegprüfung (siehe [D6](decisions.md)) und die Produkte
im Play Console (siehe [status/blocked.md](status/blocked.md)).
## 8. Offene Punkte
1. Ads schon in MVP-1 (Test-IDs) oder erst M7? (siehe README, offene Entscheidungen)
2. Rewarded „zweite Chance" in Ranked endgültig ausschließen? (GDD-Frage 2)
3. Abo-Modell (monatlich, werbefrei + Cores) ab Season 2?
4. Regionale Preisstrategie für Indien/Brasilien/Indonesien (PPP-Preise).