Order Synchronization#
DragonPass API Platform currently offers two types of order synchronization solutions.1. Real-Time Order Synchronization#
The real-time order synchronization method leverages webhooks to instantly push order notification to the client’s system as soon as an redemption order is created or updated. Clients need to specify their endpoint URLs with DragonPass in advance to receive the webhook notifications.Retry Mechanism#
In case of delivery failure, DragonPass system will retry sending the webhook up to 3 times to ensure data is successfully transmitted.2. Daily Order Summary Report (In Development)#
The daily order summary report is provided as a CSV file that combines all order data for the day. It is sent to the client between 00:00 and 04:00 UTC. Clients can choose to receive their files via email, FTP, or an S3 bucket. If a client has multiple Program IDs, separate reports will be generated for each.Delivery Methods#
3. Detailed Example#
Callback Message JSON#
{
"orderId": "DP00000000000001",
"programId": "1888000000000001",
"membershipId": "8888000066668888",
"module": 1,
"category": 1,
"status": 1,
"orderCreatedDate": "2024-12-31T00:00:00+00:00",
"usageDate": "2024-12-31T00:00:00",
"orderCancelledDate":"",
"transportHubId": "A10045",
"transportHubName": "Gatwick Airport",
"resourceId": "N00129",
"resourceName": "No1 Gatwick North",
"passengers": {
"cardholder": 1,
"guests": 1
}
}
When you successfully receive the DragonPass callback message, please return HTTP status code 200 OK along with this JSON body to indicate the successful handling of the request.Field Descriptions#
The columns returned in the Daily Order Summary Report are also as follows:| Column | Description | Example |
|---|
| orderId | Unique identifier of the order, generated by DragonPass each time a user utilizes their Membership or E-pass. | DP00000000000001 |
| programId | Unique identifier of the program. Assigned by DragonPass when a new program was onboarded. | 1888000000000001 |
| membershipId/ePassId | Unique ID for the DragonPass Membership or E-pass | 8888000066668888 |
| module | Specifies the type of products, e.g. "Lounge", "Fast Track". | 1 |
| category | Specifies the category of orders, e.g. "Walk-in", "Prebooking". | 1 |
| status | Order status. | 1 |
| orderCreatedDate | Specifies the date and time when an order was created (in UTC+0 time). | 2024-12-31T00:00:00+00:00 |
| usageDate | Specifies the date and time when an order was redeemed (in local time). | 2024-12-31T00:00:00 |
| orderCancelledDate | Specifies the date and time when an order was cancelled (if applicable). | |
| transportHubId | Unique ID for the transport hub. | A10045 |
| transportHubName | Name of the transport hub. | Gatwick Airport |
| resourceId | Unique ID for the DragonPass product. | N00129 |
| resourceName | Name of the DragonPass product. | No1 Gatwick North |
| cardholder | Specifies the number of cardholder. | 1 |
| guests | Specifies the number of guests. | 1 |
| Field | Enum |
|---|
| module | 1 - Lounge |
| category | 1 - Walk-in 2 - Prebooking |
| status | 1 - Order Created 2 - Order Cancelled |
4. Order Synchronization Logic#
Order Creation Notification#
When a user redeems their visits, our system automatically sends the order notification to the client’s system.Order Cancellation Notification#
If a user requests to cancel the order after redemption due to some reason, our system will send another order cancellation notification to the client’s system. This notification uses the same order number to ensure that the client can easily connect the two events.In some instances, due to network delays or other unforeseen issues, order creation notifications might not be delivered before order cancellation notifications. Our system ensures the integrity and traceability of events through unique order numbers.If an order cancellation notification is received without a prior creation notification, the client should treat the order as cancelled. The system should record the cancellation and ignore any subsequent creation notification for the same order number.
5. Callback Service Authentication#
DragonPass callback service currently supports two authentication methods:IP Whitelist Authentication
Customers can authenticate by whitelisting DragonPass IP addresses.Standard JWT Authentication (HS256)
DragonPass also supports standard JWT (HS256) authentication.If clients require any other special authentication methods, please reach out to our GTM/AM teams for further assistance, and we will tailor a solution to meet the needs.