OTP Validation
This extra step is to help you verify the customer transacting by requiring them to validate a system generated O.T.P sent to their phone number.
How OTP Validation works
The merchant will:
- Authenticate the Request
- Initiate a Checkout Request
- Initiate Send OTP
- Validate OTP
- Initiate Charge Request for the validated mobile number.
1. Initiate Send OTP
POST https://developer.tingg.africa/checkout/v2/custom/requests/initiateOTP
This endpoint will initiate a request to send a one time pin to the customer's mobile number via SMS.
Header Parameters
Header | Value | Required |
---|---|---|
Authorization | Bearer <Bearer_Token> generated during authenticate request in step 1. | YES |
Content-Type | application/json | YES |
Request Parameters
Parameter Name | Type | Description |
---|---|---|
checkoutRequestID | string | A unique transaction ID identifying the transaction logged in the checkout platform. |
MSISDN | string | The mobile number the customer would like to use to initiate payment. |
Example
{
"MSISDN" : "233700000000",
"checkoutRequestID":"123456"
}
Response Parameters
Parameter Name | Type | Description |
---|---|---|
status | JSON Object | |
statusCode | string | A status indicating the result of payment processing. 200 - success 422 - Failed |
statusDescription | string | A description of the status provided above. |
Example
{
"status": {
"statusCode": 200,
"statusDescription": "Token generated and sent out successfully"
}
}
Authentication Failure Response
{
"message": "Unauthenticated.",
"status_code": 500
}
Validate OTP
POST https://developer.tingg.africa/checkout/v2/custom/requests/validateOTP
This endpoint is used to verify the one time pin entered by the customer.
Header Parameters
Header | Value | Required |
---|---|---|
Authorization | Bearer <Bearer_Token> generated during authenticate request in step 1. | YES |
Content-Type | application/json | YES |
Request Parameters
Parameter Name | Type | Description |
---|---|---|
checkoutRequestID | string | A unique transaction ID identifying the transaction logged in the checkout platform. |
MSISDN | string | The mobile number the customer would like to use to initiate payment. |
token | string | This is a 6 digit number that the customer will receive on their mobile phone |
Example
{
"MSISDN":"233700000000",
"checkoutRequestID":"123456",
"token":"47242111"
}
Response Parameters
Parameter Name | Type | Description |
---|---|---|
status | JSON Object | |
statusCode | string | A status indicating the result of payment processing. 200 - success 422 - Failed |
statusDescription | string | A description of the status provided above. |
Example
{
"status": {
"statusCode": 200,
"statusDescription": "Token was validated successfully"
}
}
Authentication Failure Response
{
"message": "Unauthenticated.",
"status_code": 500
}
Updated 12 months ago