Open the interactive API reference
Browse every endpoint, see request/response schemas, and try calls live at
api.pocketsflow.com/docs.
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: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 theAuthorization 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.
Authentication errors
Missing or malformed credentials return401 with a JSON body:
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 isPOST /images, which usesmultipart/form-data). - Responses are JSON. IDs are Mongo ObjectId strings (24 hex characters) unless
noted (Stripe subscription ids are
sub_…; payment-processor ids areplan_…,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 anerror
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 returns429 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
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 aSale.
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.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
Link in Bio (creator pages)
Images
Customers
Account
subdomain to build product/checkout URLs
(https://{subdomain}.pocketsflow.com/...).