Subscription tiers, discount codes, referral rewards, share-to-friends, and purchase validation
Last updated: March 2026
| Product | Type | Price | Details |
|---|---|---|---|
| Premium Subscription | Recurring | $4.95/month | 2 course slots, 10,000 weekly AI credits, cancel anytime |
| Custom Audio | One-time | $8.95 | AI-generated personalized hypnotherapy session |
| AI Credits (4,000) | One-time | $2.95 | Bank credits, never expire |
| AI Credits (10,000) | One-time | $5.95 | Bank credits, best value |
Discounts are cohort-based and assigned per-user during the server handshake. Each discount has a 7-day lifespan once assigned. The app checks codes are not expired and not already used before presenting them.
| Code | Product Type | Cohort | Lifespan |
|---|---|---|---|
| SBF02 | Subscription | IABCDEF | 7 days |
| SBF03 | Subscription | IP3WWYK | 7 days |
| AID50, AID60 | AI Credits | IABCDEF | 7 days |
| CCF02 – CCF08 | Custom Audio | Universal | 7 days |
Codes map to platform-specific discounted product IDs. Android uses Google Play Offers (e.g., offer ID "a-1" from code "SBF02"). iOS uses App Store Promotional Offers. AI credits and custom audio use separate product IDs with suffixes (e.g., ai_credits_4000_x2, x99enb_c1).
Referral code validation: validate_referral_code edge function (no auth required) checks discount_codes table, then user_profile.referral_code. After signup, referral-code-user-signup attaches the code.
Users can invite friends via the share dialog. Email invitations sent server-side through Resend API (max 10 per request). Share message includes referral code and app store links.
All purchases validated server-side via validate_purchase edge function. Receipts verified with respective app store before granting access.
| Stage | Action | Endpoint |
|---|---|---|
| Signup | Validate referral code | actions → validate_referral_code |
| Subscribe | IAP via Google Play / App Store | Store native |
| Validate | Verify receipt | validate_purchase |
| Sync | Get discounts & manifest | handshake |
| Download | Download course (uses slot) | validate_purchase |
| Switch | Swap course in slot | actions → switch_course |
| Share | Invite friends | actions → share_to_friends |
| Referral | Credit when friend subscribes | DB trigger |