Receipts

Base URL: $CONSUMER_API

List consumer receipts

Logs

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.

Parameters

limitinteger · query · optional

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

afterstring · query · optional

Opaque cursor returned by the previous page.

Returns

200 Receipts authorized for this consumer identity

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

Receipts authorized for this consumer identity

Get a receipt authorized for the authenticated consumer

Logs

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.

Parameters

numberstring · path · required

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

Returns

200 Receipt in an account linked to the authenticated consumer

Errors 404

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

Receipt in an account linked to the authenticated consumer

Printable HTML receipt in Portuguese

Logs

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.

Parameters

numberstring · path · required

Receipt number

Returns

200 Receipt document

Errors 404

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

Receipt document

Download one of the caller's receipts as PDF

Logs

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.

Parameters

numberstring · path · required

Receipt number

layoutstring · query · optional · default a4

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

one of a4, mobile

Returns

200 PDF document

Errors 403 · 404

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

PDF document