POST + GET /api/v1/charges

Create a billing-on-behalf-of charge against a merchant’s email, collected through a real Stripe Checkout session, and list the charges you’ve created. AskBiz does not yet pay this money out to your own account automatically — read the Payouts section before you build on this.

POSTGETx-api-key requiredNot credit-billed

What it does

Lets your integration collect money from a merchant without ever touching their card details. You create a charge with an amount and a description; AskBiz creates a pending charge and a confirmation link at https://developer.askbiz.co/charges/{token}. The merchant opens that link and, on approval, is redirected to a real Stripe Checkout session to actually pay. On a live key, a charge is only ever marked approved by a Stripe webhook confirming the payment went through — never by the confirmation page itself — so there’s no way to mark a live charge paid without a real Stripe transaction behind it. On a test key, there is no Stripe transaction at all: the confirmation page shows a “Simulate approve/decline” control instead, and clicking it flips the status directly — see Build safely with a sandbox key.

Creating and listing charges is free — this endpoint is not credit-billed, unlike /scan or /whatsapp/send. It also doesn’t support an Idempotency-Key header — if a create request times out and you aren’t sure whether it landed, check GET /api/v1/charges for an existing charge to that merchant before creating another one.

Create a charge

curl -X POST https://askbiz.co/api/v1/charges \
  -H "x-api-key: abz_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_email": "owner@example-shop.com",
    "amount_cents": 250000,
    "currency": "gbp",
    "description": "Invoice #1042 — website retainer, July"
  }'

Body parameters

FieldTypeRequiredDescription
merchant_emailstringYesA valid email address for the merchant you’re charging.
amount_centsintegerYesAmount to charge, in cents. Between 100 and 10,000,000 — £1 to £100,000.
currencystringNoDefaults to gbp if omitted.
descriptionstringYesMax 500 characters — what the charge is for (e.g. an invoice reference).

Response

{
  "charge": {
    "id": "cha_9f3e2c1a",
    "status": "pending",
    "amount_cents": 250000,
    "currency": "gbp",
    "description": "Invoice #1042 — website retainer, July",
    "key_env": "live",
    "created_at": "2026-07-17T09:12:00Z",
    "expires_at": "2026-07-24T09:12:00Z"
  },
  "confirmation_url": "https://developer.askbiz.co/charges/8f2a1c9e-4b3d-4a1e-9c7f-2d6e8a0b1c3f"
}

Send confirmation_url to the merchant however you’d normally reach them — it’s not emailed automatically. charge.status starts as pending and becomes approved once Stripe confirms payment (or, on a test key, once the merchant clicks “Simulate approve”); see the guide on billing a merchant on your behalf for the full flow end to end. key_env reflects whichever key created the charge and never changes afterward — use it to tell a real charge apart from a test one when listing them.

List charges

Returns the charges you’ve created, most recent 100 first.

curl https://askbiz.co/api/v1/charges \
  -H "x-api-key: abz_live_your_key_here"

Response

{
  "charges": [
    {
      "id": "cha_9f3e2c1a",
      "merchant_email": "owner@example-shop.com",
      "amount_cents": 250000,
      "currency": "gbp",
      "description": "Invoice #1042 — website retainer, July",
      "status": "approved",
      "key_env": "live",
      "created_at": "2026-07-17T09:12:00Z",
      "approved_at": "2026-07-17T09:41:22Z",
      "expires_at": "2026-07-24T09:12:00Z"
    },
    {
      "id": "cha_7b1d4e2f",
      "merchant_email": "another-owner@example.com",
      "amount_cents": 15000,
      "currency": "gbp",
      "description": "Setup fee",
      "status": "pending",
      "key_env": "test",
      "created_at": "2026-07-16T14:03:11Z",
      "approved_at": null,
      "expires_at": "2026-07-23T14:03:11Z"
    }
  ]
}

Payouts — read this before you build on it

This is a real, current limitation, not a rounding-error caveat: there is no automatic payout mechanism from AskBiz to your account. Creating a charge and getting it approved collects the merchant’s payment through a genuine Stripe Checkout session on AskBiz’s side — it does not move that money to you. Treat /api/v1/charges as collection infrastructure you can build on top of today, not as a complete payments product yet.

Currency

charges defaults currency to gbp and amounts are billed in real GBP through Stripe. That’s a different context from GET /api/v1/pricing, which labels per-call API prices generically in cents (currency: "usd_cents") — the two aren’t the same currency system, and this page won’t pretend they are.

Errors

StatusMeaning
400Invalid merchant_email, amount_cents outside 100–10,000,000, or description missing or over 500 characters.
401Missing or invalid x-api-key.

There’s no 402 here — since this endpoint isn’t credit-billed, a low or empty wallet never blocks a charge from being created or listed.

Charges endpoint FAQ

If a merchant approves and pays, does the money land in my account automatically?+

No. There is currently no automatic payout mechanism from AskBiz to your account. Approval and payment happen through a real Stripe Checkout session on AskBiz’s side — this endpoint collects money on the merchant’s behalf, it does not yet move that money to you.

Can a merchant, or I, mark a charge as approved without actually paying?+

Not on a live charge — it only moves from pending to approved when a Stripe webhook confirms the payment succeeded, the confirmation page itself never flips the status. A test-key charge is different by design: its confirmation page has a "Simulate approve" control specifically so you can exercise the full lifecycle without a real payment.

What currency are charges billed in?+

Whatever you pass as currency, defaulting to gbp if you omit it — amounts are real GBP charged through Stripe. This is separate from the generic per-call cent pricing on GET /api/v1/pricing.

Does creating or listing charges cost me credits?+

No. POST and GET /api/v1/charges are not credit-billed — only the eventual Stripe payment involves real money, and that money goes toward the merchant’s payment, not a debit from your AskBiz wallet.

Can I retry a create request safely if it times out?+

This endpoint doesn’t support an Idempotency-Key header. If you’re unsure whether a create request landed, call GET /api/v1/charges first and check for an existing charge to that merchant_email before creating a duplicate.

Can I test the full charge lifecycle without a real Stripe payment?+

Yes — use a test key (abz_test_…). The charge is created exactly as normal, but its confirmation page shows a "Simulate approve/decline" control instead of a real Stripe Checkout redirect, and no card is ever charged. See Build safely with a sandbox key.