Skip to main content
Phone Pe Business Logo

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.

EnvironmentHTTP MethodAPI
SandboxPOSThttps://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/pay
ProductionPOSThttps://api.phonepe.com/apis/pg/payments/v2/pay
Request Header
Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-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 NameTypeRequiredDescriptionConstraints
merchantOrderIdStringYesUnique order identifier from merchant.Max Length = 63 characters
No Special characters are allowed except underscore “_” and hyphen “-“
merchantUserIdStringNoMerchant’s user identifier.
currencyStringYesPayment currency.Valid currency code (e.g., INR)
amountLongYesAuthorization amount in smallest currency unit.Min: 100 (in paise)
paymentFlowObjectYes
Payment flow configuration.
paymentFlow.typeStringYes
paymentFlow.delayedCapturebooleanYesMust be true for OTM
paymentFlow.paymentMode.typeStringYesDescribes the type of payment mode.Allowed value: UPI_INTENT,
UPI_QR
paymentFlow.merchantUrlsObjectNoRedirect URLs after authorization.
metaInfoObjectNoMerchant 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.
deviceContextObjectNoDevice information.
expireAfterIntegerNoAuthorization expiry duration.Min: 300, Max: 5184000 (seconds)
Sample Response
{
  "orderId": "OMO2506...",
  "state": "PENDING",
  "expireAt": 1750000000000,
  "intentUrl": "upi://pay?...",
  "qrData": "...",
}
Parameter NameTypeDescription
orderIdStringPayment Gateway generated internal order ID.
stateStringOrder state – PENDING for OTM
expireAtLongExpiry timestamp (epoch ms)
intentUrlStringUPI intent URL (for UPI_INTENT)
qrDataStringQR code data (for UPI_QR)
redirectUrlStringRedirect URL for web flows
nativeOtpEnabledbooleanNative OTP support flag
Is this article helpful?