Cash Withdrawal

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

Initiate an AEPS cash withdrawal.

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

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.

Withdrawals above ₹5,000: OTP process

Withdrawal amountRequired flow
Up to and including ₹5,000This amount rule does not require Transaction OTP or referenceKey. Complete the normal biometric withdrawal flow.
Greater than ₹5,000Call AEPS Transaction OTP, then send its referenceKey with Cash Withdrawal.

The withdrawal amount must also be a multiple of ₹50. For example, ₹5,000 does not trigger this OTP rule; ₹5,050 and ₹6,000 do.

StepActionValue passed to the next step
1. Request transaction OTPCall POST /apis/aeps/v1/transactionOtp with product_code 243, the withdrawal amount, bank IIN, customer mobile, location, IP and biometricData.aadhaar_number.Read JSON status and message. Save data.referenceKey and data.validity.
2. Handle the customer's OTPIf the response indicates an OTP was sent, collect it from the customer. If it explicitly indicates OTP is not required for an on-us transaction, proceed without collecting one.The returned referenceKey is still required for a withdrawal above ₹5,000.
3. Capture biometricsFor an OTP flow, put the customer's OTP in the RD service's PidOptions → Opts otp attribute, then obtain a fresh capture.Map the returned encrypted capture into biometricData.
4. Submit Cash WithdrawalUse the corresponding customer, Aadhaar, bank, amount and outlet. Send referenceKey at the top level, the fresh biometricData and your unique request_id.Retain the withdrawal order_id and request_id for reconciliation.
5. Confirm resultRead the withdrawal response. Reconcile a pending or uncertain outcome before starting another withdrawal.OTP generation success is not withdrawal success.

🚧

Where the customer OTP goes

There is no separate top-level otp field or AEPS OTP-validation request in this Pay2New flow. The OTP is supplied to the RD service before capture. Send the resulting encrypted biometricData together with referenceKey to Cash Withdrawal. Do not reuse a capture obtained before the OTP was included.

RD capture option

Add the otp attribute to your existing RD capture options. This fragment illustrates that attribute only; retain all other device-required capture attributes in the same Opts element.

<Opts otp="CUSTOMER_OTP" />

For the provider's RD instruction and on-us/off-us distinction, see AEPS Transaction OTP. Pay2New normalizes the provider status into status/message; use the Pay2New response fields documented here.

📘

Reference and validity

Use the referenceKey returned for the corresponding transaction and retain the returned validity. Do not hard-code an expiry duration. If the reference is missing, expired, or the response does not clearly identify the next action, resolve that condition before submitting the withdrawal.

JSON request

FieldRequiredDescription
amountYesWithdrawal amount; multiple of ₹50. Above ₹5,000, complete the Transaction OTP flow first. Accepts a JSON number or decimal string.
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.
request_idYesYour reference for this request. At least 8 characters.
product_codeYesProduct code enabled for your partner account. Retrieve it from the product list. Digits only.
ipYesIPv4 address of the customer-facing endpoint.
biometricDataYesFresh biometric capture object from the registered device. Pass the capture fields required by your integration; do not reuse sample or previous capture data. Include aadhaar_number (12 digits) and the fresh registered-device capture fields. Never substitute a sample capture.
captureTypeNoBiometric capture type; defaults to FINGER. Use the type matching the RD capture.
referenceKeyWhen amount > 5000Top-level reference from data.referenceKey in Transaction OTP. Required above ₹5,000; optional at or below ₹5,000.

Usage notes

  • The amount must be a multiple of ₹50.
  • For amounts above ₹5,000, follow the OTP process above before submitting the withdrawal.
  • captureType defaults to FINGER. Include iCount and pCount with the fresh biometric capture.
  • If status is 3, confirm the existing transaction’s status before starting another withdrawal.

Biometric request fields

Pass biometricData as a nested JSON object inside the request. Pay2New accepts aadhaar_number and creates the provider’s encryptedAadhaar internally. Keep sessionKey, pidData, rdsId and the other RD field names exactly as shown.

JSON fieldValue / RD mapping
biometricData.aadhaar_numberConsenting customer/merchant Aadhaar number; exactly 12 digits.
biometricData.dcDeviceInfo.dc
biometricData.ciSkey.ci
biometricData.hmacHmac element text
biometricData.dpIdDeviceInfo.dpId
biometricData.mcDeviceInfo.mc
biometricData.pidDataTypeData.type, for example X for XML
biometricData.sessionKeySkey element text
biometricData.miDeviceInfo.mi
biometricData.rdsIdDeviceInfo.rdsId
biometricData.errCodeResp.errCode
biometricData.errInfoResp.errInfo
biometricData.fCountResp.fCount
biometricData.fTypeResp.fType
biometricData.iCountResp.iCount
biometricData.iTypeResp.iType
biometricData.pCountResp.pCount
biometricData.pTypeResp.pType
biometricData.srnoDeviceInfo/additional_info device serial value
biometricData.sysidDeviceInfo/additional_info system ID, when supplied
biometricData.tsCapture timestamp returned by the RD integration, when supplied
biometricData.pidDataData element text (encrypted PID)
biometricData.qScoreResp.qScore
biometricData.nmPointsResp.nmPoints
biometricData.rdsVerDeviceInfo.rdsVer

Copy capture values from the RD response without altering their case or encrypted contents. Use the actual capture counts/types; the example is a fingerprint capture. Optional device metadata should reflect what your device supplies.

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

Request example: ₹6,000 after the OTP step

📘

Complete biometric sample

