Skip to content

Pay an open invoice.

POST
/billing/invoices/{invoice_id}/pay
curl --request POST \
--url https://api.siteqwality.com/billing/invoices/example/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "idempotency_key": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'
invoice_id
required
string

Stripe invoice id

Media type application/json
object
idempotency_key
required

Client-generated, stable across retries of ONE pay attempt. Same contract as the add-on endpoint: the same value twice is one charge.

string format: uuid
Example generated
{
"idempotency_key": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Charged, or waiting on a browser authentication step

Media type application/json
object
status
required

"paid" when the charge went through, "requires_action" when the customer’s bank wants an authentication challenge finished in the browser.

string
client_secret

Present only with requires_action. Feed it to the Payment Element.

string | null
Example generated
{
"status": "example",
"client_secret": "example"
}

Missing or invalid authentication

Caller is not a super admin

No such invoice on this account

Account has no Stripe customer, or the invoice cannot be paid

Internal server error