Pay an invoice

Requires billing:write; reseller:purchase also permits this operation. Paying with provider wallet requires reseller:purchase. On-behalf payments must use provider wallet. Insufficient funds return 409 with balance_cents and needed_cents. Never automatically retry an uncertain payment; first read invoice status.

post/v1/invoices/{id}/pay

Request

  • Base URL: https://api.trueproxies.com
  • URL: https://api.trueproxies.com/v1/invoices/{id}/pay
  • Auth: HTTP bearer

Path parameters

idstring uuid required

Query parameters

customer_idstring uuid

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.

Headers

Idempotency-Keystring

Required for API-key requests; optional for dashboard sessions. 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 body

providerstring required

Payment provider identifier (stripe or cryptomus).

Response

ok

checkout_urlstring required
expires_atstring date-time required
payment_idstring uuid required

Changes

No recorded changes to this operation across all 1 revision of this API.