Initiate OTM Authorization
This endpoint initiates the OTM process. By setting delayedCapture to true, you instruct the system to authorize the funds rather than capture them immediately. The order enters a PENDING state, and the transaction enters AUTHORIZATION_IN_PROGRESS until the user approves the mandate on their UPI app.
API Endpoint
| Environment | HTTP Method | API |
Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/pay |
Production | POST | https://api.phonepe.com/apis/pg/payments/v2/pay |
Request
Request Header
| Header Name | Header Value |
Content-Type | application/x-www-form-urlencoded |
Authorization | O-Bearer <merchant-auth-token> |
Sample Request
{
"merchantOrderId": "ORDER_123456",
"merchantUserId": "USER_001",
"currency": "INR",
"amount": 10000,
"paymentFlow": {
"type": "PG",
"delayedCapture": true,
"paymentMode": {
"type": "UPI_INTENT"
},
"merchantUrls": {
"redirectUrl": "https://merchant.com/redirect",
"cancelRedirectUrl": "https://merchant.com/cancel"
}
},
"metaInfo": {
...
},
"deviceContext": {
"deviceOS": "ANDROID"
},
"expireAfter": 900
}Request Parameters
| Parameter Name | Type | Required | Description | Constraints |
merchantOrderId | String | Yes | Unique order identifier from merchant. | Max Length = 63 characters No Special characters are allowed except underscore “_” and hyphen “-“ |
merchantUserId | String | No | Merchant’s user identifier. | |
currency | String | Yes | Payment currency. | Valid currency code (e.g., INR) |
amount | Long | Yes | Authorization amount in smallest currency unit. | Min: 100 (in paise) |
paymentFlow | Object | Yes | Payment flow configuration. | |
paymentFlow.type | String | Yes | ||
paymentFlow.delayedCapture | boolean | Yes | Must be true for OTM | |
paymentFlow.paymentMode.type | String | Yes | Describes the type of payment mode. | Allowed value: UPI_INTENT |
paymentFlow.merchantUrls | Object | No | Redirect URLs after authorization. | |
metaInfo | Object | No | Merchant defined meta info to store additional information. same data will be returned in status and callback response. | • For udf1 to udf10, there is no constraint and Maximum length for Udf1-10 = 256 characters • For udf11 to udf15, alphanumeric values with _-+@. are allowed and Maximum length for Udf11-15 = 50 characters • It is mandatory to keep the parameter names udf1, udf2, etc., exactly as they are in the metainfo block. Renaming these key values will result in a production error. |
deviceContext | Object | No | Device information. | |
expireAfter | Integer | No | Authorization expiry duration. | Min: 300, Max: 5184000 (seconds) |
Response
Sample Response
{
"orderId": "OMO2506...",
"state": "PENDING",
"expireAt": 1750000000000,
"intentUrl": "upi://pay?...",
"qrData": "...",
"redirectUrl": "https://...",
"nativeOtpEnabled": false
}| Parameter Name | Type | Description |
orderId | String | Payment Gateway generated internal order ID. |
state | String | Order state – PENDING for OTM |
expireAt | Long | Expiry timestamp (epoch ms) |
intentUrl | String | UPI intent URL (for UPI_INTENT) |
qrData | String | QR code data (for UPI_QR) |
redirectUrl | String | Redirect URL for web flows |
nativeOtpEnabled | boolean | Native OTP support flag |