PT EN

Comprovativos de pagamento

URL base: $CONSUMER_API

Listar comprovativos enviados

Registos

GET /payment-proofs

List the proofs of payment the consumer sent, with their review status

Pages the proofs of payment the caller has sent, across their tenants unless X-Tenant-ID selects one, each with its review status. Pagination uses limit and after.

Parâmetros

invoice_idstring · consulta · opcional

Returns only proofs sent for this invoice.

statusstring · consulta · opcional

Returns only proofs in this review status: pending, approved or rejected.

um de pending, approved, rejected

limitinteger · consulta · opcional

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

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 OK

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

OK

Enviar um comprovativo de pagamento

Registos

POST /payment-proofs

Send a proof of a payment made outside the app (multipart: invoice_id, amount_minor, method, reference, paid_on, note, file)

Sends evidence of a payment made outside the app, such as a bank transfer slip, for staff to review against an invoice of a linked account. Send multipart/form-data with the file field, invoice_id, amount_minor (whole minor units), method, reference, paid_on and an optional note; the caller needs the payment permission on the account. Returns 400 when the tenant does not take proofs for that method, 404 when the invoice is not payable by the caller, and 409 when an open proof with the same reference already exists; the proof is created as pending.

Devolve

201 Created; the proof waits for the utility to review it

Erros 409

curl -X POST "$CONSUMER_API/payment-proofs" \
  -H "Authorization: Bearer sk_test_..."
Resposta 201

Created; the proof waits for the utility to review it

Descarregar um comprovativo de pagamento

Registos

GET /payment-proofs/{id}/file

Streams the file attached to one of the caller's own proofs of payment, inline with its stored content type and no-store caching. Proofs sent by someone else, or outside the caller's scope, return 404.

Devolve

200 The stored PDF, JPEG or PNG

curl -X GET "$CONSUMER_API/payment-proofs/{id}/file" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

The stored PDF, JPEG or PNG