Setting Up Payments
Add subscription-based monetization to your a0 app with our integrated payment system.a0 payments currently support:
- Web: Stripe (test and production)
- iOS: Apple App Store (TestFlight / App Store)
- Android: not supported yet
You can manage plans in two ways:
If you’re using the a0 coding agent, it can edit
- Use the dashboard UI, or
- Edit the canonical config file:
.a0/monetization.yaml(this is what the Monetization tab edits).
If you’re using the a0 coding agent, it can edit
.a0/monetization.yaml and trigger provider sync. It should not ask you to do the setup manually.Overview
The payment system consists of three main components:- Features - Entitlements users get (e.g., PRO, AD_FREE, UNLIMITED_STORAGE)
- Subscription Plans - Pricing tiers that include one or more features
- Offerings - Bundles of plans presented to users (REQUIRED for paywalls)
Step-by-Step Setup
1. Navigate to Payments
Open Project Settings
In your a0 dashboard, go to your project and click on your App Name to access the settings.
2. Create Features
Features represent the entitlements or capabilities users get when they subscribe.Add Your First Feature
Click Add Feature and create features like:
PRO- Access to premium contentAD_FREE- Remove all advertisementsUNLIMITED_STORAGE- No storage limitsPRIORITY_SUPPORT- 24/7 support access
3. Create Subscription Plans
Configure Plan Details
Each plan requires:
- Plan Name: e.g., “Pro Plan”, “Premium Subscription”
- At least 1 Feature: Select from your created features
- At least 1 Pricing Tier: Choose from weekly, monthly, or annual
4. Sync to Payment Providers
Configure Sync Settings
For Stripe:
- Toggle “Use Stripe sandbox environment” for testing
- Must link your Stripe account first
- Sync to sandbox for testing, production for live apps (both are supported on web)
- Ensure your app is linked with valid Team ID
- Sync creates products in App Store Connect (production). You test purchases via TestFlight using sandbox tester accounts.
- Invalid Team ID will cause sync to fail
5. Create Offerings
Configure Offering
- Name: e.g., “Standard”, “Launch Special”, “Black Friday”
- Description: Explain what’s included
- Select Plans: Choose which subscription plans to include
Testing Your Setup
Stripe Test Cards:- Success:
4242 4242 4242 4242 - Decline:
4000 0000 0000 0002
- Sync products to App Store Connect (production), then test purchases via TestFlight using sandbox tester accounts
- Subscriptions auto-renew rapidly for testing
- Payments will not work in the a0 app or Expo Go (use TestFlight / native builds)
Implementation
Ready to integrate payments into your app? See the Payment Implementation guide for code examples and best practices.Troubleshooting
Paywall shows no products
Paywall shows no products
Most common issue: No offerings created or no current offering setSolution:
- Create at least one offering
- Include your subscription plans in the offering
- Set one offering as “current”
- Ensure plans are synced to payment providers
Payments not working in testing
Payments not working in testing
Most common issue: Forgot to sync or synced to wrong environmentSolution:
- For Stripe testing: Ensure “Use Stripe sandbox environment” is checked
- For iOS testing: Ensure you’re testing via TestFlight or a native iOS build (not the a0 app / Expo Go)
- Always sync after making changes to plans
- Missing subscription metadata in App Store Connect
Stripe sync failing
Stripe sync failing
Common causes:
- Stripe is not connected to your a0 account
- Using production keys in sandbox mode
- Invalid API keys
Apple sync failing
Apple sync failing
Common causes:
- Invalid Team ID in project settings
- App not properly configured in App Store Connect
- Missing agreements in App Store Connect
- Verify Team ID and ensure app is set up in App Store Connect
- Go to App Store Connect → Your App → Subscriptions
- Fill out all required metadata fields (description, screenshots, etc.)
Plan changes not reflecting
Plan changes not reflecting
Remember: You must sync every time you:
- Change pricing
- Add/remove features
- Modify plan details