Skip to main content

Refund Ticket

Process a refund for an issued ticket or EMD (Electronic Miscellaneous Document). This endpoint handles both flight tickets and EMD refunds with detailed refund calculation and confirmation.


Endpoint

  • URL: /api/v1/flight/refundticket
  • Method: POST
  • Auth Required: Yes (Bearer Token/X-API-KEY)
  • Content-Type: application/json

Authentication

This endpoint requires a valid JWT Bearer token in the Authorization header:

Authorization: Bearer <access_token>

Obtain tokens via /api/v1/sign-in (POST) with your credentials.


Request Structure

FieldTypeRequiredDescription
systemstringNoBooking system code (e.g., VN, VJ, 1A)
bookingCodestringNoBooking code (PNR)
refundValuestringNoRefund information
confirmbooleanNoConfirm refund processing
ticketNumberstringNoTicket number to refund (Not applicable for Vietjet)
isEMDbooleanNoTrue: EMD refund; false: flight ticket refund
refundAllbooleanNoRefund all tickets in the booking

Example Request:

{
"system": "VN",
"bookingCode": "ABC123",
"refundValue": "encoded_refund_value",
"confirm": true,
"ticketNumber": "738-1234567890",
"isEMD": false,
"refundAll": false
}

Request Constraints & Business Rules

  • Only issued tickets or EMDs can be refunded.
  • The bookingCode must match an existing booking.
  • Refund eligibility depends on fare rules and ticket status.
  • confirm must be set to true to process the actual refund.
  • Some tickets may have refund penalties or restrictions.
  • refundAll will process refunds for all eligible tickets in the booking.
  • All refund transactions are auditable via trackingId and trackingTime.

Response Structure

FieldTypeNullableDescription
systemstringYesSystem name (e.g., VN, VJ, 1A)
statusbooleanNotrue if successful, false if failed
errorobjectYesError details (if any)
descriptionstringYesError description (if any)
trackingIdstringYesTracking ID for request logs
trackingTimestringYesTime for request tracking (ISO 8601 format)
refundValuestringYesRefund information for proceeding with refund
refundDocsarrayYesList of refund documents (see RefundDoc)

RefundDoc Object

FieldTypeNullableDescription
ticketNumberstringYesTicket number
passengerstringYesPassenger name
baseFareobjectYesBase fare amount (Money)
totalTaxobjectYesTotal tax amount (Money)
usedFareobjectYesUsed fare amount (Money)
refundFareobjectYesRefundable fare (Money)
refundTotalobjectYesTotal refund amount (Money)
refundRoutestringYesRefunded route

Money Object

FieldTypeDescription
amountnumberAmount value
currencystringCurrency code

Example Response:

{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "abc-123",
"trackingTime": "2024-06-01T12:00:00Z",
"refundValue": "encoded_refund_value",
"refundDocs": [
{
"ticketNumber": "738-1234567890",
"passenger": "NGUYEN VAN A",
"baseFare": { "amount": 2000000, "currency": "VND" },
"totalTax": { "amount": 350000, "currency": "VND" },
"usedFare": { "amount": 0, "currency": "VND" },
"refundFare": { "amount": 1800000, "currency": "VND" },
"refundTotal": { "amount": 2150000, "currency": "VND" },
"refundRoute": "SGN-HAN"
}
]
}

Error Codes

See Error Codes for details on possible error responses.


Security & Validation

  • All input is validated for type and required fields.
  • Only authenticated users can access this endpoint.
  • Ticket numbers are validated against existing issued tickets.
  • Refund eligibility is checked against fare rules.
  • All refund transactions are logged and traceable.

Validation Questions

  • What are the refund policies for different fare types?
  • How are refund penalties calculated and applied?
  • What happens if a ticket is partially used?
  • Are there time limits for processing refunds after ticket issuance?

For integration support, see Contact Support.