Setu

Setu UPI DeepLinks API

Setu UPI DeepLinks: OAuth token, create UPI payment links, sandbox mock payments, status, expiry and refunds.

PaymentsGuided#upi#payments#india#payment-links#refunds

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

What this is

Setu UPI DeepLinks (also called Collect UPI DeepLinks) lets a business collect UPI payments without building a UPI stack. You send the amount and a bill reference to Setu and get back a short link, a UPI intent link and a UPI ID. The customer opens the link, picks any UPI app and pays. Setu then sends your server a webhook and settles the money to your account on the agreed schedule.

This is the product at setu.co, unrelated to the government API Setu portal (apisetu.gov.in). Setu also has a newer product called UPI Setu (UMAP) with its own endpoints; this collection covers UPI DeepLinks only.

Get credentials

  1. Sign up on The Bridge, Setu's dashboard: https://bridge.setu.co/v2/.
  2. Create a UPI DeepLinks merchant configuration in the sandbox. Add a callback URL (Setu appends /notifications to it) and a dummy settlement account, which sandbox needs for mock settlement.
  3. Copy the Merchant ID shown at the top of the configuration into productInstanceId.
  4. In Org settings, open API keys, OAuth keys, generate a key for that product configuration and copy the clientID and secret. Docs: https://docs.setu.co/payments/upi-deeplinks/quickstart and https://docs.setu.co/payments/upi-deeplinks/resources/oauth.

Authentication

Send your key to the token endpoint to get a short lived bearer token (30 minutes by default, expiresIn in the response). Every other call needs two headers: Authorization: Bearer <token> and X-Setu-Product-Instance-ID: <Merchant ID>. Older JWT signing still works but Setu recommends OAuth, which is what this collection uses.

Base URLs

  • Sandbox: https://uat.setu.co/api/v2
  • Production: https://prod.setu.co/api/v2

The /v2 segment is required when you use OAuth keys. Sandbox and production keys are separate. Production configuration changes need Setu approval before they go live.

Run order

  1. Fill clientId, clientSecret, productInstanceId.
  2. Folder 1: get a token, create a payment link (saves platformBillId and upiId).
  3. Folder 2: mock a customer payment (sandbox only) and check the link status; it moves from BILL_CREATED to PAYMENT_SUCCESSFUL.
  4. Folder 3: refunds and expiring a link.

Amounts in the link are in paise; the sandbox mock payment amount is in rupees.

Limits

Setu does not publish a fixed public rate limit on these pages; do not poll the status API, use the webhook instead. Refunds usually take 1 to 9 business days to reach the customer, and the refund time window is stated on https://docs.setu.co/payments/upi-deeplinks/refunds.

Common errors

ResponseWhat to do
400 invalid-api-key (AUTHENTICATION_ERROR)Recheck clientID and secret and that the key matches the environment
401Token expired; request a new one
404 bill-not-foundThe platformBillID is wrong or belongs to another product configuration
Payment later refundedamountExactness, expiry or duplicate-payment validation failed

Include the traceID from an error when contacting https://setu.co/support. Docs: https://docs.setu.co/payments/upi-deeplinks/overview

Endpoints 8

1. Start here

  • POSTGenerate access token/auth/tokenExchanges your OAuth clientID and secret for a bearer token. The token lasts about 30 minutes (expiresIn is in seconds); it is saved into accessToken and used…
  • POSTCreate payment link/payment-linksCreates a UPI collect link for a bill. billerBillID is your own reference for reconciling later, amount.value is in paise (10000 = INR 100) and currencyCode…

2. Pay and track

  • POSTMock a payment (sandbox only)/triggers/funds/addCreditSimulates a customer paying the link in the sandbox, so you can test your webhook and status handling. amount is in rupees (not paise) and should match the…
  • GETCheck link status/payment-links/{{platformBillId}}Returns the state of one link by platformBillID: status, amountPaid (paise), createdAt, expiresAt, payerVpa and a receipt once paid. Statuses run…

3. Expire and refund

  • POSTExpire a bill/utilities/bills/{{platformBillId}}/expireMarks the bill BILL_EXPIRED on Setu and kills its short link, for example when the customer abandoned checkout and you are creating a fresh link. A wrong…
  • POSTCreate refund (batch)/refund/batchRequests refunds for one or more paid bills in a single batch. Each entry has a seqNo, identifier (the platformBillID), identifierType BILL_ID and refundType…
  • GETCheck refund batch status/refund/batch/{{refundBatchId}}Fetches the status of every refund created in one batch, using the batchID from Create refund. Poll sparingly: refunds are processed with settlement and can…
  • GETCheck one refund status/refund/{{refundId}}Fetches a single refund by its id, saved from Create refund. Use it when you need the state of one payment's refund rather than the whole batch. The id is the…

API details

Base URL
https://uat.setu.co/api/v2
https://prod.setu.co/api/v2
Authentication
A bearer token in the Authorization header
Operations
8 operations on 8 pathsPOST 5GET 3
Main resources
1. Start here 22. Pay and track 23. Expire and refund 4
Description format
Swastik Codes guided collection, API version checked against the docs on 2026-11-18

How to test the Setu UPI DeepLinks API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Setu UPI DeepLinks API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Generate access token” (POST /auth/token), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Setu UPI DeepLinks API?

Setu UPI DeepLinks: OAuth token, create UPI payment links, sandbox mock payments, status, expiry and refunds. It is listed under Payments and has 8 endpoints.

Who publishes the Setu UPI DeepLinks API?

It is listed from Setu's public API description (an OpenAPI document), not published by Setu on Swastik Codes. Anyone who controls setu.co can claim the profile by adding a DNS TXT record.

What is the base URL of the Setu UPI DeepLinks API?

Its description lists 2 base URLs: https://uat.setu.co/api/v2, https://prod.setu.co/api/v2. The first is the usual one; the others are typically sandbox or regional servers.

How do I authenticate with the Setu UPI DeepLinks API?

With A bearer token in the Authorization header.

How many endpoints does the Setu UPI DeepLinks API have?

8 operations on 8 paths (5 POST, 3 GET). The largest groups are 1. Start here, 2. Pay and track, 3. Expire and refund.

Is forking the Setu UPI DeepLinks API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.