API to pay using wallet directly.

🚧

If the code is PAYMENT_INITIATED, need to check status of the transaction using transaction status API.

{  
   "merchantId":"TESTMERCHANT",
   "transactionId":"TX1234",
   "merchantOrderId":"ORDERID",
   "merchantUserId":"TXX",
   "mobileNumber":"9123456789",
   "amount":100, //total amount
   "paymentSources":[  
      {  
         "mode":"wallets",
         "providers":[  //taking list here for multiple wallet providers
            "PHONEPE" 
         ]
      }
   ]
}
{  
 "request": "<Base64Encode>"
}

Request Headers

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(base64 encoded payload + "/v3/merchant/inline/pay" +
salt key) + ### + salt index

Request Parameters

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique MerchantID assigned to the merchant by PhonePeYes
transactionIdSTRINGUnique merchant transaction id (merchants do a status check etc using this id).Yes
merchantUserId/ userAuthTokenSTRINGUser Id to identify user / token generated while linking userYes
amountLONGTransaction amount in PaiseYes
merchantOrderIdSTRINGMerchant order idNo
paymentSources
ARRAYList of payment sources (explained below)Yes
mobileNumberSTRINGCustomers' mobile numberYes

Response Codes

CODEDespcription
PAYMENT_INITIATED Success scenario - will contain redirect url
AUTHORIZATION_FAILEDValue of X-VERIFY is incorrect
BAD_REQUESTSome mandatory parameter is missing
INTERNAL_SERVER_ERRORSomething went wrong
INVALID_TRANSACTION_IDIf the transaction id is not unique
INVALID_TRANSACTION_IDDuplicate TransactionID
INVALID_USER_AUTH_TOKENThe userAuthToken provided is either invalid or not mapped to merchant.
USER_BLACKLISTEDCustomer is blacklisted on PhonePe side
MERCHANT_USER_NOT_FOUNDNo user exists for merchant id and user id combination.
USER_BLOCKEDUser is blocked for 1 day.

Transaction status check API:

After user is redirected to merchant page after completing the transaction, you can get the
status of transaction using transaction status api. Please use this link for reference.

Language
Click Try It! to start a request and see the response here!