Guides
Recipes for AI assistants
Sell an API, a SaaS plan, an app, a bot or MCP tools for crypto, in one prompt to your coding assistant.
Ask your assistant to "let people buy API credits with USDC" and it should do it the right way: test mode first, a signed webhook, access only once a payment is fulfilled. These recipes teach it how. Each is a skill for Claude Code, a rule for Cursor and a block for AGENTS.md, from one source, plus a small app you can run. They cost nothing to run: they are files in your project, calling Perly Pay with your own key.
| Recipe | Sells | Skill | Example |
|---|---|---|---|
| API credits | Prepaid credits, spent per request | sell-credits | api-credits (Hono) |
| SaaS subscription | A monthly plan, renewed by invoice | sell-subscription | saas-subscription (Next.js) |
| License keys | An app or plugin unlocked by a key | sell-license-keys | license-keys (Node CLI) |
| Telegram bot | Paid bot commands, roles, groups | sell-bot-access | telegram-bot (Node) |
| Paid MCP server | MCP tools, credits per call | paid-mcp-tools | paid-mcp-server (MCP SDK) |
Three more skills come with them: add-crypto-checkout for any one-off sale, verify-webhooks for a correct webhook route in every framework, and test-and-go-live for simulated payments and the switch to live money.
Claude Code
Then ask in plain words, or call a skill: /perly-pay:sell-credits.
Cursor
Copy the plugin's cursor/rules/*.mdc into your project's .cursor/rules/. perly-pay.mdc holds the rules; each recipe has its own file, attached when a chat is about it.
AGENTS.md
Paste the plugin's AGENTS-snippet.md into your AGENTS.md (Codex, Jules, Copilot, Zed, Cursor and others read it). It sits between BEGIN perly-pay and END perly-pay, so an update replaces it whole.
Any assistant
Skills for every assistant are listed at /.well-known/skills/index.json, and every docs page is also Markdown — add .md to its address, or read all of them in /llms-full.txt.
What every recipe holds to
- Test mode first: a
sk_test_…key andinvoices.simulate. Nothing real moves. - The secret key stays on your server, in
PERLY_PAY_SECRET_KEY. Shipped apps check licenses with no key at all. - Access only on
invoice.fulfilledorentitlements.check— never the redirect, neverinvoice.paid. - Webhooks verified on the raw body, each event handled once.
- Idempotency keys on what may repeat, such as spending credits.
- Amounts in cents, USD or EUR. Never floats.
- No auto-debit, ever: renewals and top-ups are invoices the buyer pays from their wallet.