The sample below includes the full biometric field structure. Replace the illustrative customer/device values and encrypted-data placeholders with the values from a fresh registered-device capture. Keep the field names and their case; capture counts and types must match the actual device response.

All identities and account values below are synthetic. Replace placeholders, including the enabled product code and fresh device capture, before sending a request.

{
  "amount": "6000.00",
  "bankiin": "000000",
  "latitude": "18.5204",
  "longitude": "73.8567",
  "customer_mobile": "9000000001",
  "request_id": "EXAMPLE202609260001",
  "product_code": "243",
  "referenceKey": "REFERENCE_KEY_FROM_TRANSACTION_OTP",
  "captureType": "FINGER",
  "ip": "192.0.2.10",
  "biometricData": {
    "aadhaar_number": "999999999999",
    "dc": "SAMPLE_REGISTERED_DEVICE_CODE",
    "ci": "20261231",
    "hmac": "BASE64_ENCRYPTED_PID_HASH",
    "dpId": "SAMPLE_DEVICE_PROVIDER_ID",
    "mc": "BASE64_DEVICE_CERTIFICATE",
    "pidDataType": "X",
    "sessionKey": "BASE64_ENCRYPTED_SESSION_KEY",
    "mi": "SAMPLE_DEVICE_MODEL",
    "rdsId": "SAMPLE_RD_SERVICE_ID",
    "errCode": "0",
    "errInfo": "",
    "fCount": "1",
    "fType": "2",
    "iCount": "0",
    "iType": "",
    "pCount": "0",
    "pType": "",
    "srno": "SAMPLE_DEVICE_SERIAL_NUMBER",
    "sysid": "SAMPLE_SYSTEM_ID",
    "ts": "2026-09-26T12:00:00+05:30",
    "pidData": "BASE64_ENCRYPTED_PID_DATA_FROM_OTP_CAPTURE",
    "qScore": "100",
    "nmPoints": "46",
    "rdsVer": "SAMPLE_RD_SERVICE_VERSION"
  }
}

Complete cURL request

curl --request POST \
  --url 'https://pay2new.in/apis/aeps/v1/cashWithdrawal' \
  --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",
  "request_id": "EXAMPLE202609260001",
  "product_code": "243",
  "referenceKey": "REFERENCE_KEY_FROM_TRANSACTION_OTP",
  "captureType": "FINGER",
  "ip": "192.0.2.10",
  "biometricData": {
    "aadhaar_number": "999999999999",
    "dc": "SAMPLE_REGISTERED_DEVICE_CODE",
    "ci": "20261231",
    "hmac": "BASE64_ENCRYPTED_PID_HASH",
    "dpId": "SAMPLE_DEVICE_PROVIDER_ID",
    "mc": "BASE64_DEVICE_CERTIFICATE",
    "pidDataType": "X",
    "sessionKey": "BASE64_ENCRYPTED_SESSION_KEY",
    "mi": "SAMPLE_DEVICE_MODEL",
    "rdsId": "SAMPLE_RD_SERVICE_ID",
    "errCode": "0",
    "errInfo": "",
    "fCount": "1",
    "fType": "2",
    "iCount": "0",
    "iType": "",
    "pCount": "0",
    "pType": "",
    "srno": "SAMPLE_DEVICE_SERIAL_NUMBER",
    "sysid": "SAMPLE_SYSTEM_ID",
    "ts": "2026-09-26T12:00:00+05:30",
    "pidData": "BASE64_ENCRYPTED_PID_DATA_FROM_OTP_CAPTURE",
    "qScore": "100",
    "nmPoints": "46",
    "rdsVer": "SAMPLE_RD_SERVICE_VERSION"
  }
}'

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
order_idstring
txn_valuedecimal string
balancedecimal string or number
request_idstring
login_statusinteger when returned by service
bank_referencestring or null, may be absent
account_balanceprovider decimal value or null, may be absent
bank_namestring or null, may be absent

Provider-dependent fields may be absent or null. status: 2 indicates a failure. For transaction endpoints, status: 3 indicates pending or uncertain processing and requires status confirmation.

Illustrative response:

{
  "status": 1,
  "message": "Success",
  "order_id": "EXAMPLE_ORDER_001",
  "txn_value": "6000.00",
  "balance": "1000.00",
  "request_id": "EXAMPLE202609260001",
  "login_status": 1,
  "bank_reference": "EXAMPLE_BANK_REFERENCE",
  "account_balance": "1000.00",
  "bank_name": "Example Bank"
}

Amount and OTP errors

ConditionHandling
Amount > ₹5,000 without referenceKeyValidation returns status 2, Invalid Parameters and an errors.referenceKey message. Obtain the transaction reference first.
Amount is not a multiple of ₹50Cash Withdrawal returns status 2 with an amount-validation message.
OTP/capture/reference rejectedRead the returned message. Correct the indicated condition and obtain a fresh capture when required.
Withdrawal pending or request times outCheck the existing transaction through Transaction Status. Do not assume failure and repeat the withdrawal.

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

Multiple of 50 rupees. For amounts >5000, complete Transaction OTP first and include referenceKey.

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

Your reference for this request. At least 8 characters.

string
required

Product code enabled for your partner account. Retrieve it from the product list. Digits only.

string
required

IPv4 address of the customer-facing endpoint.

string

Defaults to FINGER. Match the actual RD capture type.

string

Required when amount >5000; optional for amount <=5000. Use data.referenceKey returned by AEPS Transaction OTP for the corresponding withdrawal.

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