Token Regenerate API - Mobikwik

This API regenerates a wallet token using an existing token, ensuring continued wallet access without requiring new OTP verification.

Environment

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

Method: GET

📘

Note:

This API uses the same endpoint as Token Generate API but with different parameters and method.

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
mandatory
String Alias for the merchantTestMerchant
amount
mandatory
Integer Maximum cap amount (not transaction amount)200
token
mandatory
String Existing token to be regeneratedMBK_TOKEN_123456789
tokentype
mandatory
Integer Token type (1 for token generation)1
checksum
mandatory
String Calculated checksum for validationcalculated_hash
aggregatedMerchantId
optional
String Unique ID for aggregated merchants (For Aggregators Only)AGG123

📘 Important: 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.

Checksum generation

For aggregators

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

For direct merchants

Format: 'amount''cell''merchantname''mid''msgcode''token''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

GET https://test.mobikwik.com/tokengenerate?mid=MBK9006&cell=9311032820&msgcode=504&merchantname=TestMerchant&amount=200&token=MBK_TOKEN_123456789&tokentype=1&checksum=calculated_hash_value

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

Token regenerated successfully

token

String New generated wallet token

MBK_TOKEN_987654321

checksum

String Response checksum for validation

8feac7700a4efd1ef0 8ea0ec5bf5921c3f1fc33 98944421978794b9ada1c2c47

Response Attributes

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

Status & Status Code Status Code Status description
FAILURE 22 Merchant does not Exist
FAILURE 50 Order Id already processed with this merchant
FAILURE 53 Parameter email is invalid
FAILURE 54 Parameter amount must be numeric with max 2 decimal places only
FAILURE 55 Parameter cell is invalid. It must be numeric, have 10 digits and start with 7,8 or 9
FAILURE 99 Unexpected Error
FAILURE 150 Invalid Message code specified in Input
FAILURE 155 EIther OTP missing or Invalid OTP
FAILURE 158 Please Provide either registered mobikwik Email or Mobile (Not Both) to uniquely identify you
FAILURE 181 Either Email or Mobile is required for OTP generation
FAILURE 190 Token Or OTP missing
FAILURE 198 Either Token missing or Invalid Token or Token Expired
FAILURE 200 Provide Either OTP or Token
SUCCESS 0 Transaction completed successfully

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

Sample response

📘

Notes:

  • Always validate the response checksum for security
  • The old token becomes invalid after successful regeneration
  • Implement proper error handling for token regeneration failures
  • Consider implementing automatic token refresh mechanisms

Success response

{
  "messagecode": "504",
  "status": "SUCCESS",
  "statuscode": "0",
  "statusdescription": "Token regenerated successfully",
  "token": "MBK_TOKEN_987654321",
  "checksum": "8feac7700a4efd1ef08ea0ec5bf5921c3f1fc3398944421978794b9ada1c2c47"
}

Failure scenarios

  • Failure Response - Invalid Token
{
  "messagecode": "504",
  "status": "FAILURE",
  "statuscode": "201",
  "statusdescription": "Invalid or expired token provided",
  "checksum": "f25ac916fe4806591e16269fc912771456437b784fa144a77fa9842d154920cc"
}
  • Failure Response - Token Regeneration Limit Exceeded
{
  "messagecode": "504",
  "status": "FAILURE",
  "statuscode": "202",
  "statusdescription": "Token regeneration limit exceeded",
  "checksum": "e35bc916fe4806591e16269fc912771456437b784fa144a77fa9842d154920dd"
}
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