Payment API
Voucher validation API
GET: /api/payments/voucher/validate
Validate voucher for specific booking
Request Body
bookingNumber (String, Required)
Booking Identifier
voucherCode (String, Required)
Voucher code
Example
{
"bookingNumber": "ADCO2203011523483",
"voucherCode": "AXOLXHLp"
}
Response
bookingNumber (String)
Booking identifier
discountAmount (Double)
Discount money amount
trackingCode (String)
Identifier for booking with voucher
voucherCode (String)
Voucher code
voucherValid (Boolean)
Is valid voucher code?
duration (Integer, Optional)
errors (Array[Error], Optional)
infos (Array[Info], Optional)
success (Boolean, Optional)
textMessage (String, Optional)
Example
{
"isSuccess": true,
"duration": 3896,
"textMessage": null,
"errors": null,
"infos": null,
"bookingNumber": "ADCO2203011523483",
"voucherCode": "AXOLXHLp",
"voucherValid": true,
"trackingCode": "track_xbhwiFai1HNQNCQLe2PmvdxJu/rd5zEG7NGuvjHI5CY=",
"discountAmount": 1000,
"percentOff": null,
"type": "AMOUNT",
"success": true
}
Voucher usage confirmation API
GET: /api/payments/voucher/redeem
Redeem voucher for specific booking
Request Body
bookingNumber (String, Required)
Booking identifier
voucherCode (String, Required)
Voucher code
trackingCode (String, Required)
Tracking code used in api validate
Example
{
"bookingNumber": "ADCO2203011523483",
"trackingCode": "track_xbhwiFai1HNQNCQLe2PmvdxJu/rd5zEG7NGuvjHI5CY="
"voucherCode": "AXOLXHLp"
}
Response
bookingNumber (String)
Booking identifier
redeemValid (Boolean)
Confirmation of success using Voucher
voucherCode (String)
Voucher code
duration (Integer, Optional)
errors (Array[Error], Optional)
infos (Array[Info], Optional)
success (Boolean, Optional)
textMessage (String, Optional)
Example
{
"isSuccess": true,
"duration": 6508,
"textMessage": null,
"errors": null,
"infos": null,
"voucherCode": "gtd_fpt_test",
"bookingNumber": "ADCO2203101541927",
"redeemValid": true,
"success": true
}
Booking Payment Request API
GET: /api/partner/place-order
Request payment booking - initiate payment order
Note
Security requirements: Encrypt data and include a digital signature
Request: Does not require encryption and includes a digital signature
Response: Part of the response data is required to be encrypted and accompanied by a digital signature
Request
bookingNumber query (string, required),
Reference code to booking
- bookingNumber `query` (string, required),
!!! quote ""
Reference code to booking
Response
Payment Recording and Booking Commit API
POST: /api/partner/commit
Yêu cầu commit booking được cập nhật đầy đủ thông tin và hoàn tất thanh toán
Chú ý
Security requirements: Encrypt data and include a digital signature
Request: Does not require encryption and includes a digital signature
Response: Part of the response data is required to be encrypted and accompanied by a digital signature
Request Body
Model
Example
Response
Model
API to retrieve Booking Details After Ticket Issuance
GET: /api/products/final-booking-detail
Description:
This API is optimized to retrieve the booking status for use in the payment process (its usage is similar to the booking-detail API). It also adds enhanced handling for both successful and failed cases.
In the happy case (success), the API immediately returns the result.
In the failure case, the API automatically retries to fetch the latest booking status and continues returning results until the configured timeout is reached.
Parameter
Response
Code 200
OK
Model
Last updated