Prerequisites
- Claude Code installed (
npm install -g @anthropic-ai/claude-code). - A Pocketsflow API key. Create one in the dashboard under
Developers → API keys. Use a
pk_test_…key while building.
Two ways to use it
Act on your account (MCP)
Connect the Pocketsflow MCP server so Claude Code can call the API as your
account — no client code required.
Write integration code
Point Claude Code at these docs to generate and debug checkout-session and
webhook code against the public API.
1. Connect the Pocketsflow MCP server
The Pocketsflow MCP server exposes the full public API as Model Context Protocol tools. Add it with the Claude Code CLI:claude in your project and ask things like:
- “List my last 10 orders and their totals.”
- “Create a $29 product called Starter Kit and give me the checkout link.”
- “Which subscriptions went past due this week?”
- “Refund order
ord_123and tell the customer.”
2. Give Claude Code project context
Create aCLAUDE.md at the root of your integration project so Claude Code
follows Pocketsflow conventions when writing code:
3. Use the docs as a source
Claude Code works best when it can read the authoritative reference. Point it at:- This documentation — especially Integrations overview, Custom platforms, and Consuming webhooks.
- The interactive API reference at
https://api.pocketsflow.com/docs(OpenAPI JSON at/docs.json).
Example: scaffold a webhook handler
Ask Claude Code:Using the Pocketsflow docs, write an Express endpoint that verifies theIt can generate the handler, wire up the signature check, and — with the MCP server connected — send a test event to exercise it end to end.X-Pocketsflow-Signatureheader against the raw body, handlesorder.completedidempotently, and readsmetadata.external_order_id.