Payments

Generate Payment PDF

Changed on

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.

post/payments/{id}/generate_pdf

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Path parameters

id, string required

The payment whose receipt to generate, prefixed pay_.

Headers

Api-Version-Date, string
Example:2026-11-30

Pins the request to a dated API version.

Idempotency-Key, string
Example:d9105228-4a08-46b1-8b91-42fed586d383

A unique key that makes this request safe to retry. See Idempotent requests.

Response

receipt PDF generated

PaymentPdf required
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.

Example response

{
  "expires_at": "2026-01-01T12:00:00.000Z",
  "url": "https://content.whop.com/exports/2026-01-01/pdfs/receipt_pay_xxxxxxxxxxxxxx.pdf"
}

Changes