Description (Asynchronized Notification)
Asynchronized response notifying whether the transaction is successful/fail. (POST)When the transaction has been finished, asynchronized notification will be sent to the URL input during precreate transaction (notify_url)
Retry Pattern
When the error occurs or no successful response is received, the server will retry sending async. notifications with delay time as below
As the notification may be sent more than once,please make sure that the system will only handle the same notification ONCE
| Number of retry | Delay time |
|---|---|
| 1, 2 | 15 seconds |
| 3 | 30 seconds |
| 4 | 3 minutes |
| 5 | 10 minutes |
| 6 | 20 minutes |
| 7, 8, 9 | 30 minutes |
| 10 | 1 hour |
| 11, 12, 13 | 3 hours |
| 14, 15 | 6 hours |
Response
| # | Name | Type | Description |
|---|---|---|---|
| 1 | success | Boolean | Show whether the transaction request is success(true) or fail(false) |
| 2 | request_type | String |
Show the request type
|
| 3 | transaction | Array | (optional) Transaction detail |
| 4 | authorization | Array | (optional) Authorization detail |
| 5 | nonce_str | String | Random String (64 characters) |
| 6 | sign | String | Signature generated using the algorithm (See detail) |
| 7 | sign_type | String | Algorithm for generating signature of the response (Recently support HMAC_SHA256 ONLY) |
Transaction Detail
| # | Name | Type | Description |
|---|---|---|---|
| 1 | id | String | Id of the transaction |
| 2 | transaction_id | String | Transaction ID |
| 3 | authorization_id | String | (optional) Authorization ID (only show with captured status) |
| 4 | gateway_code | String | Gateway Code of the transaction |
| 5 | custom_id | String | Transaction ID sent by client |
| 6 | payment_method | String | Payment Method of the transaction |
| 7 | currency | String | Transaction curreny |
| 8 | amount | String | Transaction amount (2 decimal places) |
| 9 | status | String | Transaction status |
| 10 | paid_at | Date Time | Time the transaction was paid (format: YYYY-mm-dd h:i:s) |
| 11 | refunded_at | Date Time | Time the transaction was refunded (format: YYYY-mm-dd h:i:s) |
| 12 | updated_at | Date Time | Last update time of the transaction (format: YYYY-mm-dd h:i:s) |
Authorization Detail
| # | Name | Type | Description |
|---|---|---|---|
| 1 | id | String | Id of the transaction |
| 2 | authorization_id | String | Authorization ID |
| 3 | gateway_code | String | Gateway Code of the transaction |
| 4 | custom_id | String | Authorization ID sent by client |
| 5 | payment_method | String | Payment Method of the authorization |
| 6 | currency | String | Authorization curreny |
| 7 | amount | String | Authorization amount (2 decimal places) |
| 8 | captured | String | Authorization captured amount (2 decimal places) |
| 9 | remaining_amount | String | Authorization remaining amount (2 decimal places) |
| 10 | status | String | Authorization status |
| 11 | authorized_at | Date Time | Time the authorization was authorized (format: YYYY-mm-dd h:i:s) |
| 12 | captured_at | Date Time | Time the authorization was captured (format: YYYY-mm-dd h:i:s) |
| 13 | cancelled_at | Date Time | Time the authorization was cancelled (format: YYYY-mm-dd h:i:s) |
| 14 | updated_at | Date Time | Last update time of the authorization (format: YYYY-mm-dd h:i:s) |
Example Response
success=1&request_type=purchase&transaction[id]=xxxxxxxxxxxxxxx&transaction[transaction_id]=xxxxxxxxxxxxxxxxx&transaction[gateway_code]=xxxxxxxxxxxxxxxxx&transaction[custom_id]=xxxxxxxxxxxxxxxxxx&transaction[payment_method]=VISA&transaction[currency]=HKD&transaction[amount]=5.00&transaction[status]=paid&transaction[paid_at]=2018-07-12 16:00:43&transaction[updated_at]=2018-07-12 16:07:56&nonce_str=1pt0Elsxiww0BSrqrE5PYqKiQYnRLKCzfZZ3y3SMvBHuDBFuz4MDbyEF410yyj4b&sign_type=HMAC_SHA256&sign=42bc1ba8efe2816c54ec989645ed5cda84e7b272c3fe60a343e87c81e40793b0
success=1&request_type=authorize&authorization[id]=xxxxxxxxxxxxxxx&authorization[gateway_code]=xxxxxxxxxxxxxxx&authorization[reference_id]=xxxxxxxxxxxxxxx&authorization[custom_id]=xxxxxxxxxxxxxxx&authorization[payment_method]=VISA Online&authorization[currency]=HKD&authorization[amount]=952.00&authorization[updated_at]=2025-02-12 10:32:40&authorization[authorization_id]=173932755827044&authorization[captured]=0.00&authorization[remaining_amount]=952.00&authorization[status]=authorized&authorization[authorized_at]=2025-02-12 10:32:40&nonce_str=NRjyYryOg5gfSZgYRcio5lKxeRvUA9YBcDpIXixFzS3wHGJg0KWlz0JAejiG1U58&sign_type=HMAC_SHA256&sign=3c5b6f019f420dbcea6d7b2f1ad034219781168227f3c40db3484b963ab81d3f
success=1&request_type=capture&transaction[id]=xxxxxxxxxxxxxxx&transaction[gateway_code]=12_1&transaction[reference_id]=xxxxxxxxxxxxxxx&transaction[custom_id]=xxxxxxxxxxxxxxx-1&transaction[payment_method]=VISA Online&transaction[currency]=HKD&transaction[amount]=3.00&transaction[updated_at]=2025-02-19 14:49:20&transaction[transaction_id]=xxxxxxxxxxxxxxx&transaction[charge]=1.09&transaction[refunded]=0.00&transaction[refund_charge]=0.00&transaction[net]=1.91&transaction[tips]=0.00&transaction[status]=captured&transaction[paid_at]=2025-02-19 14:49:20&transaction[authorization_id]=xxxxxxxxxxxxxxx&nonce_str=g2xClWT1pqbQKRyrqdZq77YoKfHPGwz3mmECrw5MKI0nUYZI6kLqWvjlu99bfXVi&sign_type=HMAC_SHA256&sign=096ae34ffe86b38b601adf6070d81211a737bece3d17aeb454306cb37b00a795
Successful Return
When the merchant receives correct notification, the successful response should be returned to the server.(e.g. using die('success') in PHP)
Otherwise, the notification will be sent again using retry pattern
| # | Name | Type | Value |
|---|---|---|---|
| 1 | header | String | text/plain |
| 1 | content | String | success |
Example
success
v1.89.5-20251216 © The Payment Cards Group Limited. All rights reserved.