---
title: "Get payment receipt"
method: GET
path: "/v1/documents/payments/{paymentId}/receipt"
tags: ["Documents"]
---

# Get payment receipt

`GET /v1/documents/payments/{paymentId}/receipt`

## Request

- Base URL: `https://api.yuvexpay.com`
- URL: `https://api.yuvexpay.com/v1/documents/payments/{paymentId}/receipt`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/yuvexpay/apis/yuvexpay-api/docs/v1/documents/payments/:paymentId/receipt/get.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Path parameters

- `paymentId` string, uuid, required

## Query parameters

- `format` 'html' | 'text'

## Response `200`

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.

## Other responses

- `400`: The payment is not `PAID` or `REFUNDED`. Code: `RECEIPT_NOT_AVAILABLE`.
- `401`: Missing or invalid authentication token.
- `404`: Resource not found.

## Changes

- **2026-08-27** `8ba4c7f9e9db`: 1 breaking, 3 info
  - removed the media type `application/json` for the response with the status `200`
  - added the media type `text/html` for the response with the status `200`
  - added the media type `text/plain` for the response with the status `200`
  - added the non-success response with the status `400`
- **2026-04-14** `c75657100757`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/yuvexpay/apis/yuvexpay-api/changes/v1/documents/payments/:paymentId/receipt/get.md)

---

[API](https://skmtc.dev/yuvexpay/apis/yuvexpay-api.md) - [All operations](https://skmtc.dev/yuvexpay/apis/yuvexpay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/yuvexpay/apis/yuvexpay-api/revisions/57fb2913ed0b?raw)
