Generate OTP API - Mobikwik

This API generates an OTP for linking Mobikwik wallet account during checkout, enabling seamless wallet payments.

Environment

EnvironmentURL
Testhttps://test.mobikwik.com/otpgenerate
Productionhttps://walletapi.mobikwik.com/otpgenerate

HTTP Method: POST

Request parameters

ParameterDescriptionExample
mid
mandatory
String Unique parent merchant IDMBK9006
cell
mandatory
String Mobile number of the user9311032820
msgcode
mandatory
String Message code to be sent504
merchantname
optional
String Alias for the merchantTestMerchant
amount
mandatory
Integer Maximum cap amount (not transaction amount)200
tokentype
mandatory
Integer Token type (1 for token generation)1
checksum
mandatory
String Calculated checksum for validationcalculated_hash
aggregatedMerchantId
optional
String Unique ID for aggregateId merchants (For Aggregators Only)AGG123
📘

Notes:

  • The amount parameter represents the maximum cap amount, not the actual transaction amount. The debit API will work for amounts less than or equal to this value.
  • The mobile number must be numeric, have 10 digits, and start with 7, 8, or 9
  • Always validate the response checksum for security
  • Use test environment for integration testing before going live
  • The generated OTP is required for the Token Generate API

Checksum generation

For aggregators

Format: 'amount''cell''merchantname''mid''msgcode''tokentype''aggregatedMerchantId'

For direct merchants

Format: 'amount''cell''merchantname''mid''msgcode''tokentype'

Algorithm: HMAC SHA256
Secret Key: Provided by Mobikwik during merchant onboarding

📘

Note:

For merchant MBK9006, the secret key is ju6tygh7u7tdg554k098ujd5468o. Each merchant will receive their unique secret key.

Sample request

POST https://test.mobikwik.com/otpgenerate
Content-Type: application/x-www-form-urlencoded

mid=MBK9006&checksum=0750ff30340013701841399ce85179e90fb186d747d828dbe1d9360d394b9cbc&cell=9311032820&msgcode=504&tokentype=1&amount=200&merchantname=TestMerchant

URL Format:

https://test.mobikwik.com/otpgenerate?mid=MBK9006&checksum=0750ff30340013701841399ce85179e90fb186d747d828dbe1d9360d394b9cbc&cell=9311032820&msgcode=504&tokentype=1&amount=200&merchantname=TestMerchant

Response parameters

Field

Description

Example

messagecode

String Message code from request

504

status

String Transaction status

SUCCESS

statuscode

String Numeric status code

0

statusdescription

String Description of the status

Message Sent to xxxxxx820

checksum

String Response checksum for validation

8feac7700a4efd1ef0 8ea0ec5bf5921c3f1fc3 398944421978794b 9ada1c2c47

Response attributes

The response checksum that will be returned to the users will have the following format:

📘

Note:

Always validate the response checksum to ensure data integrity and security.

Status & Status Code Status Code Status description
FAILURE 20 User Blocked
FAILURE 21 Merchant Blocked
FAILURE 23 Merchant not registered on MobiKwik
FAILURE 33 User does not have sufficient balance in his wallet
FAILURE 51 Length of parameter orderid must be between 8 to 30 characters
FAILURE 55 Parameter cell is invalid. It must be numeric, have 10 digits and start with 7, 8 or 9
FAILURE 120 User does not exist
FAILURE 422 User not allowed to do Transaction. Please fle a support ticket
SUCCESS 0 Message Sent to xxxxxx208

Sample response

Success response

{
  "messagecode": "504",
  "status": "SUCCESS",
  "statuscode": "0",
  "statusdescription": "Message Sent to xxxxxx820",
  "checksum": "8feac7700a4efd1ef08ea0ec5bf5921c3f1fc3398944421978794b9ada1c2c47"
}

Failure response

{
  "messagecode": "504",
  "status": "FAILURE",
  "statuscode": "55",
  "statusdescription": "Parameter cell is invalid. It must be numeric, have 10 digits and start with 7,8 or 9",
  "checksum": "f25ac916fe4806591e16269fc912771456437b784fa144a77fa9842d154920cc"
}
Ask AI Beta

Hi! I am an AI Assistant. Ask me about PayU and get help with your integration.
Responses are generated by AI, may contain some mistakes.

EXAMPLE QUESTIONS