Skip to main content
This catalog lists every operation in the public OpenAPI contract: 51 paths and 72 operations. Every endpoint requires authentication unless noted otherwise. A few SDK helpers (for example users.update and variants) call routes that are not in the public contract yet; see the SDK reference.

Interactive API explorer

Try requests, inspect schemas, and copy generated examples in Scalar.
The machine-readable contract is available at /docs.json. This page is generated from the same public contract so the catalog does not drift from the deployed API.

Conventions

  • Base URL: https://api.pocketsflow.com
  • Authentication: Authorization: Bearer pk_live_... or Authorization: Bearer pk_test_...
  • JSON requests use Content-Type: application/json; image uploads use multipart/form-data.
  • IDs are usually MongoDB ObjectId strings. Processor IDs such as sub_..., plan_..., pay_..., and mem_... retain their provider prefixes.
Keep API keys server-side. Never put a secret key in browser code, a mobile app, a public repository, or a URL.

Account

Retrieve information about the authenticated user, including account details, subdomain, test mode status, and whether the account has sales. Use this to get the user’s subdomain for constructing product URLs.ResponsesTry it in the interactive API explorer.

Checkout

Create a checkout session for a one-time product OR a subscription (recurring) offer — pass either kind of id as productId. Returns a URL to redirect customers to complete their purchase. Payment methods (card, Apple Pay, Google Pay, Link, ACH, and country-specific methods such as iDEAL) are taken from the seller’s account — there is no payment-method parameter on this endpoint.Request bodyContent type: application/json Required fields: productId, successUrl, cancelUrl.ResponsesTry it in the interactive API explorer.

Customers

Retrieve a list of all your customers (deduplicated by email, each with a computed numberOfOrders). Optionally filter by product and sort. The full list is returned — this endpoint is not paginated.ParametersResponsesTry it in the interactive API explorer.
Retrieve a specific customer by their IDParametersResponsesTry it in the interactive API explorer.

Discounts

Retrieve a list of all your discount codesResponsesTry it in the interactive API explorer.
Create a new discount codeRequest bodyContent type: application/json Required fields: name, code, value, mainProductIds.ResponsesTry it in the interactive API explorer.
Retrieve a specific discount by its IDParametersResponsesTry it in the interactive API explorer.
Update an existing discount. This is a full update — all listed fields are written to the discount, so send every field you want to keep.ParametersRequest bodyContent type: application/jsonResponsesTry it in the interactive API explorer.
Delete a discount codeParametersResponsesTry it in the interactive API explorer.
PUBLIC (no API key) — used by the checkout. Validates a discount code against a product and returns the discount if it exists, is active, has not expired, and applies to the product. Returns 404 otherwise.ParametersResponsesTry it in the interactive API explorer.
PUBLIC (no API key) — used by the checkout. Returns true if any discount applies to the given product, false otherwise.ParametersResponsesTry it in the interactive API explorer.

Images

Retrieve a list of all your uploaded imagesResponsesTry it in the interactive API explorer.
Upload an image file as multipart/form-data. The file field must be named image. Other field names return 400. Requires authentication.Request bodyContent type: multipart/form-data Required fields: image.ResponsesTry it in the interactive API explorer.
Delete an uploaded imageParametersResponsesTry it in the interactive API explorer.
Retrieve your Link in Bio page configuration and contentResponsesTry it in the interactive API explorer.
Update your Link in Bio page settings and contentRequest bodyContent type: application/jsonResponsesTry it in the interactive API explorer.
Add a new link to your Link in Bio pageRequest bodyContent type: application/json Required fields: title, url.ResponsesTry it in the interactive API explorer.

Orders

Retrieve a list of your one-time product orders, with pagination and filters. Subscription (recurring) transactions are NOT included here — list every payment (one-time and recurring) with GET /payments, and list active subscribers with GET /subscriptions/subscribers.ParametersResponsesTry it in the interactive API explorer.
Retrieve a specific order by its sale/transaction id (the _id of an order returned by GET /orders) — NOT a product id. For a subscription membership and its full payment history, use GET /orders/subscriptions/{id} with the SubscriptionCustomer id.ParametersResponsesTry it in the interactive API explorer.

Partners

Retrieve your partner profile including referral code and denormalized stats.ResponsesTry it in the interactive API explorer.
Register as a Pocketsflow partner. You’ll receive a unique referral code to share. When users sign up using your code, you earn commissions on their sales.ResponsesTry it in the interactive API explorer.
Call this after a user signs up through a partner’s referral link. Sets the referral code on the authenticated user and increments the partner’s signup count.Request bodyContent type: application/json Required fields: referralCode.ResponsesTry it in the interactive API explorer.
List all users who signed up using your referral code. Each user includes their sales count and total revenue.ParametersResponsesTry it in the interactive API explorer.
Get all sales generated by users who signed up through your referral code.ParametersResponsesTry it in the interactive API explorer.
Get live-computed aggregated stats: total signups, total sales, total revenue, and total commission earned based on your commission rate.ResponsesTry it in the interactive API explorer.

