---
title: "Generate Payment PDF"
method: POST
path: "/payments/{id}/generate_pdf"
tags: ["Payments"]
---

# Generate Payment PDF

`POST /payments/{id}/generate_pdf`

## Request

- Base URL: `https://api.whop.com/api/v1`
- URL: `https://api.whop.com/api/v1/payments/{id}/generate_pdf`
- Auth: HTTP bearer

Generates the payment's receipt (invoice) as a PDF and returns a short-lived link to download it. Each call generates a new file and link, so this endpoint does not replay `Idempotency-Key` responses.

## Path parameters

- `id` string, required

## Headers

- `Api-Version-Date` string
- `Idempotency-Key` string

## Response `200`

receipt PDF generated

- PaymentPdf
  - `expires_at` string, required: When the link stops working, as an ISO 8601 timestamp. Generate a new PDF for a fresh link.
  - `url` string, required: A short-lived link to download the payment's receipt as a PDF. Anyone holding the link can download the file until it expires.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Resource not found
- `409`: Conflict

## Changes

- **2026-10-10** `7d2eaa643369`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/whop/apis/whop-api/changes/payments/:id/generate_pdf/post.md)

---

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