Skip to main content

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 NameData TypeRequiredDescription
1request_idString(100)Unique request ID
2request_timeString(20)Request send time. Format: YYYY-MM-DD H:i:s
3merchant_codeString(50)Merchant identifier
4operationString(20)AUTHENTICATION: card authentication / REFUND: refund
5order_codeString(50)Baokim order code
6total_amountString(255)Total order amount
7authen_statusNumberAuthentication status: 0 - Pending / 1 - Authenticated / 2 - Failed / 3 - Bypass (3ds off)
8statusNumberOrder status on Baokim
9save_tokenNumber0: Do not save token, 1: Save token
10off_3dsNumber0: 3DS not disabled (default), 1: 3DS disabled
11extendObjectExtended data (billing)
12created_atDatetimeOrder creation time
13updated_atDatetimeOrder update time

Extend Information

No.Field NameData TypeRequiredDescription
1billingObjectPayer information

Billing Information

No.Field NameData TypeRequiredDescription
1firstnameString(255)Payer first name
2lastnameString(255)Payer last name
3addressString(500)Address
4cityString(50)City. Example: HANOI
5stateString(255)State / Province
6countryString(2)Country, ISO2 code. Example: VN
7emailString(255)Email
8phoneString(10)Phone number
9postal_codeString(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 NameData TypeRequiredDescription
1codeString(3)Code to return to Baokim, confirming MERCHANT has received
2messageString(20)Message to return
3dataObjectData to return if any

Example Response

{
"code": 0,
"message": "Success",
"data": null
}

Error Code

Error CodeDescription
100Success
11Failed
101Baokim system error
104OAuth authentication error
105Signature authentication error
301Order not found by order_code
302Card issue (does not exist, expired)
303Card declined
304Insufficient card balance
305User cancelled transaction
306Incorrect OTP
308Transaction has not completed Authentication
309Transaction has not completed Authorization
310Transaction already reversed, cannot capture
311Transaction already captured, cannot reverse
313Bank-side processing error
422Validation error: RequestId invalid
422Validation error: RequestTime invalid
422Validation error: PartnerCode invalid
422Card_data invalid
422Amount invalid