Skip to main content
Pocketsflow Enterprise runs a white-label workspace of sellers (sub-accounts) under your brand. The Enterprise API reads that workspace and controls it: list sellers, pause selling, hold payouts, approve or reject withdrawals, read sales, buyers and earnings, change every setting, receive signed webhooks and let AI agents work through MCP. It is everything in the Enterprise Admin, over HTTP. New to Enterprise? Start with the overview and the quickstart.

Interactive reference

The Enterprise API on its own page, with a try-it console.

Webhooks

Signed events to your servers.

AI agents (MCP)

Every endpoint as an agent tool.
The OpenAPI document is at https://api.pocketsflow.com/enterprise/docs.json: generate a client in any language from it. Base URL https://api.pocketsflow.com, every path under /v1/enterprise.

Authentication

The Enterprise API takes an enterprise API key (ek_live_...). It is a different key from the creator keys (pk_live_..., pk_test_...): a creator key gets 401 here. An owner of your workspace creates keys in the Enterprise Admin, under Settings > API keys (up to 20 active keys). The full key is shown once, when it is created; store it as a secret. Revoke a key there to stop it. Send it as a bearer token:
  • Every call only sees your own workspace. A seller or withdrawal of another workspace answers 404, never someone else’s data.
  • A suspended workspace answers 403 tenant_suspended.
  • Actions taken with a key go to your workspace’s audit log as that key (decidedBy on a withdrawal is api_key:<id>).
  • Rate limit: 200 requests per minute per IP (429 above it).

Conventions

Node.js SDK

The pocketsflow package has an enterprise namespace (3.13.0 covers every endpoint on this page). Pass the enterprise key as apiKey:

Workspace

Get your workspace

GET /v1/enterprise/workspace: your name, account prefix, hosts, brand, SEO, features, seller-app layout, fees and withdrawal default, in one answer. The settings PUTs below answer this same shape.

Get the overview

GET /v1/enterprise/overview?range=30d (7d, 30d, 90d or 12m): the Overview page’s numbers. The answer is cached for a minute.

Sub-accounts

List sub-accounts

GET /v1/enterprise/subaccounts: your sellers, newest first, with lifetime volume.
verification is none (payouts not set up), pending, verified or rejected. volumeUsd and transactions count live paid sales, refunds excluded. balanceUsd is not loaded in lists (always null): read the balance endpoint below.

Get a sub-account

GET /v1/enterprise/subaccounts/{userId}: the seller’s profile, stats, payout account, last 10 sales and last 10 withdrawal requests.
partner is { "error": "..." } instead when the seller hasn’t set up payouts or the payouts provider can’t be reached. partner.status is active, held (you hold payouts), paused (selling paused) or under_review. recentTransactions and withdrawals use the shapes of transactions and withdrawals.

List a sub-account’s products

GET /v1/enterprise/subaccounts/{userId}/products: the seller’s live products, newest first, with their paid sales. Takes page and pageSize.

Get a sub-account’s balance

GET /v1/enterprise/subaccounts/{userId}/balance: available and pending money per currency, read live from the payouts provider.
When payouts aren’t set up or the provider can’t be reached, the answer is { "userId": "...", "error": "..." } (still 200).

Pause, resume, hold and release

The body is optional: { "reason": "Chargeback review" } (at most 500 characters) is kept in your audit log. Each answers the updated sub-account row (the shape of the list above). Repeating an action changes nothing.
unpause only lifts a pause you made. When the platform holds the account (a risk review, a ban), it answers 409 platform_hold and the seller stays paused.

List a sub-account’s payouts

GET /v1/enterprise/subaccounts/{userId}/payouts?limit=10 (at most 25): the seller’s bank accounts and latest payouts, read live from the payouts provider. It includes payouts that didn’t need your approval.
As with the balance, { "userId", "error" } (still 200) when payouts aren’t set up or the provider can’t be reached.

Withdrawal approval per seller

PUT /v1/enterprise/subaccounts/{userId}/withdrawal-approval with { "mode": "default" | "required" | "auto" }: Answers the sub-account row, with withdrawalApproval (the mode) and approvalRequired (what applies now).

Settings

Every setting of the Enterprise Admin. A PUT changes only what you send and lands in your audit log.

Fees

GET /v1/enterprise/settings/fees:
Rates are fractions (0.01 is 1%).
  • Pocketsflow’s fee per sale is cardCheckoutRate, fixed by your agreement. Your fee per sale is tenantMarkupRate, on top: PUT it from 0 to 0.2. It applies from the next checkout. Sellers pay both, plus card processing.
  • Pocketsflow’s withdrawal fee is withdrawalRate × amount and withdrawalMinUsd, whichever is lower (the flat amount is a cap) or higher (a minimum), per withdrawalFeeRule. Set in your agreement; the API can’t change it.
  • Your withdrawal fee is tenantWithdrawalRate × amount + tenantWithdrawalFixedUsd, on top. PUT it with either or both fields: the rate from 0 to 0.1, the fixed amount from 0 to 100. Any other field answers 400: our rates are fixed. It applies to the next withdrawal request.
