Documents

Get payment receipt

Changed on

Render a receipt for a payment. Requires the documents:read scope. The payment must be PAID or REFUNDED; any other status, FREE included, 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

Request

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

    • breaking

      removed the media type application/json for the response with the status

    • info

      added the media type text/html for the response with the status

    • info

      added the media type text/plain for the response with the status

    • info

      added the non-success response with the status

    • info

      endpoint added