Place an order (create + pay from balance in one call)
Creates a checkout and immediately pays it from your prepaid USD
balance. On success (201) fulfillment starts asynchronously — poll
GET /b2b/orders/{checkoutId} for codes.
- Idempotent via
externalRef: a repeated ref returns200with the existing order. A ref already used on the retailer surface returns409. - Tier checks: item count, per-line quantity, order USD amount, daily
and monthly spend caps →
422 B2B_LIMIT_EXCEEDEDon violation. - Insufficient balance →
400 VALIDATION_ERRORwithdetails.reason— the order is not left open.
Authorizations
API key (wg_live_…) created in the dashboard (Account → API Keys).
Shown once at creation; only a hash is stored server-side.
Body
Line count capped by your tier's maxItemsPerOrder.
1Currency the order total is expressed in.
Your own order id — enables idempotent retries and reconciliation.
1 - 128HTTPS URL (public hostname) for the legacy fire-and-forget order callback. Unsigned, un-retried, includes card codes — see the webhooks guide.
True = deliver codes sealed (revealed by the recipient on our hosted page).
Response
Idempotent replay — an order with this externalRef already exists.
Order lifecycle. partial = some items fulfilled, some failed. expired = never paid.
pending, processing, completed, partial, failed, expired Total charged to your balance, in paymentCurrency.
Unix timestamp in milliseconds (UTC).
1753142400000
Your negotiated discount applied to this order.
Unix timestamp in milliseconds (UTC).
1753142400000