Send only the fields you change. With the fees above, a $100 sale pays $3.00 ($1.00 to Pocketsflow, $2.00 to you) and a $1,000 withdrawal pays $11.00 ($5.00 to Pocketsflow, $6.00 to you). See Fees and limits.

Payments partner API

Call the payments partner’s own REST API for your sub-accounts, through us: we add our credentials, you never need them, and every call is limited to your own accounts.
  • The path after /partner/live/ (or /partner/sandbox/ for the sandbox) is the partner’s /api/v1/ path. The answer is the partner’s, as is.
  • A sub-account’s id is partnerAccountId (partnerSandboxAccountId for the sandbox) on the sub-account row.
  • Lists need company_id set to one of your sub-accounts (payouts: account_id). A resource id (a payment, product, membership…) must belong to one of them, and a body may only name your accounts and products. Anything else answers 404, like something that doesn’t exist.
  • Routes: the account (accounts/{id}) and its ledger, account links, payments (read, refund, void, retry, fees), refunds, disputes (read, evidence), products and promo codes (read, create, update, delete), checkout configurations, invoices (list), memberships (read, update, cancel, pause, resume, extend), members, payouts and payout methods (read only). Any other route answers 404.
  • Withdrawals are never sent through the proxy: they go through your approval flow (/v1/enterprise/withdrawals).
  • 120 calls a minute per key. Every write is in your audit log (partner.call).

Transactions

List transactions

GET /v1/enterprise/transactions: every live sale across your sellers, newest first, with the platform fee split between Pocketsflow and you.
amount is what the buyer paid, in currency. tenantFeeUsd is your share of the platform fee.

Get a transaction

GET /v1/enterprise/transactions/{id}: the row above, plus:

Export transactions

GET /v1/enterprise/transactions/export.csv with the list’s filters (search, status, userId, from, to): a CSV file of every match.

Customers

Your sellers’ buyers. A buyer of two of your sellers is two customers, one per seller.

List customers

GET /v1/enterprise/customers, newest first.

Get a customer

GET /v1/enterprise/customers/{id}: the row above, with stats (purchases, refunds, spentUsd, firstPurchaseAt, lastPurchaseAt) and purchases: their transactions with that seller, newest first (up to 100).

Withdrawals

When your workspace approves withdrawals, a seller’s request to withdraw waits for you as a pending withdrawal. Approving it pays it out to the seller’s own saved bank; rejecting it keeps the money in their balance.

List withdrawals

GET /v1/enterprise/withdrawals, newest first.
feeUsd is the whole fee the seller pays: pocketsflowFeeUsd plus tenantFeeUsd (your own fee). feeCollected turns true once the fee is taken from the seller’s balance.

Get a withdrawal

GET /v1/enterprise/withdrawals/{id}: the row above, with destination (the seller’s bank, e.g. Chase •• 6789) and payoutId once paid.

Approve a withdrawal

POST /v1/enterprise/withdrawals/{id}/approve, no body. Answers the withdrawal: paid, or failed with a reason when the bank transfer didn’t go through. Approving is safe to repeat: a request is paid out at most once. Approving a paid or failed request again answers it as it stands.

Reject a withdrawal

POST /v1/enterprise/withdrawals/{id}/reject with an optional { "reason": "Duplicate request" } (at most 500 characters, kept on the request and in your audit log). Answers the withdrawal (rejected). Rejecting twice changes nothing; a request already approved answers 409 not_pending.

Earnings

List your earnings

GET /v1/enterprise/earnings: your markup on every paid sale of your sellers, a negative line for each refund, and Pocketsflow’s settlements with you.
  • totals cover the range: accruedUsd is every line, settledUsd the lines in a paid settlement, unsettledUsd the rest.
  • kind is sale (your cut of the sale’s USD net before tax), refund (the same amount, negative) or withdrawal_fee (your part of a paid withdrawal’s fee; saleId is wd_<withdrawal id>). A refund after its sale was settled lands in the next settlement.
  • settlements lists your settlements newest first, whatever the range. method is netted (against the monthly invoice), transfer or wire.

Export earnings

GET /v1/enterprise/earnings/export.csv?from=&to=: your earning lines as a CSV file.

Webhooks

Signed POSTs to your servers when something happens. How to receive and verify them: Webhooks. Events: subaccount.created, sale.paid, sale.refunded, withdrawal.requested, withdrawal.paid, withdrawal.failed, withdrawal.rejected (* for all). URLs must be public https:// hosts.

Audit log

GET /v1/enterprise/audit (page, pageSize), newest first: every change in your workspace, by an admin, an API key or Pocketsflow.

MCP

POST /v1/enterprise/mcp is a Model Context Protocol server (Streamable HTTP, JSON-RPC 2.0) with every endpoint above as a tool, for AI agents. Use your enterprise key as the bearer token. See AI agents (MCP).

Errors

In the SDK, every error is a PocketsflowError with status, code and message from the answer.