Payments

Retrieve a paginated ledger of ALL payments — one-time product purchases AND subscription payments (the initial charge plus every renewal). Filter by type to narrow to one_time or subscription. Every payment is a Sale. Scoped to the authenticated seller and their test/live mode.ParametersResponsesTry it in the interactive API explorer.
Retrieve a single payment (a Sale) scoped to the authenticated seller. Resolves the related product OR subscription offer (subscription payments carry an empty productId), the customer, and a whop block sourced from the stored payments partner payload. Pass ?live=true to additionally fetch the authoritative live payment from the payments partner API as whopLive (degrades gracefully on any error — never fails the request).ParametersResponsesTry it in the interactive API explorer.

Portal

PUBLIC (no API key). Returns everything the native, subscriber portal renders: the subscription offer, the subscriber (with status, cancelAtPeriodEnd, and the payments partner manageUrl fallback), and the full payment history (initial charge + every renewal, newest first). The subscriptionId + subscriptionCustomerId pair is the capability — if the subscriber does not belong to that subscription the endpoint 404s (it never reveals whether either id exists on its own). Data is scoped to the subscriber’s own seller/test-mode, read off the record.ParametersResponsesTry it in the interactive API explorer.
PUBLIC (no API key). Cancels the subscriber’s payments partner membership at the end of the current billing period. On success (or when the payments partner reports an immediate cancellation) the subscriber record is updated — a scheduled cancel sets cancelAtPeriodEnd=true and leaves status active until the payments partner webhook flips it; an immediate cancel sets status=canceled + active=false. If the payments partner call fails it degrades gracefully: the intent is still recorded and manageUrl is returned so the UI can fall back to the payments partner’s own page. Never fails the request on a payments partner error.ParametersResponsesTry it in the interactive API explorer.
PUBLIC (no API key). Reverses a pending cancel (cancel_at_period_end → false) on the subscriber’s payments partner membership. Sets cancelAtPeriodEnd=false (and restores status=active if it had been canceled). Degrades gracefully like cancel — the flag is still cleared and manageUrl is returned if the payments partner call fails.ParametersResponsesTry it in the interactive API explorer.

Posts

Retrieve a list of all your newsletter postsParametersResponsesTry it in the interactive API explorer.
Create a new newsletter postRequest bodyContent type: application/json Required fields: title, content.ResponsesTry it in the interactive API explorer.
Retrieve a specific post by its IDParametersResponsesTry it in the interactive API explorer.
Update an existing post. Posts that have already been sent cannot be edited.ParametersRequest bodyContent type: application/jsonResponsesTry it in the interactive API explorer.
Delete a newsletter postParametersResponsesTry it in the interactive API explorer.
Send a post to all subscribersParametersResponsesTry it in the interactive API explorer.
Send an email to up to 100 recipients programmatically. Requires a verified sender email (configure it in Newsletters → Settings). The email is sent with your standard footer, physical address, and unsubscribe link, and is recorded as a sent post (source: api).Request bodyContent type: application/json Required fields: to, subject.ResponsesTry it in the interactive API explorer.

Products

Retrieve a list of your one-time products. Subscription (recurring) offers are a separate resource — list them with GET /subscriptions.ResponsesTry it in the interactive API explorer.
Create a new digital productRequest bodyContent type: application/json Required fields: name, price.ResponsesTry it in the interactive API explorer.
Retrieve a specific one-time product by its ID. A subscription (recurring) offer’s id 404s here — fetch it with GET /subscriptions/{id} instead.ParametersResponsesTry it in the interactive API explorer.
Delete a one-time product. To delete a subscription (recurring) offer, use DELETE /subscriptions/{id}.ParametersResponsesTry it in the interactive API explorer.
Update an existing one-time product. Send JSON or multipart/form-data. To update a subscription (recurring) offer, use POST /subscriptions/update/{id}.ParametersRequest bodyContent type: application/jsonResponsesTry it in the interactive API explorer.
Duplicate one of your one-time products (or a subscription offer, whichever owns the id) as a NEW item. Send { "testMode": false } to copy a test-mode offer into live mode (“Copy to live”); omit the body to copy within the same mode. The copy gets a deduplicated “Name (Copy)” name and starts unpublished when copied into live mode.ParametersRequest bodyContent type: application/jsonResponsesTry it in the interactive API explorer.

