Skip to main content
Base URL https://api.pocketsflow.com. Authenticate with your API key (Authorization: Bearer pk_live_… or pk_test_…). Turning a feature on needs the Growth plan (403 FEATURE_LOCKED below it); turning it off, deleting and reading never do. When a store moves below Growth, its products go back to their list prices.

How a price is worked out

One rule, on our server, for the product page, the checkout, the receipt, the order and the order.completed webhook:
  1. Price in effect — the lowest of the product’s price (or the variant’s), the early-bird step’s price while a step is open, and the buyer’s own personal-deadline offer. On a tie the early-bird step wins.
  2. At most one discount, the best for the buyer — among the live flash sales, fair pricing for the buyer’s country and the code they entered (a discount code or a unique coupon), taken off the price in effect. Discounts never stack with each other. Ties: the code, then the flash sale, then fair pricing.
  3. Limits — flash sales and fair pricing never take a price under 1.00 or make an order free; a code can (a 100% code is a free order, as before).
Pay-what-you-want products and subscriptions are not repriced.

Flash sales

The response is the sale with status (scheduled, live, ended, computed from the clock), stats: { sales, revenue } and announcementPostId. The announcement endpoint answers { postId, created }: review the draft, then send or schedule it with the newsletter endpoints.

Fair pricing

Tiers hold the countries whose prices are 58–72% (t1), 45–58% (t2), 33–45% (t3) and under 33% (t4) of US prices. A country exception wins over its tier; 0 means full price. Percents are whole numbers from 0 to 80. The buyer’s country is the country of their IP, worked out on our server. The discount applies only when the browser time zone (tz) belongs to that country and any billing country sent at checkout is the same. After payment, the billing country collected is compared again: a mismatch is recorded on the order as pricing.fairPricing.verified: false.

Early-bird price steps

Up to 5 steps, each below the product’s price, with maxSales, endsAt or both; prices go up from step to step. Send back the step ids you received to keep their counts when you edit. Steps need a fixed price and no variants. Seats are taken atomically when a checkout starts and held for 20 minutes, so concurrent buyers never oversell a step; an unpaid seat goes back on sale. A buyer who pays after their hold expired was shown and charged the step price, so the sale is honoured and counted (a step can end one over its limit only through payments that were already in flight).

The buyer’s price (public)

GET /pricing/quote/{productId}?tz=Asia/Kolkata — no API key, never cached. Optional variantId, discountId, billingCountry, orderBumpIds.
Amounts are in your currency. The checkout charges this same price. Add orderBumpIds (comma-separated) to price the whole cart the way the checkout does: each order bump at its offer price, then the Buy more, save more tier off the subtotal (not on top of a discount code unless you allow it). The answer gains cart:
total is what the checkout charges before tax; each item’s price is its share after the tier, as recorded on its order.

Orders and webhooks

Every order priced by these rules carries pricing (also in the order.completed webhook):

Errors

MCP

list_flash_sales, create_flash_sale, get_flash_sale, update_flash_sale, delete_flash_sale, create_flash_sale_announcement, get_fair_pricing, update_fair_pricing, get_fair_pricing_analytics, list_price_steps, get_product_launch_pricing, set_product_price_steps, set_product_fair_pricing, get_price_quote.