> ## Documentation Index
> Fetch the complete documentation index at: https://pg-docs.mizaniyapay.dz/llms.txt
> Use this file to discover all available pages before exploring further.

# Download the receipt

> PDF receipt of a successful payment, in the language chosen at registration.

## Path parameters

<ParamField path="id" type="string" required>
  The payment id (UUID). The payment must have succeeded.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "{BASE_URL}/api/v1/payments/6c1d9a3e-2f0b-4a7e-9d51-0b3a7c2e9f14/receipt" \
    -H "x-api-key: $MIZANIYA_API_KEY" \
    -o receipt.pdf
  ```
</RequestExample>

<ResponseExample>
  ```http 200 OK theme={null}
  Content-Type: application/pdf
  Content-Disposition: attachment;
    filename="receipt-COMMANDE-2024-8756-fr.pdf"

  <PDF bytes>
  ```
</ResponseExample>

## Errors

| HTTP | errorCode | Cause |
| - | - | - |
| 404 | `PAYMENT_INSTANCE404_NOT_FOUND` | No payment with this id. |
| 409 | `RECEIPT409_NOT_AVAILABLE` | Payment did not succeed. |
| 500 | `RECEIPT500_GENERATION_FAILED` | The receipt could not be produced, retry later. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.