Refunds

Retrieve your refund policies, each with appliedTo — how many products use itResponsesTry it in the interactive API explorer.
Create a refund policy that products can reference by id (refundPolicy). This does NOT refund a payment — refunds are issued from the dashboard.Request bodyContent type: application/jsonResponsesTry it in the interactive API explorer.
Retrieve a refund policy by its ID. Public (no API key): checkout renders it for buyers.ParametersResponsesTry it in the interactive API explorer.

Reviews

Retrieve all reviews across your products, newest first. Filtering is not supported on this endpoint.ResponsesTry it in the interactive API explorer.

Subscribers

Retrieve a list of all your newsletter subscribersResponsesTry it in the interactive API explorer.
Retrieve a specific subscriber by their IDParametersResponsesTry it in the interactive API explorer.
Remove a subscriber from your listParametersResponsesTry it in the interactive API explorer.

Subscriptions

Retrieve a single subscriber (SubscriptionCustomer) by id together with its subscription offer, customer, Stripe subscription/invoices (when applicable), the payment-processor-sourced live status, and payments — every subscription Sale for this membership (the initial charge plus every renewal). {id} is the SubscriptionCustomer _id.ParametersResponsesTry it in the interactive API explorer.
Retrieve all of your subscription OFFERS (the recurring products you sell). To list your subscribers (buyers) instead, use GET /subscriptions/subscribers. Authenticate with an API key or JWT.ResponsesTry it in the interactive API explorer.
Create a recurring subscription offer for the authenticated seller. Accepts JSON for API clients and multipart/form-data when uploading files or images. Pricing is charged in USD while multi-currency is disabled.Request bodyContent type: application/json Required fields: name, price, frequency.ResponsesTry it in the interactive API explorer.
Retrieve a paginated list of your subscribers (buyers with a membership in one of your subscription offers). Each subscriber carries a payment-processor-sourced live status and the joined subscription offer. Scoped to the authenticated seller and their test/live mode.ParametersResponsesTry it in the interactive API explorer.
Retrieve a single subscriber, its subscription offer, the customer record, the payment-processor-sourced live status, and its full payment history (payments = every subscription Sale — the initial charge plus every renewal). Pass ?live=true to additionally fetch the authoritative membership status from the payments partner API as whopMembership (degrades gracefully to the stored status on any payments partner error — never fails the request).ParametersResponsesTry it in the interactive API explorer.
Retrieve a specific subscription OFFER by its ID. Authenticate with an API key or JWT.ParametersResponsesTry it in the interactive API explorer.
Schedules the subscriber’s membership to cancel at the end of the current billing period (same as the subscriber portal). Access continues until then; cancelAtPeriodEnd becomes true. {id} is the subscriber _id or membership id (mem_…) — not a sub_… id.ParametersResponsesTry it in the interactive API explorer.
Pauses payment collection on the subscriber’s membership. The buyer keeps access and is not charged until /resume. If the payments partner refuses, nothing changes (502). {id} is the subscriber _id or membership id (mem_…).ParametersResponsesTry it in the interactive API explorer.
Restarts payment collection on a paused membership, or otherwise reverses a pending cancel-at-period-end (same as the subscriber portal). {id} is the subscriber _id or membership id (mem_…).ParametersResponsesTry it in the interactive API explorer.

Upsells

Retrieve a list of all your upsell configurationsResponsesTry it in the interactive API explorer.
Create a new upsell offerRequest bodyContent type: application/json Required fields: mainProductIds, upsellProductId, upsellPrice.ResponsesTry it in the interactive API explorer.
Retrieve a specific upsell by its IDParametersResponsesTry it in the interactive API explorer.
Update an existing upsell. This is a full update — all listed fields are written to the upsell, so send every field you want to keep.ParametersRequest bodyContent type: application/jsonResponsesTry it in the interactive API explorer.
Delete an upsell offerParametersResponsesTry it in the interactive API explorer.

Webhooks

Retrieve a list of all your webhook endpointsResponsesTry it in the interactive API explorer.
Create a new webhook endpoint to receive eventsRequest bodyContent type: application/json Required fields: url, events.ResponsesTry it in the interactive API explorer.
Retrieve a specific webhook by its IDParametersResponsesTry it in the interactive API explorer.
Update an existing webhookParametersRequest bodyContent type: application/jsonResponsesTry it in the interactive API explorer.
Delete a webhook endpointParametersResponsesTry it in the interactive API explorer.
Send a test event to the webhook endpointParametersResponsesTry it in the interactive API explorer.

Need a typed client?

Use the Pocketsflow Node.js SDK for typed server-side calls, or import /docs.json into your preferred OpenAPI generator.