Bill a merchant on your behalf
Collect payment from a merchant through a hosted Stripe Checkout page without your server ever touching a card number. This walks through POST /api/v1/charges end to end: create the charge, deliver the confirmation link, and confirm payment landed.
POST /api/v1/charges creates a “billing-on-behalf-of” request against a merchant’s email address. AskBiz generates a confirmation link; the merchant opens it and pays through a real Stripe Checkout session. The charge only becomes approved once Stripe confirms the payment actually went through — never by the confirmation page itself. Creating and listing charges is free; this endpoint isn’t credit-billed.
Read this before you build on it: there is currently no automatic payout mechanism from AskBiz to your account. Getting a charge to approved means the merchant has genuinely paid through Stripe on AskBiz’s side — it does not move that money to you. Treat /api/v1/charges as collection infrastructure, not a complete payments product yet.
- 1
Create the charge
Call POST /api/v1/charges with the merchant’s email, an amount_cents between 100 and 10,000,000 (£1 to £100,000), and a description up to 500 characters. This is not credit-billed — creating and listing charges costs you nothing. The response comes back with a pending charge and a confirmation_url.
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" }' - 2
Send the confirmation_url to the merchant
AskBiz does not email or message the merchant for you — deliver confirmation_url through whatever channel you already use to reach them (email, WhatsApp, SMS). The link points to https://developer.askbiz.co/charges/{token} and expires 7 days after creation (see expires_at in the response).
// Send confirmation_url to the merchant however you'd normally reach // them — email, WhatsApp, SMS. It's not sent automatically by AskBiz. await notifyMerchant(charge.merchant_email, { message: `You have a new invoice for review: ${confirmation_url}`, }) - 3
The merchant approves and pays via Stripe Checkout
The merchant opens the confirmation link and, on approval, is redirected to a real Stripe Checkout session to actually pay. No card number, expiry, or CVC ever touches your server — Stripe collects it directly. There is no approve-without-paying path: the confirmation page itself never marks a charge as paid.
- 4
The charge becomes approved only after Stripe confirms payment
A charge moves from pending to approved exclusively when a Stripe webhook confirms the payment succeeded on AskBiz’s side. If the merchant closes the tab without paying, or the payment fails, the charge simply stays pending — it doesn’t flip to any kind of "declined" state on its own.
- 5
Check GET /api/v1/charges for the current status
Poll GET /api/v1/charges (or look up the charge by id in the returned list) to see whether status has moved from pending to approved, and read approved_at once it has. Use this to decide when to mark your own invoice or order as paid.
curl https://askbiz.co/api/v1/charges \ -H "x-api-key: abz_live_your_key_here"
Response shapes
What a successful create call returns:
{
"charge": {
"id": "cha_9f3e2c1a",
"status": "pending",
"amount_cents": 250000,
"currency": "gbp",
"description": "Invoice #1042 — website retainer, July",
"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"
}What GET /api/v1/charges returns once Stripe has confirmed payment on one of them:
{
"charges": [
{
"id": "cha_9f3e2c1a",
"merchant_email": "owner@example-shop.com",
"amount_cents": 250000,
"currency": "gbp",
"description": "Invoice #1042 — website retainer, July",
"status": "approved",
"created_at": "2026-07-17T09:12:00Z",
"approved_at": "2026-07-17T09:41:22Z",
"expires_at": "2026-07-24T09:12:00Z"
}
]
}What’s next
For the full parameter and error reference, including the 400/401 error cases and the currency note (charges default to gbp, separate from the generic per-call cent pricing on GET /api/v1/pricing), see POST + GET /api/v1/charges.
Bill a merchant FAQ
If the merchant pays, does the money land in my account automatically?+
No. There is currently no automatic payout mechanism from AskBiz to your account. The Stripe Checkout session collects the merchant’s payment on AskBiz’s side — approving a charge does not yet move that money to you.
Can I or the merchant mark a charge as approved without a real payment?+
No. A charge only moves from pending to approved when a Stripe webhook confirms the payment succeeded. The confirmation page itself never flips the status, so there’s no way to fake an approval.
Does my server ever see the merchant’s card details?+
No. The merchant enters payment details directly into a real Stripe Checkout session after clicking your confirmation_url — no card number, expiry, or CVC crosses your server at any point.
How do I know when a charge has been paid, since there’s no webhook for it?+
Poll GET /api/v1/charges and check the status field on the charge — it starts as pending and becomes approved once Stripe confirms payment, with approved_at set at that point.
What happens if the merchant never opens the confirmation link?+
The charge stays pending and is only usable until expires_at, which is 7 days after creation — after that, treat the confirmation link as stale and create a new charge if you still need payment.