Ticket Receipt API
Overview
The Ticket Receipt endpoint allows you to download PDF receipts for completed tickets with PAID status.
API Reference - Ticket Receipt
Endpoint
GET /v2/account/tickets/{ticket-id}/receipt
Authentication
This endpoint requires authentication. You must include either:
- A valid JWT token in the Authorization header
- A valid API key
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ticket-id | string | Yes | The unique identifier of the ticket |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
subAccountId | string | No | The sub-account ID to filter the receipt (optional) |
Request Example
curl -X GET \
"https://api.sandbox.avenia.io:10952/v2/account/tickets/12345/receipt?subAccountId=sub123" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Responses
Success Response (200 OK)
Response Details:
| Field | Value |
|---|---|
| Content-Type | application/pdf |
| Content-Disposition | attachment; filename=ticket-receipt.pdf |
Returns a PDF file containing the ticket receipt with all transaction details.
info
The PDF receipt will be automatically downloaded with the filename ticket-receipt.pdf
PDF Receipt Content
The PDF receipt includes all transaction details from the ticket, organized in a professional format with:
- Transaction ID and date
- Party information (sender/receiver)
- Input/output amounts and fees
- Payment method details
- Exchange rates (when applicable)
info
Receipts are only available for tickets with PAID status.
Usage Examples
Download Receipt
curl -X GET \
"https://api.sandbox.avenia.io:10952/v2/account/tickets/{ticket-id}/receipt" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-o ticket-receipt.pdf
With Sub-Account Filter
curl -X GET \
"https://api.sandbox.avenia.io:10952/v2/account/tickets/{ticket-id}/receipt?subAccountId={sub-account-id}" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-o ticket-receipt.pdf
Key Points
- Automatic Generation: Receipts are generated when tickets reach
PAIDstatus - Professional Format: PDF with all transaction details organized for record-keeping
- Sub-Account Support: Filter receipts by sub-account using the
subAccountIdparameter - Audit Trail: Use for accounting, reconciliation, and customer documentation