Adapty and RevenueCat
You will make a web payment open access in Adapty or RevenueCat, where your app already asks for it.
The customer pays with us in the browser, and we carry the payment to the subscription platform: we grant their profile access and track the term. From you: the platform keys and, once, the pair "our buyer identifier ↔ platform profile".
Before you start
- The Pro or Business plan and the owner or admin role in the project. Only they enter keys; no cabinet? Ask the project owner to invite you as an admin: Project and team.
- From the platform's dashboard: the secret key and the name of what to open: an access level in Adapty, an entitlement in RevenueCat; same meaning.
- A Subster access key: only to link the profile from your server: Authentication.
Step 1. Enter the platform keys
Open Project settings → App connection → Main, the "Where to deliver access" branch. In "Which service do you have connected", choose the platform and fill in the fields. There is no save button: each field saves when you leave it.
| Field | What to enter |
|---|---|
| Adapty secret key, iOS and Android | the server key secret_live_…. Each Adapty app has its own: if iOS and Android are set up as separate apps, fill in both fields; with one app, one is enough |
| Access level name in Adapty | the access level as it is named in the Adapty dashboard |
| RevenueCat secret key | the secret API key sk_… |
| Entitlement name in RevenueCat | the entitlement identifier from the RevenueCat dashboard |
Without the level or entitlement name, the key grants nothing and the cabinet stays silent: fill in both.
One level or entitlement name per project: any paid price opens it.
The platform's secret key goes into the cabinet. Our access key also looks like sk_…, but goes into the header of your requests to us; do not mix them up.
Branch not visible? Another path is selected. Press "Show the remaining settings" at the bottom or switch the path to "Subscriptions live in an outside service".
Test payments
A test card payment reaches the platform only with sandbox keys: the "Sandbox keys — optional" expander in the same branch. These are the secret keys of the platform's test apps; the fields hint at secret_test_… for Adapty and sk_test_… for RevenueCat.
Without them a test purchase never reaches the platform; this is not a broken link. Live purchases use live keys; both pairs share the level name.
Step 2. Link the customer to the profile
We grant access to a platform profile, so we need a pair: our buyer identifier (guid; where the app gets it: How we recognise the customer) and the platform's profile id: Latin letters, digits and symbols, no spaces, up to 255 characters.
| If you have | How to link |
|---|---|
| the app opens the quiz or paywall itself, no server of your own | with a parameter in the page address |
| a server of your own | with a request from the server: more reliable, the record is confirmed by a key |
| a customer who pays on the site before installing the app | with a request from the server, once the app has learned the buyer identifier |
With a parameter in the page address
Open the funnel page from the app with the profile id in the address. Both at once are fine:
https://<адрес воронки>?adapty_profile_id=<profileId из Adapty>
https://<адрес воронки>?revenuecat_profile_id=<appUserID из RevenueCat>
Take the id from the platform's library first. The page links the profile to the customer the payment goes to. Your code never needs our identifier.
Opening the page with our library? Pass the id as adaptyProfileId or revenuecatProfileId to the open method (openWebPaywall, openWebPaywallEmbedded, openQuizEmbedded; since 0.5.0, SDK): it adds it to the address.
The page returns no answer. The stored profile is shown by GET /s2s/v1/identity/link-profile?guid=<GUID> with a key; check the link with it before the first client. The answer is covered in Troubleshooting.
With a request from your server
curl -X POST "https://api.subster.ai/s2s/v1/identity/link-profile" \
-H "Authorization: Bearer sk_live_…" \
-H "Content-Type: application/json" \
-d '{ "guid": "abc123def456", "adaptyProfileId": "…" }'
The answer is { "success": true }. For RevenueCat the field is revenuecatProfileId; at least one of the two is needed. The key needs the identity:write scope; a default key has it (scope table). Use the key of the customer's project.
Use the identifier the payment goes to: create the customer in advance or wait until the app learns it; both paths are in How we recognise the customer. An unknown identifier is not rejected: the link is recorded, but access through it goes nowhere.
The link can also come after payment: once recorded, we grant the profile access for paid purchases still active.
| Answer | When it comes |
|---|---|
400 | no profile id at all; it has a space, Cyrillic or more than 255 characters; the buyer identifier is shorter than 8 or longer than 64 characters |
403 | the key has no identity:write scope |
What appears in the platform
| Adapty | RevenueCat | |
|---|---|---|
| subscription | access level until the end of the paid period; the term moves with each renewal | promotional entitlement until the same date |
| one-time purchase | level without a term | entitlement for 100 years: RevenueCat has no unlimited promotional entitlement |
| refund, lost dispute or other access revocation on our side | the level is removed | the promotional entitlement is removed |
Link recording rule
An outsider can see the page address, so it cannot overwrite the link:
- the page address records the link only while no profile is stored for the customer; it never changes a stored value;
- a repeat with the same value always goes through: open the page with the parameter as often as you like;
- only a request from your server replaces a stored profile: it overwrites unconditionally.
The page address does not check who sent the first record: with your own server, link from it.
If both platforms are connected
Pass both ids on every page open. If one profile is stored, the address adds the second only together with the correct first one: that tells your app from an outsider. Do not log in to RevenueCat with our buyer identifier: it does not count as proof, and only your server can add the second profile.
After the app is reinstalled
After a reinstall, the platform may give the person a new anonymous profile. Access stays on the old one; the new profile in the address will not overwrite the link (rule above). Choose one:
- log in to the platform with your permanent user identifier via its library's login call:
Adapty.identifyin Adapty,logInin RevenueCat. The profile, and access, stay the same; - overwrite the link from your server: we grant the new profile access for active purchases ourselves.
Next
- How we recognise the customer: where the server gets the buyer identifier if payment came before install.
- Troubleshooting: paid, but no access in the platform: how to see the stored link.
- Authentication: a Subster access key for the request from your server.