Webhook Card Authentication Result
Process
Description:
- After the partner bank sends the authentication result to Baokim, Baokim calls Merchant's webhook to notify the result.
- Merchant needs to build a webhook API to receive this notification.
API Information
URL: Merchant provides
Method: POST
Header:
Content-Type: application/json
Signature: $signature
Request
(Parameters Baokim sends to Merchant)
Main Parameters Table
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | request_id | String(100) | ✅ | Unique request ID |
| 2 | request_time | String(20) | ✅ | Request send time. Format: YYYY-MM-DD H:i:s |
| 3 | merchant_code | String(50) | ✅ | Merchant identifier |
| 4 | operation | String(20) | ✅ | AUTHENTICATION: card authentication / REFUND: refund |
| 5 | order_code | String(50) | ✅ | Baokim order code |
| 6 | total_amount | String(255) | ✅ | Total order amount |
| 7 | authen_status | Number | ✅ | Authentication status: 0 - Pending / 1 - Authenticated / 2 - Failed / 3 - Bypass (3ds off) |
| 8 | status | Number | ✅ | Order status on Baokim |
| 9 | save_token | Number | ❌ | 0: Do not save token, 1: Save token |
| 10 | off_3ds | Number | ❌ | 0: 3DS not disabled (default), 1: 3DS disabled |
| 11 | extend | Object | ❌ | Extended data (billing) |
| 12 | created_at | Datetime | ✅ | Order creation time |
| 13 | updated_at | Datetime | ✅ | Order update time |
Extend Information
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | billing | Object | ❌ | Payer information |
Billing Information
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | firstname | String(255) | ❌ | Payer first name |
| 2 | lastname | String(255) | ❌ | Payer last name |
| 3 | address | String(500) | ❌ | Address |
| 4 | city | String(50) | ❌ | City. Example: HANOI |
| 5 | state | String(255) | ❌ | State / Province |
| 6 | country | String(2) | ❌ | Country, ISO2 code. Example: VN |
| 7 | String(255) | ❌ | ||
| 8 | phone | String(10) | ❌ | Phone number |
| 9 | postal_code | String(6) | ❌ | Postal code |
Example Request
{
"request_id": "MERCHANT050015588AXE012",
"request_time": "2020-08-11 14:41:00",
"merchant_code": "MERCHANT",
"operation": "AUTHENTICATION",
"order_code": "VLAD_1753867524",
"total_amount": 10000000,
"authen_status": 1,
"status": 5,
"save_token": 0,
"off_3ds": 0,
"extend": {
"billing": {
"firstname": "A",
"lastname": "NGUYEN VAN",
"address": "313 Truong Chinh, Dong Da",
"city": "HANOI",
"state": null,
"country": "VN",
"email": "[email protected]",
"phone": "0394899999",
"postal_code": "100000"
}
},
"created_at": "2020-08-11 14:41:00",
"updated_at": "2020-08-11 14:41:00"
}
Response
(Merchant returns to Baokim)
Main Parameters Table
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | code | String(3) | ✅ | Code to return to Baokim, confirming MERCHANT has received |
| 2 | message | String(20) | ✅ | Message to return |
| 3 | data | Object | ❌ | Data to return if any |
Example Response
{
"code": 0,
"message": "Success",
"data": null
}
Error Code
| Error Code | Description |
|---|---|
| 100 | Success |
| 11 | Failed |
| 101 | Baokim system error |
| 104 | OAuth authentication error |
| 105 | Signature authentication error |
| 301 | Order not found by order_code |
| 302 | Card issue (does not exist, expired) |
| 303 | Card declined |
| 304 | Insufficient card balance |
| 305 | User cancelled transaction |
| 306 | Incorrect OTP |
| 308 | Transaction has not completed Authentication |
| 309 | Transaction has not completed Authorization |
| 310 | Transaction already reversed, cannot capture |
| 311 | Transaction already captured, cannot reverse |
| 313 | Bank-side processing error |
| 422 | Validation error: RequestId invalid |
| 422 | Validation error: RequestTime invalid |
| 422 | Validation error: PartnerCode invalid |
| 422 | Card_data invalid |
| 422 | Amount invalid |