Skip to main content
POST
Initiate payment for an invoice
This is a public, rate-limited endpoint used by the hosted checkout page. No authentication is required.
Creates a payment order on the currency-routed gateway. The response tells the client which flow to drive:
  • gateway: "stripe" — mount the Stripe Payment Element with client_secret and publishable_key, confirm client-side, then verify via GET /checkout/{id}/success.
  • gateway: "razorpay" — open the Razorpay Checkout.js modal with order_id and razorpay_key_id, then verify via POST /checkout/{id}/razorpay/verify.
Settlement is never client-trusted: both verify endpoints confirm the payment with the gateway and bind it to this invoice before marking anything paid, and the gateway webhooks remain the authoritative backstop.

Path Parameters

Example Request

Response (Stripe-routed currency)

Response (INR / Razorpay-routed)

Already-paid invoices return 400. A 503 means the deployment is missing the gateway’s browser-side key (STRIPE_PUBLISHABLE_KEY or RAZORPAY_KEY_ID) — fix the configuration rather than retrying.

Errors

See Errors for the error envelope and the full code taxonomy.

Authorizations

Authorization
string
header
required

Path Parameters

id
string<uuid>
required

Response

Gateway order created.

data
object