Login

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:

  1. Authenticate the Request
  2. Initiate a Checkout Request
  3. Initiate Send OTP
  4. Validate OTP
  5. 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

HeaderValueRequired
AuthorizationBearer <Bearer_Token> generated during authenticate request in step 1.YES
Content-Typeapplication/jsonYES

Request Parameters

Parameter NameTypeDescription
checkoutRequestIDstringA unique transaction ID identifying the transaction logged in the checkout platform.
MSISDNstringThe mobile number the customer would like to use to initiate payment.

Example

{
    "MSISDN" : "233700000000",
    "checkoutRequestID":"123456" 
}

Response Parameters

Parameter NameTypeDescription
statusJSON Object
statusCodestringA status indicating the result of payment processing.
200 - success
422 - Failed
statusDescriptionstringA 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

HeaderValueRequired
AuthorizationBearer <Bearer_Token> generated during authenticate request in step 1.YES
Content-Typeapplication/jsonYES

Request Parameters

Parameter NameTypeDescription
checkoutRequestIDstringA unique transaction ID identifying the transaction logged in the checkout platform.
MSISDNstringThe mobile number the customer would like to use to initiate payment.
tokenstringThis is a 6 digit number that the customer will receive on their mobile phone

Example

{ 
    "MSISDN":"233700000000", 
    "checkoutRequestID":"123456", 
    "token":"47242111" 
}

Response Parameters

Parameter NameTypeDescription
statusJSON Object
statusCodestringA status indicating the result of payment processing.
200 - success
422 - Failed
statusDescriptionstringA description of the status provided above.

Example

{ 
    "status": { 
        "statusCode": 200, 
        "statusDescription": "Token was validated successfully" 
    } 
}

Authentication Failure Response

{
    "message": "Unauthenticated.",
    "status_code": 500
}