/adapty-skills:purchase-testingfrom Adapty
Diagnoses sandbox/test purchase failures in Adapty-powered apps. Checks common issues before asking users to open store consoles. Complements adapty-integration.
Ships in Adapty. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Why doesn't this purchase work — and what do I do about it? Also the forward case:
someone whose code builds and whose stores are connected, about to run their first
sandbox purchase — often straight after adapty-integration hands over.
The value is the order. A purchase failure can live in five different places, and the expensive ones involve a human clicking through a store console. So this skill checks everything it can reach itself, first, and only then asks anyone to open a browser.
This skill does not connect stores and does not write code. Creating store products,
uploading an App Store In-App Purchase Key, setting up a Google Play service account and
RTDN, and writing the SDK calls all belong to adapty-integration. When a check here
lands on one of those, offer the outcome ("I can add the code that closes the paywall
after a purchase. Want me to?") and invoke adapty-integration on a yes.
Every message, not only the fixed blocks:
is_active), never "layer 2", never skill or tool names, never the paths of files you
saved while working..md URL; the user gets the same URL without .md.adapty-docs skill.Every purchase failure sits in exactly one of these. Naming the layer before touching anything is the whole method — the wrong guess costs a round trip through a console. The layers are how you think, not how you talk: tell the user where the problem is ("in your code", "in App Store Connect", "on the phone"), never a layer number.
| Layer | What lives here | Who can check it | Say it as |
|---|---|---|---|
| 1. Adapty dashboard | product, access level, placement, flow status | you, through the CLI | "in the Adapty dashboard" |
| 2. App code | placement ID, call order, entitlement read | you, by reading the code | "in your code" |
| 3. Store ↔ Adapty connection | keys, service account, server notifications | the user — adapty-integration fixes it | "the connection between the App Store and Adapty" |
| 4. Store console | the product itself, its price, its state | the user | "in App Store Connect" / "in Play Console" |
| 5. Device / account | sandbox account, tester opt-in, purchase history | the user | "on the phone" / "the test account" |
Layers 1 and 2 are free and instant. Run them before asking a single question.
Anything product-side this skill does not cover — what a setting means, how a store integration behaves, an error code — use the
adapty-docsskill to find it. Never assemble a docs URL from a topic name.
This skill reaches Adapty through the Adapty CLI or the Adapty MCP server. Its commands are written for the CLI, and over MCP each one is a tool call. Before the first call, check both, pick one way, and keep it for the run:
adapty auth whoami shows an account. Install nothing for this check.apps_list and auth_whoami,
after any prefix your client adds) and auth_whoami shows an account.| CLI ready | MCP ready | Use |
|---|---|---|
| yes | no | the CLI |
| no | yes | MCP |
| yes | yes | the way this skill prefers (the line after this section's example) |
| no | no | ask which one to set up (below) |
Over MCP, run each command as its tool. $ADAPTY <topic> <command> is the tool whose name ends
in <topic>_<command>, dashes and spaces turned into underscores: ab-tests list is
ab_tests_list, flows config get is flows_config_get. The flags become the tool's parameters;
take their names and shapes from its schema (--app is app_id, a flag that may repeat is one
list). The tools return JSON, so drop --json. --yes has no parameter: the yes this skill asks the
user for still comes before the call. Skip the $ADAPTY resolution, --help probes, auth login
and auth status: a command exists when its tool is in your list, and the client signs in.
feedback is the tool feedback_send, with the same fields; its {"status": "sent"} answer
counts as Feedback sent.
A command with no tool, and a script that runs $ADAPTY, need the CLI (segments create has
no tool). Run that step with the CLI when it is ready. Otherwise say it needs the CLI and offer to
set it up.
When a call fails one way, a read may run once the other way if that way is ready. After a write fails or times out, read the state again the way that wrote; never repeat the write the other way.
Neither ready: ask which one to set up, the one this skill prefers first, then give only that one's steps. Use your question tool if you have one; otherwise ask in one message with numbered options.
The CLI: run this skill's CLI resolution, then adapty auth login, which opens the browser for
the user's sign-in. The Claude app also needs Adapty's domains allowed first:
https://adapty.io/docs/developer-cli-cowork
EU account: first check that the CLI knows the region: ADAPTY_REGION=xx $ADAPTY auth status
exits 2. On any other exit, set ADAPTY="npx --yes adapty@latest" and keep it for the login and
every next call, also in a new shell, whatever the version block printed. Then log in with
$ADAPTY auth login --region eu (or ADAPTY_REGION=eu); where this skill has the user log in,
run no login yourself and tell them to run adapty auth login --region eu. The user opens the
link in a browser signed in through https://app.adapty.io/eu-login. After a damaged login file,
log in again with the same region; if you do not know it, ask the user.
MCP: the server is https://mcp.adapty.io/mcp, and the user signs in in the browser. The
adapty-skills plugin adds it, so when your client says the server needs sign-in, only the
sign-in is left.
An account on Adapty's EU servers uses the EU instance, https://mcp-eu.adapty.io/mcp, instead.
The plugin adds only the default server, so add the EU one in your agent by hand:
Adapty on EU servers.
/mcp, pick plugin:adapty-skills:adapty, Authenticate. Without the plugin,
first claude mcp add --transport http --scope user adapty https://mcp.adapty.io/mcp.codex mcp add adapty --url https://mcp.adapty.io/mcp, then codex mcp login adapty.If the tools do not appear in this session, the user starts a new one: say so and stop.
Example of the question's shape, not words to copy:
I can reach your Adapty account in two ways. Which one should I set up?
- The Adapty CLI: I install it, and you sign in once in the browser.
- The Adapty MCP server: you add it to your AI tool and sign in; nothing to install.
This skill prefers MCP when both are ready.
Resolve $ADAPTY once, the way adapty-integration does:
if [ "${ADAPTY-}" != "npx --yes adapty@latest" ]; then ADAPTY="adapty"; VMSG=$(
_a() { if [ -n "${HTTPS_PROXY-}${https_proxy-}" ]; then NODE_USE_ENV_PROXY=1 $ADAPTY "$@"; else $ADAPTY "$@"; fi; }
_v() { _a --version 2>/dev/null | sed -n 's|^adapty/\([^ ]*\).*|\1|p'; }
command -v adapty >/dev/null 2>&1 || { npm i -g adapty@latest >/dev/null 2>&1 \
&& command -v adapty >/dev/null 2>&1; } || { echo npx; exit; }
J=$(_a version --json 2>/dev/null) && printf '%s' "$J" | node -e 'let s = "";
process.stdin.on("data", d => s += d).on("end", () => { try { const j = JSON.parse(s);
if (j && typeof j.installed == "string" && (j.latest === null || typeof j.latest == "string")
&& typeof j.update_available == "boolean") process.exit(j.update_available ? 1 : 0);
} catch (e) {} process.exit(1); });' && exit
old=$(_v); npm i -g adapty@latest >/dev/null 2>&1 || { echo npx; exit; }
new=$(_v); [ -n "$new" ] || { echo npx; exit; }
[ "$new" != "$old" ] && echo "CLI updated from $old to $new." || echo "Could not update the CLI: still $new."
); [ "$VMSG" = npx ] && ADAPTY="npx --yes adapty@latest" \
&& VMSG="Could not install or update the CLI globally, so I run it through npx."
if [ -n "$VMSG" ]; then echo "$VMSG"; fi; fi
Run this block as its own command, right after the readiness check adapty auth whoami and
before any other CLI command. Copy it as it is: it runs $ADAPTY version --json and updates a
CLI that is behind or too old to have that command. If it prints a line, your reply to the user
starts with that line, in their language, with nothing added. Say nothing else about the CLI
version: no "up to date", no version number. A new shell does not keep $ADAPTY: set it again, to
npx --yes adapty@latest after the npx line, else to adapty.
Then $ADAPTY auth whoami.
--yes on the fallback is load-bearing: without it npx stops to ask permission to install,
and a headless run has nobody to answer. In zsh a multi-word $ADAPTY is not word-split,
so run setopt shwordsplit once in the same shell; command not found: npx --yes adapty@latest is that shell problem, never a missing CLI.
If that fails, tell the user to run adapty auth login and stop; every check below reads
the account. Then, with the app id:
$ADAPTY apps get <APP_ID> --json
$ADAPTY placements list --app <APP_ID>
$ADAPTY products list --app <APP_ID>
$ADAPTY access-levels list --app <APP_ID>
apps get also returns the app's secret_key. Never show it to the user or copy it
anywhere; nothing in this skill needs it.
--page-sizedefaults to 20 and the response carriesmeta.pagination {count, page, pages}. Reading page 1 and reporting its length under-reports any account with more than 20 placements or products. Page through topages.
Six checks, in this order. Each one that fails names where the problem is and stops the guessing.
1. Adapty knows the app's store identity. apps get returns apple_bundle_id and
google_bundle_id. The one for the platform under test must be set, and it must match the
app's own bundle ID or package name (in the Xcode project or applicationId in Gradle). A
null means Adapty cannot verify purchases with that store at all: the store takes the
money, the paywall reports an error, and nothing reaches the Event Feed. That is the store
connection, and adapty-integration sets it up — offer it. The ID alone is not the
connection: Adapty also needs the store's credentials (the In-App Purchase key; a Google
Play service account), which only the dashboard takes. apps update --apple-bundle-id or
--google-bundle-id sets the ID from here, but offer the whole connection, never the ID
alone as if it were the fix. While it is missing, it is the problem: never tell the user
"nothing is broken". Do not take "I've connected the store" on trust; this read is free.
2. The placement exists, and it is Live. placements list returns developer_id
and is_active per placement. is_active: false means Inactive — the placement
serves nothing, and every symptom downstream is explained by it. This is the cheapest
possible find and nothing else in the chain reveals it.
3. The app code asks for exactly that developer ID. Grep the code for the
placement string and compare it to developer_id character for character. It is
case-sensitive, and the dashboard shows the placement's name more prominently than its
ID, which is where "Main" against main comes from. A mismatch is yours to fix and
needs no user at all.
4. The placement shows something, and it is live. placements list does not return
audiences — you need the detail call:
$ADAPTY placements get --app <APP_ID> <PLACEMENT_ID>
Each audience entry carries a content_type of flow or paywall, plus flow_id or
paywall_id. An empty audiences array is a placement with nothing attached, which
looks exactly like a broken SDK call from inside the app. Then check what it shows:
A flow — it must be published. This is the single most common cause of "I changed it and my phone still shows the old screen":
$ADAPTY flows config get --app <APP_ID> <FLOW_ID>
status is draft, dirty, or published. dirty means the flow has unpublished
changes, and its placement keeps serving the last published version — so the builder
shows the new design and the phone shows the old one, with no error anywhere. draft
means it was never published. Both are the user's click in the builder. On a failed
publish the response also carries publication_error and transform_error: quote
that string, it is the transform service's own objection.
A paywall — $ADAPTY paywalls get --app <APP_ID> <PAYWALL_ID> returns its title
and its products (products[].product_id); there is nothing to publish. It also returns
use_paywall_builder_v4, which says the paywall is set to use Paywall Builder, not
that a layout is saved, so if the code renders it with Adapty's own paywall UI,
name that as something you could not check.
5. The products carry store IDs and an access level. products list and
products get return access_level_id and a vendor_products map. A product with no
store ID for the platform under test can never resolve a price, and a product whose
access_level_id does not match the level the app checks grants nothing on purchase —
the purchase succeeds and the user stays locked out, which is the most confusing
symptom in the whole surface.
6. Nothing in the code grants premium without a purchase. Grep for a debug or test
override: a flag, build condition or hardcoded true that unlocks access or skips the
paywall (isPremium = true, #if DEBUG, BuildConfig.DEBUG, kDebugMode, a "force
premium" setting). If the build under test carries one, a sandbox walk through it proves
nothing: name the line, and test on a build without it.
Report the preflight before anything else (the block is under What you print). Then go to what failed, or to Phase 2 if all six pass.
All six preflight checks pass, so the dashboard and the code agree. What is left is the store and the phone, and only the user can touch those. This is a conversation, not a document: the user does a step, comes back, and you take the next one. Send one step per message.
| Step | Who | What | How long |
|---|---|---|---|
| 1. Checked from here | you | the preflight, including the store identity | — |
| 2. Set up the test account and the phone | the user | the store reference's setup | about 5 minutes |
| 3. Buy | the user | open the paywall, buy, read the purchase sheet | a minute |
| 4. Confirm it reached Adapty | the user | Event Feed, then the user's profile | up to 10 minutes |
| 5. Restore, then a renewal | the user | restore on a clean install; wait for one renewal | 5–10 minutes |
The steps for each store live in its reference — follow the one for the platform under test, and take from it only what the current step needs:
references/app-store.mdreferences/google-play.mdAnything about connecting the store to Adapty routes back to adapty-integration.
Three rules for the walk:
What each step means, so nobody stops early:
adapty-integration. Sandbox purchases never appear
in the analytics charts — only in the Event Feed and on profiles — so a user who looks
at the charts sees nothing and concludes it failed; say where to look. The CLI cannot
read events or profiles, so this step is always the user's.Before telling the user what the screen should do after a purchase, read what the code
does. Some setups close the paywall on their own after a successful or pending purchase —
Adapty's default Android event listener does; some never close it — a SwiftUI paywall
presented with a constant isPresented never does. So a paywall that stays up after the
store said the purchase went through means two different things:
adb logcat | grep -i adapty, or the Xcode
console), check the store identity from check 1, and localize before step 4.When something fails, localize before you fix. The pattern of what works narrows the layer faster than any single symptom.
| What you see | Layer | Read it as |
|---|---|---|
| Paywall never appears, no error | 1 or 2 | Placement inactive, empty audiences, an unpublished flow, or a placement ID that differs by case — Phase 1 finds all four |
| Paywall appears, prices missing or empty | 1 or 4 | Product IDs disagree between Adapty and the store console, or the store product is not active |
| Old design on the phone, new one in the builder | 1 | Unpublished flow changes — the placement serves the last published version |
| Purchase sheet never opens | 5 | Phone or account state: wrong sandbox account, tester not opted in, app not installed from the store |
| Purchase completes, nothing unlocks | 1 or 2 | The product's access level is not the one the app checks, or the app never reads it |
| Purchase completes, the coins (gems, credits) never arrive | 1 or 2 | The product gives no coins in that currency, or the app shows a balance it read before the credit. Read both now, no yes needed: virtual-currencies get for the product's coins and virtual-currencies profiles transactions list for the user's rows (the virtual-currencies skill, references/ledger.md); a mapping change is that skill's, on a yes |
| The store took the purchase, but a paywall that closes on success stays up | 3 or 5 | Adapty could not verify it (check 1: store identity), a pending payment, or an error the code swallows — the log says which |
| Google Play said the payment went through, the app got billing response code 6, the paywall stayed up until a restore | 5 | Google Play's own error (ERROR), not the setup: Event Feed, then restore — references/google-play.md, Getting unstuck |
| The Play Store on an emulator calls the closed-testing build incompatible | 5 | The emulator, not the setup: a real device — references/google-play.md, Getting unstuck |
| On the iOS simulator the sandbox account never signs in, and every purchase comes back as cancelled by the user | 5 | The simulator, not the setup: the same test on a real device, from Xcode or TestFlight — references/app-store.md, Sandbox |
| Purchase completes, no event in Adapty | 3 | Server notifications / RTDN — adapty-integration fixes the connection |
| Works for you, not for a teammate | 5 | Account state, not configuration — compare the two accounts before touching anything else |
Two rules that keep a diagnosis honest:
State these rather than letting the user assume the pass was total, and say how they can check each one:
products list tells you what Adapty believes
the store ID is. Only the console tells you whether a product with that ID exists,
is priced, and is active — name the ID and where to look it up.Send Adapty one feedback note when the run ends — after step 5, when you hand the fix to
someone else (the store console, the adapty-integration skill), or when something you could not
get past stops the run. A diagnosis you fix yourself is not the end: the walk goes on to step 5. A
user who stops replying mid-walk gets none. It tells Adapty how the job went for you with this skill and the CLI, good runs
included. Write it in English, in one of these shapes — the shape to follow, not words to copy:
Walked a first App Store sandbox purchase through to a restore.
Declined to <what was asked, in generic words>, because .
What I did: diagnosed a Google Play purchase that never reached Adapty. What helped: the preflight showed the store was not connected before anyone opened Play Console. What got in the way: products list failed with http_500 (request id req_7f3a9c), and this skill does not say whether the preflight can go on without it.
Sentiment is your own outcome, never the user's mood:
positive — done the way this skill describes, or declined because this skill says it
cannot be done. A purchase that failed because of the user's setup, with the cause found, is
done: finding it is this skill's job, however upset the user is. One sentence on what you did
or declined and why, and nothing about checks, saving or how it went: the grade already says
that.neutral — done, after a wrong turn or a workaround, or around a problem you found in the
app or the account and left alone. The third part names that problem by its shape ("a
placement the code asks for in another case"), never by the user's values.negative — this skill or the CLI is what stopped you, or you delivered something you know is
wrong.Neutral and negative notes carry all three parts.
Every sentence is about the task, this skill or the CLI: the store, the step of the walk, a
command and its error. Nothing you read in the user's account (how their placements, products,
access levels or flows are set up, any count or value) and none of their code, copy, brand,
product names, file paths or business. The ids in --context are all Adapty needs to find the
rest.
Plain words, one short sentence each. No script, file or flag names in the first two parts. The third names the command and its error, and says what this skill or the CLI should have told you.
--context carries the ids and the request: the app id, the placement id, and what was asked
in a generic form — app <app id>, placement <placement id>: first sandbox purchase on Google Play, not the user's words.
Write the note into the command in single quotes, never from a file or a script, so anyone reviewing the call can read what goes out. Inside single quotes the shell runs nothing, so drop backticks and write "does not" for "doesn't":
$ADAPTY feedback --feature purchase-testing --sentiment <positive|neutral|negative> \
--message '<the note>' \
--context 'app <app id>, placement <placement id>: <what was asked, generic>'
Always run the command once the note is due, even when you expect it to be refused or blocked: what happens to it is not yours to predict.
Tell the user in one line, inside the message where the run ends, only when the command printed
Feedback sent.: this exact sentence in their language, and no other word about the note
anywhere in the reply: "I also sent Adapty a short note on how this went." Any other result (an
error, a refused or blocked call, $ADAPTY feedback --help saying there is no such command) gets
no line at all, not even that a note was meant to go. Never retry, never hold up the task.
The user can turn it off: if they say not to send feedback, send nothing for the rest of the session.
When the user pushes back on something you did, send a note then, before you answer them:
they ask why you did it, tell you to undo or fix it, or are upset with you, this skill or the CLI
("why did you do that?? fix it right now"). Three parts: what you did that they objected to, what
helped, and their objection quoted in English with its tone kept, then whether they were right.
negative when they were right; neutral when what you did was correct but they did not expect
it, and the third part says what you should have told them first. Upset about their own setup,
the store or the dashboard is not push-back. This note is on top of the one at the end. Its line
goes in your reply to the objection, under the same rule as above.
Every message has the same four parts, in this order, and nothing else:
Answer the question they asked, not the one your preflight answered. Line 1 and Next are about their symptom or question. A preflight problem that does not cause it, such as a missing store connection behind an error the store raised before Adapty was involved, gets exactly one sentence after Next ("Separately: Adapty isn't connected to the App Store yet; that's the next thing to fix.") — never the headline, never the next step, and never the reasons or the steps for it; those come when it is the thing being fixed. When the preflight problem is the cause, it is the answer.
Two extras, both only where they apply: the checks table (in the preflight message only), and one line for something you could not check, saying where the user can check it — only when it could explain their symptom. And in the message where the run ends, the one line that a feedback note went out. A check that has nothing to do with what they asked is left out, not listed.
Each thing is said once. Leave out whatever the user does not need to act on now: later steps, what happens after the fix, "everything else is ready" (the table says it), "waiting won't help" when you have already said why nothing arrived, a list of docs pages when you have offered to walk them through it. Aim for under ~120 words outside the table and the numbered list. The examples show the shape, not words to copy.
The preflight result, before anything else. When everything passed, it is one line ("Your dashboard and your code are ready for a test purchase.") and the walk starts in the same message. When something failed:
Adapty isn't connected to Google Play yet, so a test purchase wouldn't reach it. Google would take the payment and your paywall would show an error.
Next: connect Google Play to Adapty: your package name
com.example.appplus a service account key, about 20 minutes.
Check Result Adapty knows your app's package name No: it's empty The placement exists and is live Yes, mainYour code asks for exactly that ID Yes, "main"inPaywallActivity.ktThe placement shows something Yes: the paywall "Premium", with one product The product has a Google Play ID and an access level Yes: com.example.premium.monthly, access levelpremiumI can't see Play Console from here: check that the base plan
monthlyshows as "Active".Reply "go" and I'll walk you through the connection.
Never print a row for a check that does not apply.
A step of the walk, from step 2 on:
Step 2 of 5: set up a test account and your phone. About 5 minutes.
- In App Store Connect, open Users and Access → Sandbox → Test Accounts and create a new tester with an email you have never used for an Apple ID.
- …
Reply "done", or tell me what you saw instead if a menu isn't where I said.
A diagnosis, when something went wrong:
Step 3 of 5: Google Play took the purchase, but it didn't reach Adapty.
Your paywall closes itself once Adapty confirms a purchase, and Adapty can't confirm it until Google Play is connected. (If you picked "Slow test card", it may also still be pending.)
Next: connect Google Play to Adapty, about 20 minutes. I'll take you through it one screen at a time.
Reply "go" to start, or tell me if you used the slow test card.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
adapty, in-app-purchase, sandbox-testing, purchase-debugging
npx claudepluginhub adaptyteam/adapty-skills --plugin adapty-skills18 skills in this plugin
/ab-testsUse when a user wants to run, check or end a regular A/B test of paywalls or flows through the Adapty CLI — plan it, create the draft, change it, start it, read its results, stop it with a winner, replace a running test with a changed one, archive it, or see which tests an app has. Triggers on "run an A/B test of these two paywalls", "test my new flow against the old one", "split traffic 50/50", "start the test", "stop the test, B wins", "end this experiment", "change the weights of my test", "which tests are running", "archive the old tests", "should I stop this test", "how did the test go", "who is ahead"./adapty-attributionUse when someone asks how their ad campaigns, channels, ad sets, ads, countries or keywords are performing in Adapty Attribution — ROAS, payback, CPI, cost per trial, installs, trial-to-paid, refunds, predicted revenue — which channel or campaign to scale or cut, where to move budget, why installs dropped, why Meta, TikTok or Google report different numbers than Adapty, or how to set up Adapty Attribution with Meta, TikTok, Google Ads, custom tracking links or a web funnel./adapty-docsUse when an Adapty question has no page already linked in the skill you are holding — how a product or dashboard feature behaves, what a setting does, a limit, store connections, Flow Builder, the Developer CLI, the server-side API, or an SDK method on any platform. Also use when you need a docs page and have no URL for it, or when a docs URL you tried returned 404. Not for making a change to an app's Adapty setup — connecting a store, or creating products, access levels or placements — which `adapty-integration` carries out through the Adapty CLI./adapty-integrationUse when a user wants to integrate Adapty SDK into a mobile app, set up in-app purchases with Adapty, add a paywall to their app, or move to Adapty from another purchase system. Triggers on "integrate Adapty", "add Adapty to my app", "set up subscriptions", "add a paywall", "migrate from RevenueCat", "replace RevenueCat with Adapty", "move off Superwall", or similar./adapty-mailUse when someone wants to work in Adapty Mail — email campaigns or sequences, email flows on triggers like never purchased, expired, refunded, billing issue or renewal cancelled, trial-conversion or win-back emails, translating emails, a sending domain and its DNS records, deliverability, bounces, unsubscribes or suppression, double opt-in, email A/B tests, open, click, conversion or email revenue numbers, or why someone did not get an email. Also use when someone wants to connect the Adapty Mail MCP server to their agent, or a Mail tool call fails with an authentication error./ads-managerUse when managing Apple Search Ads through the Adapty CLI — reading campaign, ad group, keyword or ad performance, changing bids or budgets, getting keyword recommendations for an app, adding or pausing keywords, launching or pausing a campaign, creating a whole campaign structure in bulk from JSON or an Apple Ads template, harvesting search terms, setting up rule-based ad automations, finding who changed a campaign, bid or keyword and when, or turning campaigns, ad groups or keywords into Adapty segments so users from one campaign see their own paywall or flow.Other plugins' skills for the same job