PT EN

Recibos

URL base: $CONSUMER_API

Listar recibos

Registos

GET /receipts

List payment receipts for explicitly linked consumer accounts

Pages payment receipts for accounts linked to the caller, across tenants unless X-Tenant-ID selects one. Filter with account_id (which must be one of the caller's accounts) and invoice_id; pagination uses limit and after.

Parâmetros

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Receipts authorized for this consumer identity

curl -X GET "$CONSUMER_API/receipts" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

Receipts authorized for this consumer identity

Obter um recibo

Registos

GET /receipts/{number}

Returns one payment receipt by its number when it belongs to an account linked to the caller, or was issued to the caller without an account. The tenant is taken from X-Tenant-ID or the token when set, otherwise all of the caller's tenants are searched; anything outside the scope returns 404.

Parâmetros

numberstring · caminho · obrigatório

Receipt number as printed on the receipt, unique within the tenant.

Devolve

200 Receipt in an account linked to the authenticated consumer

Erros 404

curl -X GET "$CONSUMER_API/receipts/{number}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

Receipt in an account linked to the authenticated consumer

Obter um recibo para imprimir

Registos

GET /receipts/{number}/document

Renders one of the caller's receipts as a printable HTML page with the tenant's name, logo and footer, served inline with a restrictive content security policy. The locale query parameter (pt-MZ or en-US) picks the language, falling back to the caller's profile locale. Receipts outside the caller's scope return 404.

Parâmetros

numberstring · caminho · obrigatório

Receipt number

Devolve

200 Receipt document

Erros 404

curl -X GET "$CONSUMER_API/receipts/{number}/document" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

Receipt document

Descarregar um recibo em PDF

Registos

GET /receipts/{number}/pdf

Renders one of the caller's receipts as a PDF, including the paid invoice number when the payment was allocated to one. The locale query parameter (pt-MZ or en-US) picks the language, falling back to the caller's profile locale, and layout=mobile returns a phone-sized layout instead of A4. Receipts outside the caller's scope return 404.

Parâmetros

numberstring · caminho · obrigatório

Receipt number

layoutstring · consulta · opcional · predefinição a4

Page format. mobile is one narrow column sized to its content, for reading on a phone. An unknown value renders A4.

um de a4, mobile

Devolve

200 PDF document

Erros 403 · 404

curl -X GET "$CONSUMER_API/receipts/{number}/pdf" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

PDF document