WooshPay OpenAPI
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Back to WooshPay Website
  1. Real-time payments
  • Online payments
    • Quick Start
    • Integration overview
    • Wooshpay JS SDK
    • Wooshpay Checkout
    • Wooshpay Direct API
    • Payment Link
    • Authorize and capture
    • Build subscriptions integration
    • Testing cards
  • After the payment
    • Payouts
    • Webhook
    • Check the webhook signatures
    • 校验webhook签名
  • Add more payment methods
    • Supported payment method
    • Cards
    • Wallets
      • Alipay
      • Alipay HK
      • Apple Pay
      • Google Pay
      • Wechat Pay
      • 微信支付
      • Kakao Pay
      • DANA
      • Boost
      • Grabpay
      • Mcash
      • Touch'n Go
      • ShopeePay
      • UnionPay
      • 9Pay
      • OVO
      • GCash
      • TrueMoney
    • Bank redirects
      • Bancontact
      • BPI
      • Trustly
      • EPS
      • Giropay
      • iDEAL
      • Przelewy24
      • FPX
    • Buy Now Pay Later
      • Klarna
    • Bank Debits
      • Sepa Direct Debit
    • Bank Transfer
      • Bank Transfer in Europe
      • Bank Transfer in United Kingdom
      • Bank Transfer in Indonesia
    • QR Payments
      • QRIS
      • PromptPay
    • Real-time payments
      • PIX
      • PayNow
      • UPI
      • SPEI
  • More payment scenarios
    • Set up future payments
    • Save payment method during payment
  • SaaS platform integration
    • Shopify Plugin
    • Shopastro 星盘
    • WooCommerce
    • Shoplazza 店匠
    • Shopline Plugin
    • Sage Connection
  • Resources
    • Supported currencies
  1. Real-time payments

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 currenciesINR
Settlement currenciesINR
Minimum transaction amount100.00 INR
Maximum transaction amount50000.00 INR
Refunds❌
Partial Refunds❌
Multiple partial refund❌
Chargeback❌

Integration Method#

Payment method enumeration values: upi
There is integration method for UPI
1.
Direct API

Direct API#

Payment flow#

pic_2.png

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":"kutum@gmail.com"
        }
    },
    "payment_method_options":{
        "upi":{
            "app_type":"phonepe" //googlepay、phonepe、other、phonepe,paytm
        }
    },
    "return_url":"https://yourwebsite.com"
}
When app_type is set to "other", the supported other apps can refer to: https://www.npci.org.in/what-we-do/upi/3rd-party-apps
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://yourwebsite.com",
    "payment_method": "pm_1853358041785696256",
    "capture_method": "automatic"
}

Checkout#

Payment flow#

1.
Customer selects UPI from the list of payment methods available and clicks on the Pay botton
88c5e2b2-b9a4-430f-8f9e-39af144c30fe.png
1.
Customers will be redirected to UPI's page, and approve the payment
c9421633-ebde-4c01-bbae-6891becd1408.png

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.
Modified at 2025-03-31 03:39:19
Previous
PayNow
Next
SPEI
Built with