v2

latestOpenAPI 3.0.0raw.githubusercontent.com2026-02-16143114179.4 KB
Invoices

Generate a checkout URL

Initiate a payment session with the configured payment provider (Stripe, Paystack, Flutterwave, or M-Pesa). Returns a checkout URL that redirects the customer to the provider's hosted payment page.

post/api/invoices/{id}/checkout

Path parameters

idstring required

Invoice ID

Request body

callbackUrlstring

URL to redirect customer after payment

Example request

{
  "callbackUrl": "https://myapp.com/payment/complete"
}

Response

Checkout session created

checkoutUrlstring required
paymentIdstring required
providerstring required
expiresAtstring required

Example response

{
  "checkoutUrl": "https://paystack.com/pay/abc123",
  "paymentId": "clxpay123",
  "provider": "paystack"
}