| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
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
| Header | Required | Description |
|---|---|---|
secret | Yes | Your Pay2New API secret. |
outletId | Yes | Pay2New outlet/customer ID returned after successful onboarding; do not send the provider outlet ID. |
Content-Type | Yes | application/json |
Accept | No | Request 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
| Field | Required | Description |
|---|---|---|
amount | Yes | Withdrawal amount strictly greater than ₹5,000. Use a multiple of ₹50 so the subsequent withdrawal is valid. |
bankiin | Yes | Bank IIN returned by the AEPS bank list. |
latitude | Yes | Latitude as a decimal value. Accepted as a JSON number or decimal string. |
longitude | Yes | Longitude as a decimal value. Accepted as a JSON number or decimal string. |
customer_mobile | Yes | Customer mobile. Exactly 10 characters. Digits only. |
product_code | Yes | Product code enabled for your partner account. Retrieve it from the product list. Digits only. Allowed value(s): 243. |
ip | Yes | IPv4 address of the customer-facing endpoint. |
biometricData | Yes | JSON 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
otporrequest_idis required in this OTP-generation request. The withdrawal request needs its own uniquerequest_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 field | Value / RD mapping |
|---|---|
biometricData.aadhaar_number | Consenting 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.
| Field | Description |
|---|---|
status | integer: application status, not HTTP status |
message | string |
data.referenceKey | Reference to pass as top-level referenceKey in Cash Withdrawal. |
data.validity | Provider-returned validity value; retain it as returned. May be null. |
order_id | null |
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 step | Action |
|---|---|
| OTP sent | Collect the customer’s OTP; add it to the RD service PidOptions/Opts otp attribute and perform a fresh capture. |
| Explicit OTP-not-required result | Capture biometrics without an OTP and keep the returned referenceKey. |
| Ready to withdraw | Send the fresh biometricData and referenceKey to Cash Withdrawal, with the corresponding amount, Aadhaar, bank, mobile and outlet. |
| Missing or expired reference | Resolve 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."
}
}
