1. Overview
This API is use to resend OTP code request.
2. API Specification
HTTP Method | POST |
Endpoint |
|
SNAP Service Code | 81 |
3. Request
3.1. Request Header
Parameter Name | Type | Length | Required | Description | Sample | |
|---|---|---|---|---|---|---|
| 1 | Authorization | String | 163 | M | Authorization access token. Bearer type. | Bearer eyJxxxx |
| 2 | X-SIGNATURE | String |
| M | Integrity check. Using Asymmetric-Signature mechanism to get the token, encrypted with SHA256withRSA. e.g. stringToSign = <HTTP Method> + ":" + <Service Endpoint> + ":" + toLowercase(hexEncode(SHA256(minify(<Request Body>)))) + ":" + <X-TIMESTAMP> X-SIGNATURE = SHA256withRSA(PrivateKey, stringToSign) | eTCtU8YjKpwTzvOpao1g/ZQPxKzbsbVs6iTAAECB40aWoCVptjok59uHnbQemvyn3I0FHX/kreMgXMjhs/9NXYuaz3yBzk8TJ9fyYd6DbeeqDDBpTNVaC2dNjCtIjO1xi7ZJ+DLrqz7Wqwn+PwmY+0HJrbM9al5CS/WvjqFXN5FahIRxUfW8Dt3SQ0JNN/ySkz8ari/g7ygiIaLWZf3dSpACgEANiTFfi8YbAJRlMdoRPzwRups8QBdRce8yyW+RhpiEfTeV0CfLdTBiQ7r1HVCZ3V5iU2VxkKj4lXjwbEAJJm6XeEoXugUuLsOYOa8cKQ4bZ2Nxp+xFW6zd3Yk8lA== |
| 3 | X-TIMESTAMP | String |
| M | Timestamp request. Formatted as | 2022-09-28T13:00:00+07:00 |
| 4 | X-CLIENT-KEY | String | M | Merchant ID. Provided by Bank. |
| |
| 5 | X-EXTERNAL-ID | String |
| M | Merchant unique request ID. Must be unique per day. | |
| 6 | CHANNEL-ID | String |
| M | Bank Channel ID. | 88881 |
| 7 | Content-Type | String | M | Request body format type. | application/json |
3.2. Request Body
Name | Type | Length | Required | Description | Sample | |
|---|---|---|---|---|---|---|
| 1 | journeyId | String | 22 | M | Journey ID identification. The value from Payment. |
|
| 2 | bankCardToken | String | 32 | M | User account bind token. |
|
| 3 | merchantId | String | 32 | M | Merchant ID. Provided by BNC. |
|
| 4 | subMerchantId | String | 32 | O | Sub Merchant ID of the Merchant. This property depends on merchant. Provided by BNC. |
|
| 5 | additionalInfo | Object | M | Additional information for the order. | ||
| 6 | -> orderId | String | 22 | M | Order ID of the transaction. The value from Payment. |
|
3.2.1. Sample Request Body
{
"journeyId": "24483651",
"bankCardToken": "912b11d4f0444ea097ad272b30813cd1",
"merchantId": "000580000151",
"additionalInfo": {
"orderId": "3001588432701102444545"
}
}
4. Response
4.1. Response Body
Name | Type | Length | Required | Description | Sample | |
|---|---|---|---|---|---|---|
| 1 | chargeToken | String | 40 | M | The unique code for information only. Following SNAP Standard |
|
| 2 | responseMessage | String | 200 | M | The message corresponding to the response code. |
|
| 3 | responseCode | String | 7 | M | The BI Snap standard of response code. |
|
4.1.1. Sample Response Body
Success:
{
"traceId": "4f60f086b9cb15de422ab158d54fd0a2",
"responseMessage": "Successful",
"chargeToken": "f3046f9d-1422-4599-b667-d0ebbb7d171d",
"responseCode": "2008100"
}
Success, SMS already sent and please wait in 1 minute:
{
"traceId": "c55480b69ff9e9b83a68ad583e169716",
"responseMessage": "OTP Sent To Cardholder",
"chargeToken": "50768431-e57c-415a-a48c-c784c0b64fab",
"responseCode": "4038113"
}
Fail:
{
"traceId": "1ebee5859a74cf1a10fec9168fd057e3",
"responseMessage": "Transaction Not Permitted. ",
"chargeToken": "1802f66e-7d19-4a21-af70-bbe333d0fe26",
"responseCode": "4038115"
}
Error Code | Error Message | Description | |
|---|---|---|---|
| 1 | 4018104 | Customer Token Not Found | The bankCardToken is not registered. |
| 2 | 4038118 | Inactive Card/Account/Customer | The bankCardToken is not active. |
| 3 | 4038113 | OTP Sent To Cardholder | The OTP code already sent within 1 minute period. |
| 4 | 4038115 | Transaction Not Permitted. | The transaction already been closed. Transaction invalid after 10 minutes. |
6. Reference
Field Code | Field Name | Description | |
|---|---|---|---|
| 1 | M | Mandatory | Mandatory |
| 2 | ME | Mandatory Equal | Mandatory Equal – value in the request and the response must be the same. |
| 3 | C | Conditional | Conditional |
| 4 | CE | Conditional Equal | Conditional Equal – value in the request and the response must be the same. |
| 5 | O | Optional | Optional |