to search

Introducing Setu API playground Check it out ↗

#Web integration with your own payment gateway

This quickstart explains how to integrate when you opt for your own payment gateway. Use this guide for Setu’s default UPI payment option.

#The payment flow

The following steps describe a typical payment scenario—

  1. User initiates bill payment on Setu’s pre-built screen
  2. Setu calls the Get payment link API from Setu backend to your backend—you give us a one time link where we can redirect your customer for payment
  3. User is redirected to the one time link, and the payment is handled by you
  4. User completes payment
  5. We get webhook event confirming payment
  6. You redirect the user back to the post payment URL, depending on success or failure of payment.

You need to implement the following API for this purpose


As you provided by you, with the suffix: /setu/v1/getPaymentLink.

For example, if the URL provided by you is, the URL for this API will be


Content-Type: application/json

Note that the API key is issued by you


"orderId": "je9V7wWs9N3w",
"amount": 1201.00,
"customerMobileNumber": "9481773053",
"postPaymentUrl": "",
"allowedPaymentMethods": [


"code": "success",
"data": {
"link": ""

The following codes are supported by Setu—

  • success
  • invalid-mobile-number
  • insufficient-balance

The user will proceed to pay on the link. Once the payment is done, the following steps need to be completed by you—

  1. Send Setu the webhook event for payment.
  2. Redirect the user to post payment page at postPaymentUrl provided above.

Was this page helpful?