- METHOD TYPEE-wallet
- PAYMENTS
- PAYOUTS
- REFUNDS
- RECURRING
Introduction
The Unified Payments Interface (UPI) is an instant real-time payment system developed by National Payments Corporation of India to facilitate inter-bank transactions through mobile phones.
Supported Countries
- India
Supported Currencies
- INR
Payment (Deposit) Flow
Press tab to open…
Follow these steps to perform a payment using Nuvei REST API integration:
1. Generate a sessionToken
Press here for details.
2. Send a /payment Request
Perform the payment by sending a /payment request with its mandatory parameters including:
userTokenIdamountcurrencypaymentOption.alternativePaymentMethodblock containing:paymentMethod: “apmgw_UPI“
deviceDetailsblock containing:ipAddressbillingAddressblock containing:country,email
Example /payment Request
{
"sessionToken": "<sessionToken from /getSessionToken>",
"merchantId": "<your merchantId>",
"merchantSiteId": "<your merchantSiteId>",
"clientRequestId": "<unique request ID in merchant system>",
"amount": "1000",
"currency": "INR",
"userTokenId": "<unique customer identifier in merchant system>",
"clientUniqueId": "<unique transaction ID in merchant system>",
"paymentOption": {
"alternativePaymentMethod": {
"paymentMethod": "apmgw_UPI"
}
},
"deviceDetails": {
"ipAddress": "<customer's IP address>"
},
"billingAddress": {
"country": "IN",
"email": "[email protected]"
},
"userDetails": {
"country": "IN",
"email": "[email protected]"
},
"timeStamp": "<YYYYMMDDHHmmss>",
"checksum": "<calculated checksum>"
}
The response includes a redirectUrl, as well as a userPaymentOptionId for use in future transactions.
Example /payment Response
{
"internalRequestId": 44185681,
"status": "SUCCESS",
"errCode": 0,
"reason": "",
"merchantId": "1102398682906145682",
"merchantSiteId": "228311",
"version": "1.0",
"sessionToken": "03f3b27e-c722-4702-b832-8e3b1784fd16",
"orderId": "43748761",
"userTokenId": "INRUPI9988999",
"paymentOption": {
"redirectUrl": "https://prod52.t365.io/test-provider/f326da90-3c58-4aa2-b359-953c09441692",
"userPaymentOptionId": "2153414961",
"card": {}
},
"transactionStatus": "REDIRECT"
}
Redirect the user to redirectUrl to complete the transaction.
After the APM provider processes the transaction, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to the urlDetails.notificationUrl, which Nuvei recommends including in the /payment request.
Follow these steps to perform a payment using Nuvei Web SDK integration.
1. Initiate a Session
Before you can submit payment using the client-side Nuvei Web SDK, you need to send the /openOrder API call.
2. Initialize the Web SDK
Instantiate the Web SDK with the sessionToken received from the server call to /openOrder.
3. Create an APM Payment
Send a createPayment() request with its mandatory parameters including:
paymentOption.alternativePaymentMethodblock containing:paymentMethod: “apmgw_UPI“
billingAddressblock containing:country,email
Example createPayment() Request
sfc.createPayment({
sessionToken: "<sessiontoken>",
paymentOption: {
alternativePaymentMethod: {
paymentMethod: "apmgw_UPI"
}
},
billingAddress: {
country: "IN",
email: "[email protected]"
},
userDetails: {
country: "IN",
email: "[email protected]"
},
}, function(res) {
console.log(res);
});
The user is automatically redirected to the APM provider to complete the payment.
4. Verify the Response
Press here for details.
For example, after the APM provider processes the transaction, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to the URL provided in urlDetails.notificationUrl, which Nuvei recommends including in the /openOrder request. The DMN also includes a userPaymentOptionId to use in future transactions.
Example Payment Page Request
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to notify_url, which Nuvei recommends including in the request.
- REST API
-
Follow these steps to perform a payment using Nuvei REST API integration:
1. Generate a
sessionTokenPress here for details.
2. Send a
/paymentRequestPerform the payment by sending a
/paymentrequest with its mandatory parameters including:userTokenIdamountcurrencypaymentOption.alternativePaymentMethodblock containing:paymentMethod: “apmgw_UPI“
deviceDetailsblock containing:ipAddressbillingAddressblock containing:country,email
Example
/paymentRequest{ "sessionToken": "<sessionToken from /getSessionToken>", "merchantId": "<your merchantId>", "merchantSiteId": "<your merchantSiteId>", "clientRequestId": "<unique request ID in merchant system>", "amount": "1000", "currency": "INR", "userTokenId": "<unique customer identifier in merchant system>", "clientUniqueId": "<unique transaction ID in merchant system>", "paymentOption": { "alternativePaymentMethod": { "paymentMethod": "apmgw_UPI" } }, "deviceDetails": { "ipAddress": "<customer's IP address>" }, "billingAddress": { "country": "IN", "email": "[email protected]" }, "userDetails": { "country": "IN", "email": "[email protected]" }, "timeStamp": "<YYYYMMDDHHmmss>", "checksum": "<calculated checksum>" }The response includes a
redirectUrl, as well as auserPaymentOptionIdfor use in future transactions.Example
/paymentResponse{ "internalRequestId": 44185681, "status": "SUCCESS", "errCode": 0, "reason": "", "merchantId": "1102398682906145682", "merchantSiteId": "228311", "version": "1.0", "sessionToken": "03f3b27e-c722-4702-b832-8e3b1784fd16", "orderId": "43748761", "userTokenId": "INRUPI9988999", "paymentOption": { "redirectUrl": "https://prod52.t365.io/test-provider/f326da90-3c58-4aa2-b359-953c09441692", "userPaymentOptionId": "2153414961", "card": {} }, "transactionStatus": "REDIRECT" }Redirect the user to
redirectUrlto complete the transaction.After the APM provider processes the transaction, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to the
urlDetails.notificationUrl, which Nuvei recommends including in the/paymentrequest. - Web SDK
-
Follow these steps to perform a payment using Nuvei Web SDK integration.
1. Initiate a Session
Before you can submit payment using the client-side Nuvei Web SDK, you need to send the
/openOrderAPI call.2. Initialize the Web SDK
Instantiate the Web SDK with the
sessionTokenreceived from the server call to/openOrder.3. Create an APM Payment
Send a
createPayment()request with its mandatory parameters including:paymentOption.alternativePaymentMethodblock containing:paymentMethod: “apmgw_UPI“
billingAddressblock containing:country,email
Example
createPayment()Requestsfc.createPayment({ sessionToken: "<sessiontoken>", paymentOption: { alternativePaymentMethod: { paymentMethod: "apmgw_UPI" } }, billingAddress: { country: "IN", email: "[email protected]" }, userDetails: { country: "IN", email: "[email protected]" }, }, function(res) { console.log(res); });The user is automatically redirected to the APM provider to complete the payment.
4. Verify the Response
Press here for details.
For example, after the APM provider processes the transaction, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to the URL provided in
urlDetails.notificationUrl, which Nuvei recommends including in the/openOrderrequest. The DMN also includes auserPaymentOptionIdto use in future transactions. - Payment Page
-
Example Payment Page Request
After the transaction is processed, Nuvei sends a Direct Merchant Notification (DMN) that includes the result of the transaction to
notify_url, which Nuvei recommends including in the request.
Example Payment DMN with Status=APPROVED
...'ppp_status=OK&Status=APPROVED&ExErrCode=0&ErrCode=0&errApmCode=0&errApmDescription=&errScCode=0&errScDescription=&Reason=&ReasonCode=0&PPP_TransactionID=43753301&userid=PSEPZEES8845888SD&merchant_unique_id=&customData=&productId=&first_name=John&last_name=Smith&email=john.smith%40email.com¤cy=INR&customField1=&customField2=&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=&invoice_id=&address1=&address2=&country=India&state=&city=&zip=&phone1=&phone2=&phone3=&client_ip=91.220.189.254&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Transact365-PI&expMonth=&expYear=&Token=&tokenId=&AuthCode=&AvsCode=&Cvv2Reply=&shippingCountry=&shippingState=&shippingCity=&shippingAddress=&shippingZip=&shippingFirstName=&shippingLastName=&shippingPhone=&shippingCell=&shippingMail=&total_discount=0.00&total_handling=0.00&total_shipping=0.00&total_tax=0.00&buyButtonProductBundleId=&merchant_site_id=228311&merchant_status=&action=&requestVersion=&message=APPROVED&merchantLocale=&unknownParameters=&payment_method=apmgw_UPI&ID=&merchant_id=1102398682906145682&responseTimeStamp=2024-09-18.06%3A18%3A53&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=PSEPZEES8845888SD&userPaymentOptionId=2153416091&TransactionID=2610000000000061858&externalTransactionId=54eeb832-792e-42cf-a0f5-537da8855f5a&APMReferenceID=30538F01EC120ADF8E3F43E2B7FFE674&orderTransactionId=25007051&totalAmount=1000.00&dynamicDescriptor=Rank+Descriptor&item_name_1=NA&item_number_1=&item_amount_1=1000.00&item_quantity_1=1&item_discount_1=0.00&item_handling_1=0.00&item_shipping_1=0.00&feeAmount=&amountWithoutFee=&houseNumber=&customCurrency=&upoRegistrationDate=20240918&type=DEPOSIT&clientRequestId=&relatedTransactionId=&sessionId=3c8062bcce88f093d4eedc879219&responsechecksum=f233dcb737615b91f21249b687865b41&advanceResponseChecksum=8231fbf36d201df6ddbcee11ae170fdd',
Example Payment DMN with Status=PENDING
...'ppp_status=PENDING&Status=PENDING&ExErrCode=0&ErrCode=0&errApmCode=0&errApmDescription=&errScCode=0&errScDescription=&Reason=&ReasonCode=0&PPP_TransactionID=43753301&userid=PSEPZEES8845888SD&merchant_unique_id=&customData=&productId=&first_name=John&last_name=Smith&email=john.smith%40email.com¤cy=INR&customField1=&customField2=&customField3=&customField4=&customField5=&customField6=&customField7=&customField8=&customField9=&customField10=&customField11=&customField12=&customField13=&customField14=&customField15=&invoice_id=&address1=&address2=&country=India&state=&city=&zip=&phone1=&phone2=&phone3=&client_ip=91.220.189.254&nameOnCard=&cardNumber=&bin=&noCVV=&acquirerId=&acquirerBank=Transact365-PI&expMonth=&expYear=&Token=&tokenId=&AuthCode=&AvsCode=&Cvv2Reply=&shippingCountry=&shippingState=&shippingCity=&shippingAddress=&shippingZip=&shippingFirstName=&shippingLastName=&shippingPhone=&shippingCell=&shippingMail=&total_discount=0.00&total_handling=0.00&total_shipping=0.00&total_tax=0.00&buyButtonProductBundleId=&merchant_site_id=228311&merchant_status=&action=&requestVersion=&message=PENDING&merchantLocale=&unknownParameters=&payment_method=apmgw_UPI&ID=&merchant_id=1102398682906145682&responseTimeStamp=2024-09-18.06%3A18%3A21&buyButtonProductId=&webMasterId=&appliedPromotions=&uniqueCC=&transactionType=Sale&externalEmail=&cardCompany=&eci=&user_token_id=PSEPZEES8845888SD&userPaymentOptionId=2153416091&TransactionID=2610000000000061858&externalTransactionId=54eeb832-792e-42cf-a0f5-537da8855f5a&APMReferenceID=30538F01EC120ADF8E3F43E2B7FFE674&orderTransactionId=25007051&totalAmount=1000.00&dynamicDescriptor=Rank+Descriptor&item_name_1=NA&item_number_1=&item_amount_1=1000.00&item_quantity_1=1&item_discount_1=0.00&item_handling_1=0.00&item_shipping_1=0.00&feeAmount=&amountWithoutFee=&houseNumber=&customCurrency=&upoRegistrationDate=20240918&type=DEPOSIT&clientRequestId=&relatedTransactionId=&sessionId=3c8062bcce88f093d4eedc879219&responsechecksum=ac0cb9c74faf4f8358bbd5c0d4440374&advanceResponseChecksum=868db7a446d5c77eb5a1255f88ba1ce9',
User Experience
- The user is redirected to the UPI page, on which appears a QR code.

- Using a supported app, the user scans the QR code and makes the payment.
A 12-digit UTR (Unique Transaction Reference) appears on the confirmation screen.

- On the UPI page, the user enters the UTR and clicks Submit Ref Number.
A confirmation message appears.

- If the UPI page does not automatically close, the user can close it.
Testing
Test credentials and testing scenarios can be provided by Nuvei if necessary. You can contact Nuvei support for assistance.