Pocketsflow

Build on Pocketsflow.

Open a checkout from your own app and hear about every order through a signed webhook. Pocketsflow stays the Merchant of Record on every sale, so tax and payouts are handled for you.

Let your agents run and grow your business. Sign in, click Allow, no API key.

One API, one SDK, signed webhooks.

Open a checkout from your own app, then hear about every order, refund and subscription change through a signed webhook. One SDK, one base URL, live and test data kept apart.

import { Pocketsflow } from "pocketsflow";

const pf = new Pocketsflow({
  apiKey: process.env.POCKETSFLOW_API_KEY,
});

// A one time product. Use subscriptionOffers.create() for plans.
const product = await pf.products.create({
  name: "Pro license",
  price: 49,
});

// A hosted checkout for that product.
const session = await pf.checkout.create({
  productId: product._id,
  successUrl: "https://example.com/welcome",
  customerEmail: "buyer@example.com",
});

// Send the buyer to session.url. Payment, tax, and delivery
// are handled; order.completed fires to your webhook.
redirect(session.url);

19 webhook events, HMAC-SHA256 signedpayloads →

  • order.completed
  • order.refunded
  • customer.created
  • product.created
  • product.updated
  • product.deleted
  • review.created
  • customer.subscription.created
  • customer.subscription.updated
  • customer.subscription.pause
  • customer.subscription.resumed
  • customer.subscription.trial_will_end
  • customer.subscription.deleted
  • invoice.created
  • invoice.upcoming
  • invoice.payment_succeeded
  • invoice.payment_failed
  • payment_intent.succeeded
  • payment_intent.payment_failed

Every sale, on your server in real time.

Pocketsflow signs each event and posts it to your URL. Verify the signature, read the payload, answer 200. Fulfil, provision and sync from there.

Webhook docs
Your store
Just now
A buyer paid $10.00order.completed
Webhooks
  • Sign with your secret
  • POST to your URL
X-Pocketsflow-Signature-V2
your server

$ listening on /webhooks/pocketsflow

POST /webhooks/pocketsflow X-Pocketsflow-Event: order.completed

signature verified (HMAC-SHA256)

{
  "id": "evt_5f1c2a9b3e4a0012abcd0d0e",
  "type": "order.completed",
  "created": 1767225600,
  "amount": 1000,
  "currency": "usd",
  …
}

200 OK

Fulfil the order and grant access

The documented events, headers and payload fields. The ids are the docs' example ids.

for developersAny MCP client, local server, headless and CI

The hosted server speaks streamable HTTP with OAuth 2.1 (PKCE, dynamic client registration), so any MCP client that supports OAuth only needs the URL. Without a browser to sign in from, run the local server with a live or test API key from Developers → API keys.

{
  "mcpServers": {
    "pocketsflow": {
      "url": "https://www.pocketsflow.com/mcp"
    }
  }
}
{
  "mcpServers": {
    "pocketsflow": {
      "command": "npx",
      "args": ["-y", "@pocketsflow/mcp"],
      "env": {
        "POCKETSFLOW_API_KEY": "pk_live_..."
      }
    }
  }
}
npx skills add \
  Pocketsflow/pocketsflow-imperium@pocketsflow

Open your store today.

Sell your first product in minutes, keep more of every sale, and let the AI you already use run the busywork.

Or start from the AI you already use