Pay an open invoice.
POST
/billing/invoices/{invoice_id}/pay
const url = 'https://api.siteqwality.com/billing/invoices/example/pay';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"idempotency_key":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” invoice_id
required
string
Stripe invoice id
Request Body required
Section titled “Request Body required ” 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"}Responses
Section titled “ Responses ”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