NetBanking
This API allows you to accept payments using net banking from supported banks.
This flow enables card-on-file/tokenized card payments. Encryption and PCI-DSS compliance are mandatory.
đ Important:
⢠To integrate with the Custom Card Flow, you must be PCI-DSS certified.
⢠Card Number and CVV must be encrypted using RSA 4096 with padding method RSA/ECB/PKCS1Padding.
⢠The encryptionKey and encryptionKeyId will be provided at the MID level.
⢠If youâre operating with multiple MIDs, note that the encryption credentials will differ for each. Avoid hardcoding these values.
Environment
| 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 |
â ď¸ Before initiating a payment, install the PhonePe Test App and configure the payment template. Skipping this step may result in HTTP 500 errors.
Request
Request Header
| Header Name | Header Value | Description |
| Content-Type | application/json | |
Authorization | O-Bearer <access_token> | Pass access_token received in Authorization call |
Request Parameters
| Parameter Name | Data Type | Mandatory | Description | Constraints |
bankId | String | Yes | Bank id from where payment will be completed. | |
merchantOrderId | String | Yes | Unique merchant order id generated by merchant. | Max Length = 63 charactersNo Special characters allowed except underscore â_â and hyphen â-â |
amount | Long | Yes | Order amount in paisa. | Min Value = 100 (In paise) |
expireAfter | Long | No | Order expiry in seconds. If not passed default value will be used. | Min Value = 300, Max Value = 5184000 Default Value (in Secs): UPI QR: 480 UPI Intent : 600 UPI Collect: 480 Card : 720 NetBanking : 480 |
metaInfo | Object | No | Merchant defined meta info to store additional information.same data will be returned in status and callback response. | |
metaInfo.udf1-5 | String | No | Merchant defined additional information | Max length = 256 characters |
deviceContext.deviceOS | String | Yes | device OS required only in case of UPI_INTENT | Values Allowed = [IOS, ANDROID] |
deviceContext.merchantCallBackScheme | String | Yes | Merchant Callback Scheme. Required only in case targetApp = PHONEPE and deviceContext.deviceOS = IOS | |
paymentFlow | Object | Yes | Additional details required by this flow. | |
paymentMode.type | String | Yes | Type of payment mode | Values Allowed: ⢠UPI_INTENT ⢠UPI_COLLECT ⢠UPI_QR ⢠NET_BANKING ⢠TOKEN ⢠CARD |
merchantUrls.redirectUrl | String | Yes | Url where user will be redirected after completing the payment. Mandatory only for [NET_BANKING, TOKEN, CARD] Payment Mode. | Valid Http url. |
Try it yourself!
headers
body params
Response
Sample Response
{
"orderId": "OMO123456789",
"state": "PENDING",
"expireAt": 1703756259307,
"redirectUrl": ""
}| Field Name | Data Type | Description |
orderId | String | PG generated internal order id. |
state | String | State of the order created, Expected value is CREATED. |
expiryAt | Long | Order expiry date in epoch (in milliseconds). |
redirectUrl | String | Url where merchant is supposed to redirect user to complete payment. |