users.update and variants) call routes that are not in the public contract yet; see the SDK reference.
Interactive API explorer
/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_...orAuthorization: Bearer pk_test_... - JSON requests use
Content-Type: application/json; image uploads usemultipart/form-data. - IDs are usually MongoDB ObjectId strings. Processor IDs such as
sub_...,plan_...,pay_..., andmem_...retain their provider prefixes.
Account
GET /users/me
GET /users/me
Checkout
POST /checkout/sessions
POST /checkout/sessions
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.Customers
GET /customers
GET /customers
numberOfOrders). Optionally filter by product and sort. The full list is returned — this endpoint is not paginated.ParametersGET /customers/{id}
GET /customers/{id}
Discounts
GET /discounts
GET /discounts
POST /discounts
POST /discounts
application/json
Required fields: name, code, value, mainProductIds.GET /discounts/{id}
GET /discounts/{id}
POST /discounts/{id}
POST /discounts/{id}
application/jsonDELETE /discounts/{id}
DELETE /discounts/{id}
GET /discounts/apply/{discountCode}/{productId}
GET /discounts/apply/{discountCode}/{productId}
GET /discounts/check-product/{productId}
GET /discounts/check-product/{productId}
true if any discount applies to the given product, false otherwise.ParametersImages
GET /images
GET /images
POST /images
POST /images
image. Other field names return 400. Requires authentication.Request bodyContent type: multipart/form-data
Required fields: image.DELETE /images/{id}
DELETE /images/{id}
Link in Bio
GET /creator-pages
GET /creator-pages
POST /creator-pages
POST /creator-pages
application/jsonPOST /creator-pages/links
POST /creator-pages/links
application/json
Required fields: title, url.PUT /creator-pages/links/{id}
PUT /creator-pages/links/{id}
application/jsonDELETE /creator-pages/links/{id}
DELETE /creator-pages/links/{id}
Orders
GET /orders
GET /orders
GET /payments, and list active subscribers with GET /subscriptions/subscribers.ParametersGET /orders/{id}
GET /orders/{id}
_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.ParametersPartners
GET /partners
GET /partners
POST /partners
POST /partners
POST /partners/register-referral
POST /partners/register-referral
application/json
Required fields: referralCode.GET /partners/referrals
GET /partners/referrals
GET /partners/referrals/sales
GET /partners/referrals/sales
GET /partners/stats
GET /partners/stats
Payments
GET /payments
GET /payments
type to narrow to one_time or subscription. Every payment is a Sale. Scoped to the authenticated seller and their test/live mode.ParametersGET /payments/{id}
GET /payments/{id}
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).ParametersPortal
GET /subscriptions/sub/portal-data/{subscriptionId}/{subscriptionCustomerId}
GET /subscriptions/sub/portal-data/{subscriptionId}/{subscriptionCustomerId}
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.ParametersPOST /subscriptions/sub/portal/{subscriptionCustomerId}/cancel
POST /subscriptions/sub/portal/{subscriptionCustomerId}/cancel
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.ParametersPOST /subscriptions/sub/portal/{subscriptionCustomerId}/resume
POST /subscriptions/sub/portal/{subscriptionCustomerId}/resume
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.ParametersPosts
Products
GET /products
GET /products
GET /subscriptions.ResponsesPOST /products
POST /products
application/json
Required fields: name, price.GET /products/{id}
GET /products/{id}
GET /subscriptions/{id} instead.ParametersDELETE /products/{id}
DELETE /products/{id}
DELETE /subscriptions/{id}.ParametersPOST /products/update/{id}
POST /products/update/{id}
POST /subscriptions/update/{id}.Parametersapplication/jsonPOST /products/copy/{id}
POST /products/copy/{id}
{ "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.Parametersapplication/jsonRefunds
GET /refunds
GET /refunds
appliedTo — how many products use itResponsesPOST /refunds
POST /refunds
refundPolicy). This does NOT refund a payment — refunds are issued from the dashboard.Request bodyContent type: application/jsonGET /refunds/{id}
GET /refunds/{id}
Reviews
GET /reviews
GET /reviews
Subscribers
Subscriptions
GET /orders/subscriptions/{id}
GET /orders/subscriptions/{id}
status, and payments — every subscription Sale for this membership (the initial charge plus every renewal). {id} is the SubscriptionCustomer _id.ParametersGET /subscriptions
GET /subscriptions
GET /subscriptions/subscribers. Authenticate with an API key or JWT.ResponsesPOST /subscriptions
POST /subscriptions
application/json
Required fields: name, price, frequency.GET /subscriptions/subscribers
GET /subscriptions/subscribers
status and the joined subscription offer. Scoped to the authenticated seller and their test/live mode.ParametersGET /subscriptions/subscribers/{id}
GET /subscriptions/subscribers/{id}
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).ParametersGET /subscriptions/{id}
GET /subscriptions/{id}
POST /subscriptions/{id}/cancel
POST /subscriptions/{id}/cancel
cancelAtPeriodEnd becomes true. {id} is the subscriber _id or membership id (mem_…) — not a sub_… id.ParametersPOST /subscriptions/{id}/pause
POST /subscriptions/{id}/pause
/resume. If the payments partner refuses, nothing changes (502). {id} is the subscriber _id or membership id (mem_…).ParametersPOST /subscriptions/{id}/resume
POST /subscriptions/{id}/resume
{id} is the subscriber _id or membership id (mem_…).ParametersUpsells
GET /upsells
GET /upsells
POST /upsells
POST /upsells
application/json
Required fields: mainProductIds, upsellProductId, upsellPrice.GET /upsells/{id}
GET /upsells/{id}
POST /upsells/{id}
POST /upsells/{id}
application/jsonDELETE /upsells/{id}
DELETE /upsells/{id}
Webhooks
GET /webhooks
GET /webhooks
POST /webhooks
POST /webhooks
application/json
Required fields: url, events.GET /webhooks/{id}
GET /webhooks/{id}
PATCH /webhooks/{id}
PATCH /webhooks/{id}
application/jsonDELETE /webhooks/{id}
DELETE /webhooks/{id}
POST /webhooks/{id}/test
POST /webhooks/{id}/test
Need a typed client?
Use the Pocketsflow Node.js SDK for typed server-side calls, or import/docs.json into your preferred OpenAPI generator.