AEPS Transaction OTP

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Start the OTP step for an AEPS cash withdrawal greater than ₹5,000. Use the returned reference in Cash Withdrawal.

POST https://pay2new.in/apis/aeps/v1/transactionOtp

Headers

HeaderRequiredDescription
secretYesYour Pay2New API secret.
outletIdYesPay2New outlet/customer ID returned after successful onboarding; do not send the provider outlet ID.
Content-TypeYesapplication/json
AcceptNoRequest a JSON response.

Requests require an active partner account, approved KYC, active wallet and API access, an allowlisted source IP, and the relevant service enabled.

📘

Before biometric capture

Call this API first for a withdrawal above ₹5,000. If an OTP is sent, collect it and include it in the RD capture options before obtaining the biometricData for Cash Withdrawal. This request itself needs only biometricData.aadhaar_number, not a device capture.

JSON request

FieldRequiredDescription
amountYesWithdrawal amount strictly greater than ₹5,000. Use a multiple of ₹50 so the subsequent withdrawal is valid.
bankiinYesBank IIN returned by the AEPS bank list.
latitudeYesLatitude as a decimal value. Accepted as a JSON number or decimal string.
longitudeYesLongitude as a decimal value. Accepted as a JSON number or decimal string.
customer_mobileYesCustomer mobile. Exactly 10 characters. Digits only.
product_codeYesProduct code enabled for your partner account. Retrieve it from the product list. Digits only. Allowed value(s): 243.
ipYesIPv4 address of the customer-facing endpoint.
biometricDataYesJSON object containing aadhaar_number; exactly 12 numeric digits. This OTP endpoint does not consume device capture fields.

Usage notes

  • Use product_code 243 and an amount greater than ₹5,000.
  • Pass data.referenceKey to Cash Withdrawal with the corresponding withdrawal details. Keep the returned validity value.
  • No otp or request_id is required in this OTP-generation request. The withdrawal request needs its own unique request_id.

Biometric request fields

This preliminary OTP request uses only biometricData.aadhaar_number. Perform the full RD capture later, including the OTP when required, for Cash Withdrawal.

JSON fieldValue / RD mapping
biometricData.aadhaar_numberConsenting customer/merchant Aadhaar number; exactly 12 digits.

Format reference: Instantpay Transaction OTP. The request below uses Pay2New’s URL, authentication and field names.

Request example

The values below are synthetic. Replace them with the consenting customer’s details and bank IIN. Use product code 243.

{
  "amount": "6000.00",
  "bankiin": "000000",
  "latitude": "18.5204",
  "longitude": "73.8567",
  "customer_mobile": "9000000001",
  "product_code": "243",
  "ip": "192.0.2.10",
  "biometricData": {
    "aadhaar_number": "999999999999"
  }
}

Complete cURL request

curl --request POST \
  --url 'https://pay2new.in/apis/aeps/v1/transactionOtp' \
  --header 'secret: YOUR_PAY2NEW_SECRET' \
  --header 'outletId: YOUR_PAY2NEW_OUTLET_ID' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data '{
  "amount": "6000.00",
  "bankiin": "000000",
  "latitude": "18.5204",
  "longitude": "73.8567",
  "customer_mobile": "9000000001",
  "product_code": "243",
  "ip": "192.0.2.10",
  "biometricData": {
    "aadhaar_number": "999999999999"
  }
}'

Response

Application status is returned in the JSON status field. A successful HTTP response alone does not confirm a successful operation.

FieldDescription
statusinteger: application status, not HTTP status
messagestring
data.referenceKeyReference to pass as top-level referenceKey in Cash Withdrawal.
data.validityProvider-returned validity value; retain it as returned. May be null.
order_idnull

status: 1 means this preparatory operation succeeded; it does not confirm a withdrawal or that an OTP has been verified. Pay2New maps the provider’s OTP-sent state to status: 1. Read message to distinguish OTP sent from an explicit OTP-not-required result. status: 2 indicates failure and status: 3 indicates an uncertain outcome. referenceKey and validity can be null if absent upstream; do not submit a withdrawal above ₹5,000 without a usable reference.

Illustrative response:

{
  "status": 1,
  "message": "OTP Successfully sent",
  "data": {
    "referenceKey": "EXAMPLE_REFERENCE_KEY",
    "validity": null
  },
  "order_id": null
}

Continue with Cash Withdrawal

Response / next stepAction
OTP sentCollect the customer’s OTP; add it to the RD service PidOptions/Opts otp attribute and perform a fresh capture.
Explicit OTP-not-required resultCapture biometrics without an OTP and keep the returned referenceKey.
Ready to withdrawSend the fresh biometricData and referenceKey to Cash Withdrawal, with the corresponding amount, Aadhaar, bank, mobile and outlet.
Missing or expired referenceResolve the response before proceeding. Do not treat a null reference as valid.

🚧

OTP is an RD capture input

Do not add a plain otp field to the Pay2New withdrawal JSON. Supply it in the RD capture options and send the resulting encrypted capture. The Cash Withdrawal page contains the complete sequence and a ₹6,000 example.

Errors

Validation errors can include an errors object keyed by field name. Authentication, outlet, service and other processing errors can return only status and message. Errors are application-level responses; do not rely on an HTTP 400 status.

{
  "status": 2,
  "message": "Invalid Parameters",
  "errors": {
    "amount": "Provide a valid value for this field."
  }
}
Body Params
string
required

Strictly greater than 5000 rupees; use a multiple of 50 for the following withdrawal.

string
required

Bank IIN returned by the AEPS bank list.

string
required

Latitude as a decimal value. Accepted as a JSON number or decimal string.

string
required

Longitude as a decimal value. Accepted as a JSON number or decimal string.

string
required

Customer mobile. Exactly 10 characters. Digits only.

string
required

Product code enabled for your partner account. Retrieve it from the product list. Digits only. Allowed value(s): 243.

string
required

IPv4 address of the customer-facing endpoint.

Headers
string
required

Your Pay2New API secret.

string
required

Pay2New outlet/customer ID returned after successful onboarding; do not send the provider outlet ID.

Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json