# Generate a receipt PDF `POST /api/v1/payments/{id}/print` Generates a PDF receipt for a payment with a system document. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Payments → Write**. ## Headers - `X-Sport-Id` (integer) — Send the sport ID when the payment belongs to a sport. ## Path parameters - `id` (integer, required) — ID of the payment. ## Body parameters - `template_id` (integer or null) — ID of the receipt template. - `my` (string) — Optional print action. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/payments/${ID:?Set ID}/print" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"template_id":27}' ``` ## Response **200 OK** Returns the generated receipt URL. Example with fictional data and selected fields. ```json { "status": "success", "message": { "message_key": "entities.payment.messages.print_success" }, "url": "https://files.example.com/demo-receipt.pdf" } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `400` — The supplied fields or payment state do not allow this action. - `404` — The requested record was not found.