overflowDocs
Dashboard
DocumentationAPI reference

Get started

  • Introduction
  • Quickstart
  • Integrate with AI
  • Agents (MCP)
  • Selling

Payments

  • Checkout
  • Loader
  • Webhooks

Risk and privacy

  • Fraud gate
  • Dispute evidence
  • Privacy
  • Dashboard
  • Sign in

API reference

  • API reference
    • Server library
    • Versioning
    • Authentication
    • Errors
    • Idempotency
    • The checkout object
    • Create a checkout
    • Retrieve a checkout
    • List checkouts
    • Refund a checkout
    • Refunds
    • Expire a checkout
    • Add an event
    • List events
    • Products
    • Discount codes
    • Customers
    • Subscriptions
    • List disputes
  • Changelog

API reference

API reference

The API is plain JSON over HTTPS. The base address is:

https://overflowpay.net/api/v1

A machine-readable version lives at /openapi.json.

Server library

overflow-node.mjs is one file with no dependencies, for Node 18 and later, Bun and Deno. Copy it into your project.

import {Overflow,verifyWebhook} from "./overflow-node.mjs"

const ovf = new Overflow(process.env.OVERFLOW_SECRET_KEY,"https://overflowpay.net")
const co = await ovf.checkouts.create({items:[{name:"Poster",amount:1900}],currency:"eur"})
const ok = verifyWebhook(rawBody,request.headers,process.env.OVERFLOW_WEBHOOK_SECRET)

Every resource below has a matching method, such as ovf.products.list() or ovf.subscriptions.cancel(id). A POST gets an Idempotency-Key by itself, and a 429 or 5xx answer is retried twice with the same key. A failed call throws an OverflowError with code, status and requestId.

Versioning

Every answer carries an overflow-version header with the date of the API it follows, currently 2026-12-05. New fields and new endpoints can appear at any time, so ignore fields you don't know. A change that could break an integration gets a new date and an entry in the changelog.

Authentication

Send your store's secret key as a bearer token on every request.

curl https://overflowpay.net/api/v1/checkouts \
  -H "Authorization: Bearer $OVERFLOW_SECRET_KEY"

A key belongs to one store. Create and revoke keys under Developers in the dashboard, give each a label, and make it read-only if it only needs to look things up : a read-only key gets 403 read_only_key on anything that changes data. Call the API from your server only.

Once the Overflow you use runs on live keys it may also offer test keys. A checkout made with one takes Stripe's test cards, such as 4242 4242 4242 4242, shows a test badge, and moves no money. A test key only sees test objects and a live key only live ones, so a test key can't refund a real payment. Every object and every webhook carries livemode, so one endpoint can tell them apart.

Every answer carries a request-id header. Errors carry the same id as request_id, so quote it when you ask about a request. Answers also say how much of the rate limit is left : ratelimit-limit (300 a minute per store) and ratelimit-remaining, plus retry-after on a 429.

Errors

A failed request returns a matching HTTP status and a body like this:

{"error": {"code": "invalid_items", "message": "items[0].amount must be an integer in the smallest currency unit (cents)", "request_id": "req_..."}}

Branch on code. The message is written for a developer to read and may change. When one field is at fault, field names it.

StatusCodeMeaning
400invalid_json, invalid_items, invalid_currency, invalid_amount, invalid_email, invalid_return_url, invalid_metadata, invalid_type, invalid_expires_inSomething in the request body is wrong. The message says what.
400amount_too_smallThe total is below the smallest amount Stripe charges in that currency.
401unauthorizedThe key is missing, mistyped or revoked.
403read_only_keyThis key can only read.
403store_pendingThe person who runs Overflow hasn't approved your store yet.
403store_suspendedYour store is suspended and can't take payments.
403limit_exceededThe checkout is above your store's limit for one payment, a day or 30 days. Ask the person who runs Overflow to raise it.
404not_foundNo such checkout in this store.
409store_not_readyYour store hasn't finished payout setup under Settings → Payouts, so it can't take payments yet.
409not_refundableOnly paid checkouts can be refunded.
409not_openOnly an open checkout can be expired.
409idempotency_mismatchThis Idempotency-Key was already used with a different request.
409idempotency_in_progressA request with this key is still running. Try again in a moment.
400invalid_cursorstarting_after isn't an object from that list.
400invalid_reasonThe refund reason isn't one of the three allowed.
409idempotency_key_reusedThis key made a checkout more than a day ago. Use a new key.
429rate_limitedToo many requests. Wait a moment.
500internalSomething broke on Overflow's side. Try again later.
502stripe_errorStripe refused the request. The message is Stripe's.
502platform_misconfiguredStripe refused this Overflow's own key, for example because it lacks a permission. Nothing is wrong with your request. Tell the person who runs Overflow.
503stripe_not_configuredPayments aren't set up on Overflow yet. Tell the person who runs it.

