AI toolkit
Let Claude, Cursor or another AI assistant work with your Appwind Pay project, or use it from the terminal.
Both use a project's secret key (sk_…, Project → API keys). Keep it out of apps and websites. Anyone with it can read customers and grant access.
MCP server
Appwind Pay runs an MCP server at https://pay-api.appwind.ai/mcp (streamable HTTP).
Claude Code
claude mcp add --transport http appwind-pay https://pay-api.appwind.ai/mcp --header "Authorization: Bearer sk_…"
Claude desktop, Cursor and others: add a remote MCP server with that URL and the header Authorization: Bearer sk_….
Then ask things like:
- “How did revenue and churn move over the last 6 months?”
- “Why doesn't user_42 have Pro? Check their purchases and events.”
- “Give user_42 Pro for 30 days — support apology.”
- “Which experiment is winning?”
- “What's left to set up in this project?”
| Tool | What it does |
|---|---|
get_overview |
Customers, active subscriptions and trials, billing issues, revenue (30 days) |
get_charts |
Monthly revenue, MRR, subscriptions, trials, conversion, churn, LTV cohorts |
list_customers, get_customer |
Search customers; one customer's full history |
grant_entitlement, revoke_grants |
Give or take back promotional access |
list_products, list_entitlements, list_offerings, list_paywalls |
Your catalog |
set_current_offering |
Change the default offering |
list_targeting_rules, list_experiments, get_experiment_results |
Targeting and A/B tests |
list_events |
Purchase events and webhook delivery |
get_setup_status |
What's left to set up |
Your AI assistant asks you before it runs a tool that changes something.
CLI
Download the CLI. It needs Python 3.8 or later and nothing else.
unzip appwind-pay-cli.zip && sudo install appwind-pay-cli/appwind-pay /usr/local/bin/appwind-pay
appwind-pay login # paste the secret key
appwind-pay overview
appwind-pay charts --months 6
appwind-pay customer user_42
appwind-pay grant user_42 pro --days 30 --note "support apology"
appwind-pay events --type CANCELLATION --limit 20
appwind-pay setup
Add --json to any command to get JSON for jq or scripts. In CI, set APPWIND_PAY_SECRET_KEY (and APPWIND_PAY_SERVER for your own server) instead of appwind-pay login.
REST API
Everything else is in the REST API.