| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Look up a transaction using the client request ID supplied when you created it.
Endpoint
POST https://pay2new.in/apis/v1/transactionStatus
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 |
|---|---|---|---|
client_txn_id | string | Yes | The original request_id sent when the transaction was created. |
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/transactionStatus' \
--header 'secret: <YOUR_PAY2NEW_SECRET>' \
--header 'Content-Type: application/json' \
--data '{
"client_txn_id": "EXAMPLE202609260001"
}'
Response fields
| Field | Type | Description |
|---|---|---|
status | integer | 1: transaction record found; 2: no record, invalid input or access failure. This is not the transaction result. |
message | string | Human-readable result or error message. |
order | object | Transaction details; present only when a matching transaction was found. |
Transaction object
| Field | Description |
|---|---|
order.number | Transaction account/subscriber number. |
order.amount | Transaction amount. |
order.status | Transaction outcome: 1 success, 2 failure, 3 pending, 4 reversed/refunded. |
order.order_id | Pay2New transaction reference. |
order.request_id | Original client request ID. |
order.optional1 | Additional original product input, when provided. |
order.optional2 | Additional original product input, when provided. |
order.optional3 | Additional original product input, when provided. |
order.optional4 | Additional original product input, when provided. |
order.message | Transaction result message. |
order.operator_reference | Operator/provider reference; may be null. |
order.customer_number | Customer mobile number. |
order.cashback | Transaction cashback/commission. |
order.charge | Transaction charge. |
order.tds | TDS amount. |
order.closing_balance | Wallet balance recorded for the transaction. |
Response example
{
"status": 1,
"message": "Transaction Found!",
"order": {
"number": "9999999999",
"amount": "100.0000",
"status": "3",
"order_id": "P2N_EXAMPLE_ORDER",
"request_id": "EXAMPLE202609260001",
"optional1": "",
"optional2": "",
"optional3": "",
"optional4": "",
"message": "Transaction Pending",
"operator_reference": null,
"customer_number": "9999999999",
"cashback": "0.0000",
"charge": "0.0000",
"tds": "0.0000",
"closing_balance": "1000.0000"
}
}
Interpreting the result
Send the original request_id as client_txn_id. A top-level status of 1 confirms that a record was found. Read order.status to decide whether the transaction succeeded, failed or remains pending. The lookup is scoped to your authenticated partner account.
Interpreting the result
order.status values: 1 = success; 2 = failure; 3 = pending; 4 = reversed/refunded. Status and monetary values within order can be returned as strings.
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": {
"client_txn_id": "Illustrative field validation message"
}
}
No matching transaction
{
"status": 2,
"message": "No Transaction Found!"
}
