RevenueCat payments are available for Pro and Max Swift projects with a managed backend. The Payments tab appears after you ask the agent to add in-app purchases.
Before you start
You will need a RevenueCat account and a RevenueCat project. You do not need an App Store Connect app to test purchases in the simulator. Ask the Botflow agent to open setup:Connect RevenueCat to Botflow
1
Create or open a RevenueCat project
In the RevenueCat dashboard, create a project or open the project you want this app to use. Every new project includes a Test Store for development purchases.
2
Copy the API v2 Project ID
Open Project settings → General and copy the Project ID. It begins with
proj (for example, proj1a2b3c4d).3
Create a V2 secret API key
Open Project settings → API keys, click New secret API key, and choose V2 for API version. Give it a descriptive label such as
Botflow and generate the key.Copy the sk_… value immediately and keep it private. RevenueCat V1 secret keys cannot access the API v2 endpoints Botflow uses.4
Copy the Test Store SDK key
On the same API keys page, find Test Store under SDK API keys. Reveal and copy the public key beginning with
test_.5
Paste the three values into Botflow
Return to Payments in Botflow and paste:
- the V2 secret key (
sk_…) - the Test Store SDK key (
test_…) - the API v2 Project ID (
proj…)
RevenueCat API v2 key guide
RevenueCat’s guide to creating V2 secret keys and choosing permissions.
RevenueCat Test Store guide
RevenueCat’s current Test Store and SDK configuration reference.
Configure a test subscription
Connecting the account enables Botflow to wire the SDK into your Swift app. RevenueCat still needs something to sell. In RevenueCat, configure these three pieces:- In Product catalog, choose New product and select Test Store. Create a monthly product, for example
premium_monthly. - In Entitlements, create an entitlement such as
premiumand attach the product to it. - In Offerings, create or edit the Default offering and add the product as its monthly package.
Test in the simulator
Build and run the Swift app from Botflow’s simulator preview. The Test Store purchase dialog is simulated: no Apple sandbox account and no real payment method are required. After a successful test purchase, verify all three outcomes:- The app unlocks the feature protected by your
premiumentitlement. - Restore Purchases restores the entitlement after restarting or signing in again.
- The Payments tab records the test event and shows that it reached the backend receiver.
Set the webhook
Once the connection is verified, Botflow displays a webhook URL and authorization value in the Payments tab. In RevenueCat, open Integrations → Webhooks, add a webhook, and paste both values. This lets Botflow deliver entitlement changes to your app’s managed backend. Keep the authorization value private.Go live on the App Store
Test Store keys are for development only. Before shipping:- Add your App Store app in RevenueCat and configure its App Store Connect credentials.
- Create the production products in App Store Connect and import or attach them in RevenueCat.
- Copy the app-specific SDK key beginning with
appl_into Botflow’s Payments tab. - Validate a purchase with Apple’s sandbox before submitting the app for review.
test_ keys out of release builds. A release build needs an appl_ key, so a Test Store key cannot accidentally reach the App Store.