UPI Setu

Quickstart

API Playground
v2· latest
New to UPI on Setu?

UPI Setu serves two audiences — merchants who accept payments directly, and aggregators who onboard sub-merchants. This quickstart is the merchant path; aggregator path →.

What can I do with UPI Setu?

UPI Setu caters to two specific categories of businesses — Aggregators and Merchants. Before you dive into the UPI Setu product suite, explore which category you belong to.

Aggregators

Aggregators are online/offline platforms that on-board multiple businesses and provide them value added services. Some examples include —

  1. A food delivery app that onboards multiple restaurants, and enables delivery services for them.
  2. Website creation platform with a storefront, that plugin providers can integrate with.
  3. Insurance and loan marketplaces that can be used by any distributors to sell to customers.

Merchants

Merchants are online/offline businesses that provide goods and services directly to customers. Some examples include —

  1. Loan providers who enable customers to get credit in their account and enable collections for repayment.
  2. Direct-to-consumer brands that want to enable UPI as a payment option on their website/app or other messaging channels.
  3. Streaming platforms that provide online services for education or entertainment through subscriptions and one-time plans.

Choose how to integrate

Already know you're on the merchant path? The tutorial below walks you through your first collect request.

Prerequisites

  • A Setu account — sign up free if you don't have one.
  • A clientID and secret from The Bridge → API credentials.
  • curl, or your HTTP client of choice.

Make your first collect request

Generate an access token

Trade your clientID/secret for a short-lived bearer token.

curl -X POST https://accountservice.setu.co/v1/users/login \
  -H 'client: bridge' \
  -H 'Content-Type: application/json' \
  -d '{ "clientID": "...", "secret": "...", "grant_type": "client_credentials" }'

Response — store access_token and refresh ~4 min before expiry:

{
  "access_token": "eyJhbGciOi...",
  "refresh_token": "eyJhbGciOi...",
  "expires_in": 1800
}

Send your first collect request

One POST creates a collect request payable by any UPI app.

Method
POST
Path
/api/merchant/v2/collect
Headers
Authorization: Bearer <access_token>
X-Setu-Product-Instance-ID: <instance>
Body (required)

amountValue · paise integer
billerBillID · merchant-side reference
payeeName · string

curl -X POST https://uatapi.setu.co/api/merchant/v2/collect \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'X-Setu-Product-Instance-ID: 953XXXXXX' \
  -d '{
        "amountValue": 10000,
        "billerBillID": "INV-001",
        "payeeName": "Acme Pvt Ltd"
      }'
Sandbox vs. production

Sandbox host is uatapi.setu.co; live is api.setu.co. Everything else — payload, headers, response shape — is identical.

Expected response

You'll get a platformBillID and a UPI shortURL you can render as a QR or send over WhatsApp.

{
  "data": {
    "platformBillID": "SETU0xa3...",
    "shortURL":        "https://stu.li/abc",
    "upiID":           "setu.acme@axisb",
    "status":          "BILL_GENERATED"
  },
  "success": true
}
Idempotency

Reusing the same billerBillID within 24 h returns the existing bill, not a new one. Use a fresh value per attempt.

On this page