Billing
Production API usage requires active billing.
Add billing
Section titled “Add billing”Open the developer dashboard and click Add billing. Batch Relay uses Stripe test mode in development.
Use Stripe’s test card:
4242 4242 4242 4242Any future expiration date, CVC, and ZIP code are accepted in Stripe test mode.
Billing states
Section titled “Billing states”| State | Meaning |
|---|---|
not_configured | No usable billing method is attached. |
active | Billing setup is complete. |
past_due | Billing needs attention. |
disabled | API billing is disabled. |
Sandbox billing tests
Section titled “Sandbox billing tests”Sandbox order creation is normally free. To test billing without production fulfillment, include:
{ "billing": { "required": true }}Inactive billing returns:
HTTP/1.1 402 Payment Required{ "error": { "code": "billing_required", "message": "This sandbox request requires active billing for billing-flow testing." }, "request_id": "req..."}Total charged
Section titled “Total charged”The developer dashboard reports captured API charges. During setup-mode testing, saved cards do not create charges, so the total remains $0.00 until PaymentIntent-based order charging is enabled.