UPI
UPI (Unified Payments Interface) is an Indian instant payment system and protocol developed by the National Payments Corporation of India (NPCI) in 2016. It allows users to link their bank accounts to a mobile application and make online transactions seamlessly
Features
Processing currencies | INR |
---|---|
Settlement currencies | INR |
Minimum transaction amount | 100.00 INR |
Maximum transaction amount | 50000.00 INR |
Refunds | ❌ |
Partial Refunds | ❌ |
Multiple partial refund | ❌ |
Chargeback | ❌ |
Integration Method
Payment method enumeration values: upi
There is integration method for UPI
- Direct API
Direct API
How to integration
For direct API integration, you can create a PaymentIntent and get url in only one step. The following is the demo of creating payment intent:
Create a PaymentIntent
A PaymentIntent is an object that represents your intent to collect payment from your customer and tracks the lifecycle of the payment process. Create a PaymentIntent on your server and specify the amount to collect and a supported currency. If you have an existing Payment Intents integration, add upi
the list of payment method types.
Request Create a PaymentIntent
{
"amount":10000,
"currency":"INR",
"confirm":true,
"payment_method_data" : {
"type":"upi",
"billing_details":{
"email":"XXXXX@XXXX.XXX"
}
},
"return_url":"https://wooshpay.com"
}
Response
{
"id": "pi_1853358041907331072",
"object": "payment_intent",
"created": 1730709966000,
"livemode": false,
"currency": "INR",
"amount": 10000,
"status": "requires_action",
"client_secret": "pi_1853358041907331072_secret_0H7fzK0uw8IGjA7M76qrmttp",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": {
"url": "https://XXXXXXXXXXXXXXXXx"
}
},
"payment_method_types": [
"upi"
],
"confirmation_method": "automatic",
"return_url": "https://wooshpay.com",
"payment_method": "pm_1853358041785696256",
"capture_method": "automatic"
}
Checkout
Payment flow
- Customer selects UPI from the list of payment methods available and clicks on the Pay botton
- Customers will be redirected to UPI's page, and approve the payment
Create a Session
Request
{
"cancel_url": "www.wooshpay.com",
"mode": "payment",
"success_url": "https://wooshpay.com/",
"payment_method_types": [
"upi"
],
"line_items": [
{
"price_data": {
"currency": "INR",
"unit_amount": 20000,
"nickname": "apple",
"product_data": {
"name": "apple",
"description": "very delicious"
}
},
"quantity": 1
}
]
}
Response
{
"id": "cs_1745349377481768960",
"object": "checkout.session",
"created": 1704958693000,
"livemode": false,
"currency": "INR",
"customer": "",
"mode": "payment",
"status": "open",
"url": "https://checkouttest.wooshpay.com/pay/cs_test_1745349377481768960?key=cGtfdGVzdF9OVEUyTlRjNU5ESXpNalUxTXpNME56ZzVNVE14T2pNemIxTTJhVVZrTmtOdmFsWlBSRTFuVFc1SVREaFljREUyT0RReE1Ua3lNamd6TVRR",
"cancel_url": "www.wooshpay.com",
"line_items": {
"object": "list",
"data": [
{
"id": "li_1745349377502740480",
"object": "item",
"currency": "INR",
"description": "apple",
"price": {
"id": "price_1745349377511129088",
"object": "price",
"created": 1704958693000,
"livemode": false,
"active": false,
"currency": "INR",
"nickname": "apple",
"product": "prod_1745349377519517696",
"type": "one_time",
"unit_amount": 20000
},
"quantity": 1,
"amount_subtotal": 20000,
"amount_total": 20000
}
]
},
"payment_intent": "pi_1745349382124863488",
"payment_method_types": [
"upi"
],
"payment_status": "unpaid",
"success_url": "https://wooshpay.com/",
"amount_subtotal": 20000,
"amount_total": 20000,
"billing_address_collection": "auto",
"expires_at": 1705045093276,
"payment_link": "",
"client_secret": "pi_1745349382124863488_secret_4zzY2IQsRmMx9b2Vyk5TgHmF"
}
Next step
You can add more features to your integration as needed
Webhook
Listen to events on your WooshPay account so your integration can automatically trigger reactions. Create a webhook that mainly focuses on enabled_events and url.