- The HTTP API — to create checkout sessions and read/write data.
- Webhooks — to react when something happens (a sale completes, a subscription renews, a refund is issued).
The building blocks
API keys
Authenticate server-to-server with a
pk_live_… / pk_test_… key.Checkout sessions
POST /checkout/sessions returns a hosted URL to redirect buyers to.Webhooks
Subscribe to events like
order.completed and customer.created.Metadata
Attach your own IDs so you can correlate Pocketsflow orders with yours.
The standard pattern
Almost every “sell through my own store / platform” integration follows the same five steps:Create an API key
In the dashboard, go to Developers → API keys and create a key. Store it
as a secret on your server.
Map your products to Pocketsflow products
Each item you sell maps to a Pocketsflow
productId. Create products in the
dashboard or via POST /products, and store the resulting productId
alongside your own product records.Create a checkout session at purchase time
When a buyer checks out, call
POST /checkout/sessions with the productId,
your successUrl / cancelUrl, and a metadata object containing your
order id. Redirect the buyer to the url you get back.Let the buyer pay on Pocketsflow
Pocketsflow hosts the checkout and handles payment, tax, and receipts. After
payment the buyer is redirected to your
successUrl.Why metadata matters
Themetadata you pass when creating a checkout session is echoed back on
the resulting order and in every related webhook payload. This is how you
correlate a Pocketsflow order with the order in your own system — without it,
you’d have no reliable way to know which of your orders a webhook refers to.
Pick a guide
WooCommerce
A complete, step-by-step WooCommerce integration with PHP examples.
Any other platform
The generic redirect + webhook pattern, with Node and PHP examples.