| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Initiate Aadhaar verification and obtain the references needed to validate the OTP.
Endpoint
POST https://pay2new.in/apis/v1/verification/aadhaar
Headers
| Header | Required | Value / description |
|---|---|---|
secret | Yes | Your Pay2New API secret. Keep it on your server. |
Content-Type | Yes for JSON requests | application/json |
Accept | Optional | application/json |
Authentication
Use an active Pay2New partner account with verified KYC, an active wallet and API access. Send requests from your registered IP address. Enable the relevant service where applicable; offer services may also require an active plan.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
aadhaar_number | string | Yes | Customer Aadhaar number, supplied with customer consent. |
latitude | decimal string | Yes | Customer/outlet latitude as a decimal value. |
longitude | decimal string | Yes | Customer/outlet longitude as a decimal value. |
ip | string | Yes | End-user IPv4 address. |
request_id | string | Yes | Unique client reference for this request. Store it for reconciliation and support. Minimum 8 characters. |
Request example
Illustrative values
All identifiers, identity data, amounts and IP addresses in these examples are synthetic. Replace the secret, product/customer references and sample inputs with the values for your integration before sending a request.
curl --request POST \
--url 'https://pay2new.in/apis/v1/verification/aadhaar' \
--header 'secret: <YOUR_PAY2NEW_SECRET>' \
--header 'Content-Type: application/json' \
--data '{
"aadhaar_number": "123412341234",
"latitude": "19.0760",
"longitude": "72.8777",
"ip": "203.0.113.10",
"request_id": "EXAMPLE202609260001"
}'
Response fields
| Field | Type | Description |
|---|---|---|
status | integer | 1: successful operation; 2: failed/rejected operation; 3: pending or indeterminate where returned. |
message | string | Human-readable result or error message. |
order_id | string | Pay2New transaction/order reference. Store it for reconciliation. |
request_id | string | Client request reference associated with the operation. |
ref_id | string / null | Reference to send to the Aadhaar Validation API; may be null on failure. |
Response example
{
"status": 1,
"message": "Transaction Successful!",
"order_id": "P2N_EXAMPLE_AADHAAR",
"request_id": "EXAMPLE202609260001",
"ref_id": "EXAMPLE_AADHAAR_REFERENCE"
}
Integration notes
Store order_id and ref_id from the initiation response. Ask the customer for the OTP and send both references to Aadhaar Validation. Never substitute an unrelated transaction reference.
Errors
Application failures return status: 2 and a message. Invalid fields can also be identified in an errors object. Authentication, IP registration, service access and product availability can prevent processing. Other response fields may be absent when processing fails before a transaction is created. Evaluate the JSON result even when the HTTP request completes successfully. Preserve your request and order references when an outcome is pending or indeterminate.
{
"status": 2,
"message": "Invalid Parameters",
"errors": {
"aadhaar_number": "Illustrative field validation message"
}
}
