Skip to content

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.

View as Markdown

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.

RecipeSellsSkillExample
API creditsPrepaid credits, spent per requestsell-creditsapi-credits (Hono)
SaaS subscriptionA monthly plan, renewed by invoicesell-subscriptionsaas-subscription (Next.js)
License keysAn app or plugin unlocked by a keysell-license-keyslicense-keys (Node CLI)
Telegram botPaid bot commands, roles, groupssell-bot-accesstelegram-bot (Node)
Paid MCP serverMCP tools, credits per callpaid-mcp-toolspaid-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

The plugin is on its way to its public repository. The commands below work once it is listed.
bash
claude plugin marketplace add volodymyrslipak/perly-pay-ai && claude plugin install perly-pay@perly

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 and invoices.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.fulfilled or entitlements.check — never the redirect, never invoice.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.