Documents

Get payment receipt

Render a receipt for a payment. Requires the documents:read scope. The payment must be PAID or REFUNDED; any other status returns 400 RECEIPT_NOT_AVAILABLE. The lookup is scoped to the environment of the key: a production key resolves only production payments and a sandbox key only sandbox ones, so an id from the other environment returns 404 even when it belongs to your own account.

get/v1/documents/payments/{paymentId}/receipt

Path parameters

paymentIdstring uuid required

The payment ID.

Query parameters

format'html' | 'text'

Output format.

Response

The rendered receipt. The response body is the document itself — HTML with Content-Type: text/html, or plain text with Content-Type: text/plain. It is not JSON, and it is not a PDF.

Changes