Skip to main content

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

ParameterTypeRequiredDescription
ticket-idstringYesThe unique identifier of the ticket

Query Parameters

ParameterTypeRequiredDescription
subAccountIdstringNoThe 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:

FieldValue
Content-Typeapplication/pdf
Content-Dispositionattachment; 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 PAID status
  • Professional Format: PDF with all transaction details organized for record-keeping
  • Sub-Account Support: Filter receipts by sub-account using the subAccountId parameter
  • Audit Trail: Use for accounting, reconciliation, and customer documentation