Monetization app + RevenueCat webhooks (store IAP ledger) #69

Merged
westfarn merged 1 commits from feature/monetization-revenuecat-100 into master 2026-08-04 03:40:15 -07:00
Owner

Summary

  • Rename financemonetization Django app (keep finance_* tables via label = "finance")
  • Add services/stripe.py + services/revenuecat.py; RevenueCat webhook upserts subscription + Invoice/Payment (billing history parity with Stripe)
  • Mount /api/monetization/ + keep /api/finance/ alias
  • Extend Source/Provider with revenuecat; product→plan mapping via revenuecat_product_id / REVENUECAT_PRODUCT_PLAN_MAP

Closes #68. Companion to chat_web_app#100.

Test plan

  • manage.py test monetization.tests (54 OK)
  • Smoke chat_backend.tests.test_views_documents + test_oauth
  • Deploy: set REVENUECAT_WEBHOOK_SECRET; point RC webhook at /api/finance/webhooks/revenuecat/
  • Map store product IDs on SubscriptionPlan.revenuecat_product_id (or env JSON map)
  • Sandbox INITIAL_PURCHASE → subscription source=revenuecat + invoice in /finance/invoices/
## Summary - Rename `finance` → **`monetization`** Django app (keep `finance_*` tables via `label = "finance"`) - Add `services/stripe.py` + `services/revenuecat.py`; RevenueCat webhook upserts **subscription + Invoice/Payment** (billing history parity with Stripe) - Mount `/api/monetization/` + keep `/api/finance/` alias - Extend `Source`/`Provider` with `revenuecat`; product→plan mapping via `revenuecat_product_id` / `REVENUECAT_PRODUCT_PLAN_MAP` Closes #68. Companion to [chat_web_app#100](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/100). ## Test plan - [x] `manage.py test monetization.tests` (54 OK) - [x] Smoke `chat_backend.tests.test_views_documents` + `test_oauth` - [ ] Deploy: set `REVENUECAT_WEBHOOK_SECRET`; point RC webhook at `/api/finance/webhooks/revenuecat/` - [ ] Map store product IDs on `SubscriptionPlan.revenuecat_product_id` (or env JSON map) - [ ] Sandbox INITIAL_PURCHASE → subscription `source=revenuecat` + invoice in `/finance/invoices/`
westfarn added 1 commit 2026-08-04 03:32:53 -07:00
Add monetization app with RevenueCat webhooks alongside Stripe.
CI / test (pull_request) Successful in 10s
Unit Tests / test (pull_request) Successful in 10s
29c69b91f7
Rename finance → monetization (keep finance_* tables via app label), add
RevenueCat webhook + ledger upserts so store IAP syncs subscriptions and
billing history like Stripe. Companion to chat_web_app#100 / #68.
westfarn force-pushed feature/monetization-revenuecat-100 from 07c03ce65d to 29c69b91f7 2026-08-04 03:32:53 -07:00 Compare
westfarn merged commit e1e086a474 into master 2026-08-04 03:40:15 -07:00
westfarn deleted branch feature/monetization-revenuecat-100 2026-08-04 03:40:15 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_backend#69