Payment proofs

Base URL: $CONSUMER_API

List the proofs of payment the consumer sent

Logs

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.

Parameters

invoice_idstring · query · optional

Returns only proofs sent for this invoice.

statusstring · query · optional

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

one of pending, approved, rejected

limitinteger · query · optional

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

afterstring · query · optional

Opaque cursor returned by the previous page.

Returns

200 OK

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

OK

Send a proof of a payment made outside the app

Logs

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.

Returns

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

Errors 409

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

Created; the proof waits for the utility to review it

Download one of the consumer's own proofs

Logs

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.

Returns

200 The stored PDF, JPEG or PNG

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

The stored PDF, JPEG or PNG