Idempotency

Every POST accepts an Idempotency-Key header, like your own order id or a random UUID. Sent again within 24 hours with the same body, the request isn't run a second time : you get the first answer back, with an idempotent-replayed: true header. That makes a retry after a timeout safe, including for refunds. The same key with a different body gets 409 idempotency_mismatch.

For POST /checkouts the key is also stored on the checkout, so two requests racing with one key still make one checkout. After a day the key can't make another checkout : send a new one.

The checkout object

{
  "id": "co_xv6nGkF6H2cYxIVmtfiI6M6l",
  "object": "checkout",
  "status": "paid",
  "amount": 1900,
  "currency": "eur",
  "items": [{"name": "Pro license", "amount": 1900, "quantity": 1, "description": "1 year"}],
  "customer_email": "buyer@example.com",
  "return_url": "https://yoursite.com/thanks",
  "metadata": {"order": "1001"},
  "url": "https://overflowpay.net/pay/co_xv6nGkF6H2cYxIVmtfiI6M6l",
  "risk": {
    "verdict": "allow",
    "score": 0,
    "reasons": [],
    "radar_level": "normal",
    "radar_score": null,
    "three_d_secure": "authenticated"
  },
  "refunded_amount": 0,
  "created": 1796435758,
  "paid_at": 1796435820,
  "expires_at": 1796522158
}
FieldNotes
statusopen, processing, paid, trialing, blocked, failed, expired, refunded or disputed. trialing : a subscription with a free trial started, and nothing was charged yet. See Checkout.
amountThe total in the smallest currency unit: the sum of each item's amount times its quantity.
urlThe full-page checkout. Send the buyer here or open it with the loader.
risk.verdictallow, challenge (3D Secure was forced) or block. null until the buyer opens the checkout.
risk.scoreThe gate's score from 0 to 100.
risk.reasonsThe signals that added points, such as vpn or webdriver.
risk.radar_levelStripe Radar's level for the payment: normal, elevated or highest.
risk.radar_scoreRadar's numeric score. Only present if the Stripe account's plan exposes it.
risk.three_d_secureThe 3D Secure outcome, such as authenticated, or null if it wasn't used.
kindpayment, subscription for the checkout that starts one, or renewal for each later period.
discountWhat a code took off, already left out of amount.
product, subscriptionThe product it was made from, and the subscription it belongs to. null otherwise.
shipping{"name", "address"} for a product that ships, once paid.
fee, reserve, netOnce paid : the platform fee, the part held back for a while before it is sent to you, and what is yours after refunds. null before.
refunded_amountWhat was refunded so far.
TimestampsSeconds since 1970, UTC.

Create a checkout

POST /checkouts
Body fieldTypeNotes
itemsarray, required unless you send product1 to 50 objects with name (string), amount (integer), quantity (integer, 1 to 999, default 1) and description (string, optional).
currencystring, required unless you send productLowercase ISO code, one of usd, eur, gbp, aud, cad, chf, nzd, sgd, hkd, jpy, dkk, nok, sek, pln, czk, ron, bgn, mxn, brl, inr, myr, thb or aed. The total must be at least what Stripe charges in that currency, such as 0.50 in usd or eur.
customer_emailstringPrefills the buyer's email.
return_urlstringWhere the buyer goes after paying. ?checkout_id=... is added.
metadataobjectUp to 20 keys, values are stored as strings.
expires_inintegerSeconds the buyer has to pay, 1800 to 86400. Default 86400, a day.
productstringA product id. Its price, files, keys and shipping apply, and items and currency are ignored. A subscription product starts a subscription.
quantityintegerWith product : how many, up to its quantity_max. The buyer can still change it on the checkout.

Returns the checkout object with status open. Once expires_at passes it reads as expired, and a checkout.expired webhook follows.

Retrieve a checkout

GET /checkouts/{id}

Returns the checkout object.

List checkouts

GET /checkouts?limit=20&status=paid&starting_after=co_...
QueryNotes
limit1 to 100, default 20.
statusOnly checkouts with this status.
starting_afterA checkout id. Returns the ones created before it.

