Buy on StoreKit and Play Billing, then confirm with the backend (#78).
Unit Tests / test (pull_request) Successful in 13s

Native purchases replace RevenueCat. The app sends the signed transaction or Play token to /monetization/store/confirm/ so access is granted only after the store check.
This commit is contained in:
westfarn committed 2026-10-19 06:14:29 -05:00
1 parent 4a5b05f421
commit c938995380
25 files changed
+702 -226

No files matched your search

+4 -10
View File
@@ -40,19 +40,13 @@ npm run android:sync
Default `.env.mobile` matches production (`chatbackend.aimloperations.com`). Point it at beta to flip the shell without touching web deploys. Optional gitignored override: `.env.mobile.local`.
### RevenueCat IAP (#100)
### Play Billing (#78)
Native billing uses `@revenuecat/purchases-capacitor` (Capacitor 7 → package **11.x**). Web keeps Stripe Checkout / Customer Portal.
Native billing uses the local Capacitor plugin `native-store-billing` (Play Billing on Android, StoreKit on iOS). Web keeps Stripe Checkout / Customer Portal.
Set public SDK keys in `.env.mobile` (empty placeholders OK until store apps ship):
The Play product id is the plan's `store_product_id`. The backend verifies the purchase token with the Play Developer API (`GOOGLE_PLAY_SERVICE_ACCOUNT_JSON`). More detail: [`MONETIZATION.md`](MONETIZATION.md).
| Variable | Purpose |
|----------|---------|
| `REACT_APP_REVENUECAT_APPLE_API_KEY` | iOS public SDK key |
| `REACT_APP_REVENUECAT_GOOGLE_API_KEY` | Android public SDK key |
| `REACT_APP_REVENUECAT_OFFERING_ID` | Optional offering pin (else current) |
After install / key changes: `npm run build:mobile` (runs `cap sync`). More detail: [`MONETIZATION.md`](MONETIZATION.md).
After plugin changes: `npm run build:mobile` (runs `cap sync`).
## Versioning