logo-dp-on-tp

Website integration#

Setu provides ready to use screens for the website integration. Contact Setu to update your logo, colours, fonts as per your branding. You can reach out to billpay.support@setu.co for any further clarifications.


Option 1 — Get Setu URL#

Get a ready-to-use Setu URL, with your branding. No further integration required. This option has a pre-built mobile-OTP module that can verify your customers, to prevent malicious mass bill fetch / pay requests.

Once you are done testing your integration, ensure that all KYC and legal agreements are submitted. Contact Setu for getting enabled on production.


Option 2 — Create your own URL#

This step gives a one time Setu URL to be used by your customer for the bill fetch or payment flow. Generate this link uniquely for each of your customers and make sure you get a new link each time your customer wants to get back to the bill payment journey.

The Create link API needs to be called when Android app wants to obtain a one time link to load Setu’s screen flow inside a webview.

POST https://bills-sandbox.setu.co/direct-link

None of the parameters in this request, aside from mobile number, are mandatory. However, depending on what is passed the returned link will display different UI.

You can have the following scenarios—

  • If no other input is passed, it will take the user to the home page with all BBPS categories.
  • If category code is passed, it will show user a list of billers in that category.
  • If category code and biller ID is passed, it will show the bill fetch form where a customer can enter their identifers (biller specified parameters)
  • If the category code, biller ID and parameters are passed, it will show the bill directly.

All query parameters should be url-encoded to escape special characters


Step 2 — Implement and test webhook (optional)#

This step is only required if you want to get real-time payment status and related details after bill payment is done by customer.

Setu provides a webhook that can be configured, for which you need to do the following

  1. Share the webhook URL
  2. Handle the notification

Share the webhook URL#

This step requires setting up and sharing a webhook URL to Setu which is capable of receiving the transaction notifications. The URL to setup this webhook must be shared with Setu via email to billpay.support@setu.co.


Handle the notification#

The notification consists of body an authentication header as well as a body/payload. The authentication header will be sent as X-BILL-WEBHOOK-API-KEY. The value for the same shall be communicated over email.

The following data will be sent as the payload via a POST call on the URL shared to receive the API notification. It will be triggered on completion of a transaction be it either success or failure.

{
"txnId": "ABC000000123",
"mobileNumber": "1234567890",
"status": "PAYMENT_SUCCESS",
"amount": "100.00"
}

The status field will contain one of the following values:

  • PAYMENT_SUCCESS Transaction completed successfully.
  • PAYMENT_FAILURE Transaction failed. Any money if deducted will be refunded.

The amount field will contain one of the following values:

  • A string value of the amount, rounded to two decimal places.
  • Empty value (null) for failed transactions where no amount is received.

All the values in the response payload are Strings


Step 3 — Get Production credentials and go live#

Once you are done testing your integration, ensure that all KYC and legal agreements are submitted. Contact Setu for getting enabled on production.


Was this page helpful?