Newest first. The response is {"object": "list", "data": [...], "has_more": true}. To page, pass the last id you received as starting_after until has_more is false.

Refund a checkout

POST /checkouts/{id}/refund
Body fieldTypeNotes
amountintegerLeave out to refund everything that is left.

Send the body as JSON with content-type: application/json, or send no body at all to refund everything. A body Overflow can't read is refused with invalid_json and nothing is refunded. | reason | string | requested_by_customer, duplicate or fraudulent. fraudulent also teaches Stripe Radar to block that card and email. |

Returns the updated checkout object.

Refunds

GET /checkouts/{id}/refunds
GET /refunds?limit=20&starting_after=rf_...

Every refund, newest first, including ones made by hand in Stripe's dashboard, which have source set to stripe.

{"id": "rf_...", "object": "refund", "checkout": "co_...", "amount": 500, "currency": "eur", "reason": "requested_by_customer", "status": "succeeded", "source": "overflow", "created": 1796435822}

status is pending until Stripe settles it. One that ends failed sends a refund.failed webhook and counts as unrefunded again.

Expire a checkout

POST /checkouts/{id}/expire

For an order you cancelled on your side : the buyer can't pay it any more. Only an open checkout can be expired. Returns the checkout object with status expired, and sends checkout.expired.

Add an event

POST /checkouts/{id}/events

Adds your own entry to the checkout's timeline, to be used as dispute evidence.

Body fieldTypeNotes
typestring, requiredA short name such as delivered, download or login.
notestringWhat happened, up to 500 characters.
ipstringThe buyer's address at that moment.

Returns {"ok": true}.

List events

GET /checkouts/{id}/events

The whole timeline, oldest first, as {"object": "list", "data": [{"id", "type", "data", "created"}]}.

Products

GET  /products
POST /products
GET  /products/{id}
POST /products/{id}

A product is something you sell with a pay link of its own. Create and change one with name, amount, currency, description, return_url, quantity_max (1 to 99), active, and for a subscription kind set to subscription with interval (day, week, month or year), interval_count and trial_days. Sending null clears description or return_url. Only the fields you send change. Files, licence keys, shipping and the image are set in the dashboard.

The product object adds url, its pay link, sold, files (how many), license, shipping and image.

Discount codes

GET  /coupons
POST /coupons
GET  /coupons/{id}
POST /coupons/{id}

Create one with code and either percent_off or amount_off with its currency, and optionally product, max_uses and expires_at. Change only active afterwards. Buyers type codes on a product's checkout. Subscriptions and checkouts made from your own items don't take codes.

Customers

GET /customers?email=buyer@example.com

Everyone who paid, one entry per email and currency, with orders, spent, refunded, first_paid_at and last_paid_at.

Subscriptions

GET  /subscriptions?status=active
GET  /subscriptions/{id}
POST /subscriptions/{id}/cancel
{"id": "sub_...", "object": "subscription", "status": "active", "amount": 500, "currency": "eur", "interval": "month", "interval_count": 1, "customer_email": "buyer@example.com", "product": "lnk_...", "checkout": "co_...", "current_period_end": 1799027822, "cancel_at_period_end": false, "canceled_at": null, "created": 1796435822}

A subscription starts when a buyer pays a subscription product's checkout. Each later period is charged by Stripe and shows up as a checkout of its own with kind set to renewal. Cancel ends it at the end of the paid period. Send {"at_period_end": false} to end it now.

List disputes

GET /disputes

The store's 100 most recent disputes.

{
  "object": "list",
  "data": [{
    "id": "dp_QQO69JOE8M7n9fmI",
    "object": "dispute",
    "checkout": "co_xv6nGkF6H2cYxIVmtfiI6M6l",
    "reason": "fraudulent",
    "status": "needs_response",
    "amount": 1900,
    "currency": "eur",
    "evidence_submitted": false,
    "evidence_due_by": 1797000000,
    "created": 1796435822
  }]
}

Evidence is reviewed and submitted from the dashboard, where a person can check it first.

PreviousPrivacyNextChangelog

On this page

  • Server library
  • Versioning
  • Authentication
  • Errors
  • Idempotency
  • The checkout object
  • Create a checkout
  • Retrieve a checkout
  • List checkouts
  • Refund a checkout
  • Refunds
  • Expire a checkout
  • Add an event
  • List events
  • Products
  • Discount codes
  • Customers
  • Subscriptions
  • List disputes