Polar.sh (Payments)
Setup & Products
Configure Polar.sh to monetize your React Native app.
Launch-Native uses Polar.sh to handle payments, subscriptions, and checkout links. It is incredibly developer-friendly and handles global taxes automatically.
1. Get your Access Token
To communicate with the Polar API, you need an Access Token.
- Create an account on Polar.sh and set up your organization.
- Go to Settings > Developer > Personal Access Tokens.
- Click on New Token, give it a name (e.g.,
Launch-Native Dev), and create it. - Copy the token and paste it into your mobile app's
.envfile:
EXPO_PUBLIC_POLAR_ACCESS_TOKEN=polar_pat_your_token_here
EXPO_PUBLIC_POLAR_ORGANIZATION_ID=your_organization_id_here2. Create your Products
Before testing payments, you need to create what your users will buy.
- In the Polar dashboard, go to Products.
- Click New Product.
- Choose the type of product:
- Subscription: For monthly or yearly recurring revenue (SaaS).
- One-time purchase: For lifetime deals or consumable credits.
- Set your pricing and upload a nice thumbnail.
- Once created, copy the Product ID from the URL or the product details. You will need this ID in your frontend code to trigger the checkout process.
