Booking Journey Handling
1. Commit API
Calling the Commit API is considered the start of a booking journey flow. You must ensure that the current booking journey has been fully completed before initiating a new one.
The Commit API only triggers two actions: payment and ticket issuance. It should not be used alone to determine the completion of a booking journey. Instead, it must be used together with the booking-detail API (which will be replaced by the final-booking-detail API as recommended in this document).
2. Final Booking Detail API
The final-detail-booking API is used to determine the status of a booking through the following statuses:
Payment statuses
Issued statuses
This API enhances the handling of both successful and failed cases:
In the happy case (success), the API immediately returns the result.
In the failure case, the API will automatically retry to retrieve the latest booking status and return the result until the preconfigured timeout is reached.
Conditions where the booking journey is considered completed and a new journey can be started:
Payment failed:
paymentStatus =
Failed
Payment succeeded and ticket issuance succeeded:
paymentStatus =
Success
andissueStatus =
Success
Conditions where the booking journey is considered incomplete (must be held and further processed):
Payment succeeded but ticket issuance not yet succeeded:
paymentStatus =
Success
andissueStatus !=
Succes
3. Recommendation
When calling the Commit API, some errors may occur outside of the predefined error code table (e.g., API call failure, timeout, or long response time). In such cases, the final-booking-detail API should be used to determine the status of a booking.
After retrieving the result from final-booking-detail:
If
paymentStatus =
Success
butissueStatus !=
Success
, you should continue retrying GET final-booking-detail until the most accurate status is returned.
Last updated