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
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | No | Booking system code (e.g., VN, VJ, 1A) |
| bookingCode | string | No | Booking code (PNR) |
| refundValue | string | No | Refund information |
| confirm | boolean | No | Confirm refund processing |
| ticketNumber | string | No | Ticket number to refund (Not applicable for Vietjet) |
| isEMD | boolean | No | True: EMD refund; false: flight ticket refund |
| refundAll | boolean | No | Refund 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
bookingCodemust match an existing booking. - Refund eligibility depends on fare rules and ticket status.
confirmmust be set to true to process the actual refund.- Some tickets may have refund penalties or restrictions.
refundAllwill process refunds for all eligible tickets in the booking.- All refund transactions are auditable via
trackingIdandtrackingTime.
Response Structure
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | System name (e.g., VN, VJ, 1A) |
| status | boolean | No | true if successful, false if failed |
| error | object | Yes | Error details (if any) |
| description | string | Yes | Error description (if any) |
| trackingId | string | Yes | Tracking ID for request logs |
| trackingTime | string | Yes | Time for request tracking (ISO 8601 format) |
| refundValue | string | Yes | Refund information for proceeding with refund |
| refundDocs | array | Yes | List of refund documents (see RefundDoc) |
RefundDoc Object
| Field | Type | Nullable | Description |
|---|---|---|---|
| ticketNumber | string | Yes | Ticket number |
| passenger | string | Yes | Passenger name |
| baseFare | object | Yes | Base fare amount (Money) |
| totalTax | object | Yes | Total tax amount (Money) |
| usedFare | object | Yes | Used fare amount (Money) |
| refundFare | object | Yes | Refundable fare (Money) |
| refundTotal | object | Yes | Total refund amount (Money) |
| refundRoute | string | Yes | Refunded route |
Money Object
| Field | Type | Description |
|---|---|---|
| amount | number | Amount value |
| currency | string | Currency 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.