Skip to main content
Shipnative uses RevenueCat for subscriptions on iOS, Android, and Web. The payment UI and subscription store are pre-built.

Setup

The wizard prompts for your RevenueCat API keys (iOS, Android, Web). Or manually add to apps/app/.env:
Without keys: Mock mode simulates purchases. Connect real RevenueCat before production to test sandbox purchases.

RevenueCat Configuration

  1. Create a project at app.revenuecat.com
  2. Link your App Store Connect and Google Play Console apps
  3. Get API keys from Project SettingsAPI Keys
  4. Create products in App Store Connect / Google Play Console
  5. Add products to an Offering (typically “default”) in RevenueCat
  6. Create an Entitlement (e.g., “pro”) and link your products to it
For detailed setup, see RevenueCat Getting Started.

Usage

The app auto-detects the platform and uses the appropriate RevenueCat SDK.

Subscription Store

Gating Features

Custom Purchase UI

Subscription Lifecycle Events

Track subscription events like trial starts, renewals, and cancellations:
Available events:
  • trial_started - Free trial started
  • trial_converted - Trial converted to paid
  • trial_cancelled - Trial cancelled
  • subscription_started - New subscription
  • subscription_renewed - Auto-renewed
  • subscription_cancelled - Cancelled (still active until expiry)
  • subscription_expired - Access ended
  • subscription_restored - Restored from previous purchase
  • billing_issue - Payment problem detected

Price Localization

Helper functions for proper price formatting:

Advanced Features

Promotional Offers & Intro Pricing

RevenueCat automatically detects and displays promotional offers configured in App Store Connect or Google Play Console:

Lifecycle Event Details

The addCustomerInfoUpdateListener provides detailed event tracking:

Price Localization Helpers

Format prices correctly for international users:

Customer Info Storage

Store subscription details for offline access:
For more advanced patterns including paywalls, A/B testing, and analytics integration, see boilerplate/vibe/SUBSCRIPTION_ADVANCED.md.

Testing

Mock mode: Without API keys, purchases simulate success. Includes realistic promotional offers (7-day trial for monthly, 14-day trial + intro pricing for annual). Dev menu includes a Free/Pro toggle. Sandbox testing:
  • iOS: Configure a sandbox tester in App Store Connect
  • Android: Configure a test account in Google Play Console
  • Web: Use Stripe test mode with RevenueCat Web Billing

Webhooks

For real-time subscription status updates, configure webhooks in RevenueCatProject SettingsIntegrationsWebhooks. See RevenueCat Webhooks for setup.

Troubleshooting

“No products registered” errors?
  • Expected when API keys are set but products aren’t configured in RevenueCat
  • Create products and add them to an Offering, then restart the app
Packages not loading?
  • Verify API keys are correct
  • Check that products are linked to an Offering in RevenueCat
  • Call restorePurchases() if user has an active subscription
Still in mock mode?
  • Verify apps/app/.env has the correct keys
  • Restart Metro: yarn start --clear
For more help, see RevenueCat Troubleshooting.