Initiate Payment Request (Pay)
Initiates a UPI payment (debit from payer, credit to payee). This is the primary API for sending money. Supports P2P (person to person) and P2M (person to merchant) payments. The encrypted UPI PIN block is required for authentication. This is an asynchronous API - use reqPayRes with the callbackRef to get the final payment status. The txnId must be unique for idempotency. Amount is always a string with 2 decimal places. The v2 endpoint supports enhanced features including international payments and MCC-based limits.
Request Body
application/json
Device and SIM information required for UPI API authentication and tracking
Unique transaction ID for idempotency. Format - TXN{timestamp}{random}, max 35 characters.
length <= 35Payer or payee details for a transaction
Payer or payee details for a transaction
Transaction amount as string with 2 decimal places
Transaction remarks or note
Encrypted UPI PIN block from Common Library SDK
Transaction type
"PAY" | "COLLECT"Purpose code for the transaction (00 for default)
Response Body
application/json
curl -X POST "https://sandbox-upi-api.m2pfintech.com/upi/v2/wrapper/transaction/reqPayReq" \ -H "Content-Type: application/json" \ -d '{ "deviceInfo": { "deviceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "simId": "8991101200003204510", "deviceType": "MOB", "os": "Android", "telecom": "Airtel", "geoCode": "13.0827,80.2707", "appId": "v2.0", "ipAddress": "192.168.1.50", "location": "Mumbai", "mobile": "919876501234" }, "channelCode": "HDFC0001234", "seqNo": "500", "txnId": "TXN20260301123456ABCD", "payer": { "vpa": "amit.patel@indie", "accountId": "acc-uuid-001" }, "payee": { "vpa": "merchant@upi", "name": "Coffee Shop" }, "amount": "250.00", "remarks": "Coffee payment", "credBlock": "encrypted-upi-pin-block", "txnType": "PAY", "purpose": "00" }'{
"status": "SUCCESS",
"exception": null,
"seqNo": "500",
"callbackRef": "pay-req-uuid-12345",
"message": null,
"result": {
"txnId": "TXN20260301123456ABCD",
"status": "PENDING",
"rrn": "603012345678"
}
}Fetch Transaction by RRN POST
Fetches transaction details by Retrieval Reference Number (RRN). The RRN is a unique identifier assigned to each UPI transaction by NPCI. Useful for looking up specific transactions for support or reconciliation.
Payment Response (Get Payment Status) POST
Fetches the result of a previously initiated payment request. Pass the callbackRef from reqPayReq. Returns the final transaction status including RRN (Retrieval Reference Number), NPCI response code, and transaction details. Poll this API if the initial payment request status is PENDING.
