API reference

Base URL https://swipefast.jacob-98c.workers.dev · every request takes Authorization: Bearer <key> · responses are JSON.

Products

GET/api/v1/products

List your products

Every product on your account, with its price, address and status.

Request
curl https://swipefast.jacob-98c.workers.dev/api/v1/products \
  -H "Authorization: Bearer $KEY"
Response
{
  "data": [
    {
      "id": "prd_a1b2c3",
      "name": "The Launch Playbook",
      "slug": "launch-playbook",
      "price_cents": 9900,
      "currency": "usd",
      "pricing_type": "onetime",
      "billing_interval": null,
      "status": "live"
    }
  ]
}

pricing_type is onetime or subscription; subscriptions also carry billing_interval (month or year).

GET/api/products/{productId}/funnel

Get a product's whole funnel

The add-ons, upsells and every post-purchase email attached to one product.

Path
productIdstringrequiredThe product's id, from List your products.
Request
curl https://swipefast.jacob-98c.workers.dev/api/products/PRODUCT_ID/funnel \
  -H "Authorization: Bearer $KEY"
Response
{
  "bumps": [
    {
      "id": "bmp_1",
      "headline": "Add the Swipe File Vault — $27",
      "price_cents": 2700,
      "active": 1
    }
  ],
  "upsells": [
    {
      "id": "ups_1",
      "headline": "Upgrade to the full implementation call",
      "price_cents": 20000,
      "active": 1
    }
  ],
  "downsells": [],
  "emails": [
    {
      "position": 1,
      "send_day": 0,
      "subject": "You're in — here's your access",
      "body": "…"
    }
  ]
}

Works with your key or a signed-in dashboard session.

Orders

GET/api/v1/orders

List your orders

Your latest 100 orders, newest first, each with its line items. Test orders are never included.

Request
curl https://swipefast.jacob-98c.workers.dev/api/v1/orders \
  -H "Authorization: Bearer $KEY"
Response
{
  "data": [
    {
      "id": "ord_x1y2z3",
      "product_id": "prd_a1b2c3",
      "customer_email": "buyer@example.com",
      "customer_name": "Alex Buyer",
      "total_cents": 12600,
      "currency": "usd",
      "status": "paid",
      "utm_source": "newsletter",
      "utm_campaign": "july-launch",
      "created_at": "2026-07-20T14:03:22.181Z",
      "items": [
        {
          "kind": "main",
          "label": "The Launch Playbook",
          "amount_cents": 9900
        },
        {
          "kind": "bump",
          "label": "Add the Swipe File Vault — $27",
          "amount_cents": 2700
        }
      ]
    }
  ]
}

status is paid, refunded, or authorized (card held while the buyer decides on an upsell).

items[].kind is main, bump, upsell, or discount (discounts are negative). downsell appears only on orders taken before downsells were retired.

Orders carry the campaign that produced them: utm_source, utm_medium, utm_campaign, utm_term, utm_content.

POST/api/v1/orders

Record an order

Create an order from your own code — an external checkout, an import, an automation. It settles immediately.

Body (JSON)
productSlugstringrequiredThe product's slug, from List your products.
emailstringrequiredThe buyer's email.
namestringThe buyer's name.
bumpIdsstring[]Ids of add-ons to include.
affiliateCodestringCredit this partner with the sale.
Request
curl -X POST https://swipefast.jacob-98c.workers.dev/api/v1/orders \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"productSlug":"launch-playbook","email":"buyer@example.com","name":"Alex Buyer"}'
Response
{
  "ok": true,
  "orderId": "ord_x1y2z3",
  "totalCents": 9900
}

Fires the order.paid webhook and any matching automations, exactly like a checkout sale.

Analytics

GET/api/metrics/{productId}

Get a product's numbers

Revenue, orders, average order, add-on and upsell rates, refunds — plus monthly series for charts.

Path
productIdstringrequiredThe product's id.
Request
curl https://swipefast.jacob-98c.workers.dev/api/metrics/PRODUCT_ID \
  -H "Authorization: Bearer $KEY"
Response
{
  "product": {
    "id": "prd_a1b2c3",
    "name": "The Launch Playbook",
    "pricingType": "onetime"
  },
  "summary": {
    "revenueCents": 2313900,
    "orders": 230,
    "aovCents": 100600,
    "bumpTakeRate": 21,
    "upsellTakeRate": 8,
    "activeSubscriptions": 0,
    "mrrCents": 0,
    "refunds": 3,
    "refundedCents": 29900,
    "refundRate": 1.3,
    "views": 4100,
    "conversionRate": 5.6,
    "customers": 224
  },
  "revenueByMonth": [
    {
      "month": "2026-06",
      "value": 412300
    }
  ],
  "mrrByMonth": [],
  "churnByMonth": []
}

mrrByMonth and churnByMonth are filled for subscription products only.

Test orders never count.

Scheduled

POST/api/cron/daily

Run the daily collections job

Charges subscription renewals that have come due, retries declined cards, nudges checkouts that stalled, and settles payment holds a buyer never finalised. Point a once-a-day schedule at this — nothing else calls it.

Request
curl -X POST https://swipefast.jacob-98c.workers.dev/api/cron/daily \
  -H "Authorization: Bearer $KEY"
Response
{
  "ok": true,
  "rebills": {
    "charged": 12,
    "chargedCents": 58800,
    "retried": 1,
    "canceled": 0
  },
  "recovery": {
    "sent": 3,
    "recovered": 1
  },
  "holdsSettled": 2
}

Safe to run more than once a day — nothing is charged twice and a buyer is only ever nudged once.