Pay an invoice
const url = 'https://api.trueproxies.com/v1/invoices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pay';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"provider":"example"}'};
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.trueproxies.com/v1/invoices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pay \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "provider": "example" }'Requires billing:write; reseller:purchase also permits this operation. On-behalf payments additionally require reseller:purchase and provider wallet. Insufficient funds return 409 with balance_cents and needed_cents. Never automatically retry an uncertain payment; first read invoice status.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Owned sub-customer UUID. Resellers only; reads require reseller:read and writes reseller:purchase in addition to the operation scope. X-Customer-Id header is an alternative. Not allowed for me, wallet, trial, API keys, or reseller-management routes.
Header Parameters
Section titled “Header Parameters”Makes a retry safe. The first request carrying a given key is executed and its response recorded; repeating the same request with the same key replays that response, with Idempotency-Replayed: true, rather than buying or paying a second time. Reusing a key for a different request is refused with 409, as is a repeat that arrives while the first is still running. Keys are scoped to your account and to the endpoint. Successful and uncertain invoice commands are retained so that an old retry cannot create another invoice. Completed definite rejections are kept for at least 24 hours; after that, the same key may be evaluated again.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Payment provider identifier (stripe or cryptomus).
Examplegenerated
{ "provider": "example"}Responses
Section titled “Responses”Ok
object
Examplegenerated
{ "checkout_url": "example", "expires_at": "2026-04-15T12:00:00Z", "payment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}