Skip to main content
The Pocketsflow HTTP API lets you manage products, checkout, orders, payments, subscribers, customers, discounts, upsells, refunds, webhooks, newsletters, your Link in Bio page, images, and the partner program — all from your own systems.

Open the interactive API reference

Browse every endpoint, see request/response schemas, and try calls live at api.pocketsflow.com/docs.
The raw OpenAPI specification is served at https://api.pocketsflow.com/docs.json — import it into Postman/Insomnia or generate a typed client from it.

Base URL

Every request is made over HTTPS to:
There is no version prefix in the path today — endpoints are addressed directly (for example GET /orders). New fields are added in a backwards-compatible way; treat unknown fields as optional and never hard-code assumptions about field order.

Authentication

Every endpoint requires authentication via the Authorization header using the Bearer scheme. Two credential types are accepted: Create an API key in the dashboard under Developers → API keys, then send it on every request:
All data is automatically scoped to the account that owns the key (and to that key’s test/live mode) — you never pass a user id. Keys are stored hashed, can be given an expiry, and can be archived/revoked at any time; a revoked or expired key returns 401.
Treat secret API keys like passwords. Never expose them in client-side code, public repositories, or URLs. Prefer a dedicated, revocable key per integration, and rotate a key immediately if it leaks.

Authentication errors

Missing or malformed credentials return 401 with a JSON body:
Common cases: no Authorization header, a header that doesn’t start with Bearer , an empty token, and an inactive/archived/expired key.

Making requests

  • Send JSON bodies with Content-Type: application/json (the only exception is POST /images, which uses multipart/form-data).
  • Responses are JSON. IDs are Mongo ObjectId strings (24 hex characters) unless noted (Stripe subscription ids are sub_…; payment-processor ids are plan_…, pay_…, mem_…).
  • Timestamps are ISO 8601 UTC strings (2026-01-24T05:35:38.103Z).
  • Money on the Payments, Subscribers, and Orders resources is returned in major currency units (e.g. 12.1 = $12.10). Money inside a webhook payload is in the smallest unit (e.g. cents) — see Webhook events.

Pagination

List endpoints paginate in one of the following ways. The page-based pagination object looks like:

Errors

Errors use standard HTTP status codes and a JSON body carrying an error message (some endpoints also return a machine-readable code or a human message):

Rate limits

Requests authenticated with a valid API key get 600 requests per minute per account. Unauthenticated traffic shares a stricter per-IP allowance, so always send your key. Exceeding a limit returns 429 with a JSON body that includes retryAfter (seconds) — back off and retry after that delay. Beyond that, use reasonable concurrency, back off on 5xx, and cache where you can. Some endpoints have their own caps — for example POST /newsletters/send accepts at most 100 recipients per request.

Endpoint catalog

Everything below is available with an API key. Full request/response schemas live in the interactive reference; the most important response shapes are shown here.

Products

POST /products accepts (among others) name, price, description, subtitle, published, slug, thumbnail, images[], payWant, minPrice, maxPrice, showSales, showReviews, refundPolicy, hasFirstName, hasLastName.

Checkout

Required: productId, successUrl, cancelUrl. Optional: customerEmail, discountCode, metadata (echoed back on the resulting order.completed webhook).

Orders

Payments

The unified payment ledger — one-time product purchases and subscription charges (initial + every renewal) in a single resource. Every payment is a Sale. A single Payment object:
boolean
true for subscription payments (initial + renewals); false for one-time product purchases.
string
Present only on subscription payments: initial for the first charge that activates the membership, renewal for every recurring charge after it.
string
Set on one-time purchases; empty on subscription payments (use subscriptionId instead).
string
The processor’s receipt, plan, and membership ids backing the sale. whopMembershipId is present on subscription payments only.
GET /payments returns { payments: [Payment], pagination }. GET /payments/{id}?live=true returns a PaymentDetail:
net = amountBeforeTax − affiliateCut − stripeFee; fee is the processor fee. whopLive is null if the live lookup failed — the stored whop block still applies, so ?live=true never fails the request.

Subscriptions and subscribers

Two distinct concepts: a subscription offer is the recurring product you sell; a subscriber is a buyer’s membership in one of those offers.
Subscription offer creation and /subscriptions/{id} accept both an API key and an Auth0 JWT. In SDK v1.2.0 and later, Node.js and TypeScript users can call pocketsflow.subscriptionOffers.create(). See the SDK guide for installation and usage; use the REST request above if your installed SDK predates v1.2.0.
A Subscriber object carries a processor-sourced live status (incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid, succeeded, refunded, paused) and the joined offer:
GET /subscriptions/subscribers/{id}?live=true:

Discounts

valueType is percentage (default) or fixed; optional active, expiration.

Upsells

Optional: name, offer, upsellDescription, primaryButtonText, secondaryButtonText, active.

Refunds

Reviews

Webhooks

See Webhook events for the full event list and payloads, and Authentication & security for signature verification.

Newsletters

Images

Customers

Account

Use subdomain to build product/checkout URLs (https://{subdomain}.pocketsflow.com/...).

Partners

Connect an AI agent

Prefer to drive Pocketsflow from an AI assistant? The MCP server exposes this entire API as Model Context Protocol tools — connect Claude, Cursor, or your own agent with an API key and it can manage your account in natural language.

Building an integration?

If you’re connecting Pocketsflow to an external store or platform (for example WooCommerce), start with the Integrations section — it walks through the end-to-end pattern with code examples.