Skip to main content

Authorizing an OTP transaction

POST 

https://api.cleverhub.co/api/v2/payins/confirm_otp

After submitting a request to Create a PayIn Request using the mobile_money PayIn method, if the stage field is authorize_otp, it means an OTP has been sent to the wallet owner's phone. You should collect the OTP to authorize the Payin. Retrieve the OTP sent to the customer's phone and send a request to our authorization endpoint. If the OTP verification is successful, an STK prompt will be sent to the wallet owner's phone, prompting them to enter their PIN.

Request

Body

    uuidstringrequired

    Payin request ID

    codestringrequired

Responses

Verify OTP successful

Schema
    statusstring

Authorization: app-id

name: app-idtype: apiKeydescription: The app-id is registered and secured inside Hello Clever system and only required when client has initiated or in the middle of the transaction.in: header
name: secret-keytype: apiKeydescription: The secret-key is our client's secret of the source. Required if a publishable key is used to retrieve the source.in: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.cleverhub.co/api/v2/payins/confirm_otp");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var content = new StringContent("{\n \"uuid\": \"APU221YS\",\n \"code\": \"123456\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.cleverhub.co/api
Auth
Body
{
  "uuid": "APU221YS",
  "code": "123456"
}
ResponseClear

Click the Send API Request button above and see the response here!