U UPI Gateway API Docs
Platform online
DEVELOPER DOCUMENTATION

Build reliable payments
with simple APIs.

Everything you need to create orders, track transactions, and accept payments with permanent links through UPI Gateway.

REST APISimple JSON requests
HTTPSSecure transport only
30 minPending order timeout
01

Authentication

Every API request requires your unique user token.

!
Keep your token private

Store user_token on your server and proxy API requests through your backend in production. Do not expose a live token in public browser JavaScript.

Copy your token from the Settings panel in your UPI Gateway account. Include it in the JSON request body as user_token.

02

Test the API

Run a live request with your API token directly from this documentation page.

!
Use test credentials only

Your token is used in this browser session and is not stored by this page. Use a server-side proxy for production requests. The API must allow CORS requests from this website.

Create order

POST

Check order status

POST

Check the latest status of an existing order using the same API token.

Create payment link

GET

Build your reusable payment URL. Leave both fields empty to accept a custom amount.

Response

No request sent
Responses will appear here.
02
POST

Create an order

Create a new payment order and receive a hosted payment URL.

POST https://upigateway.dev/api/create-order
Order timeout warning

Orders automatically transition to FAILURE if they remain pending for more than 30 minutes.

Request body

JSON
{
  "customer_mobile": "8145344963",
  "user_token": "${apiToken}",
  "amount": "149",
  "order_id": "ORDER_ID_12345",
  "redirect_url": "https://yourwebsite.com/callback",
  "remark1": "test_remark",
  "remark2": "test_remark_2"
}

Success response

200 · SUCCESS
{
  "status": true,
  "message": "Order Created Successfully",
  "result": {
    "orderId": "ORDER_ID_12345",
    "payment_url": "${window.location.origin}/pay/token_id..."
  }
}

Error response

400 · ERROR
{
  "status": false,
  "message": "Order ID already exists"
}
03
POST

Check order status

Retrieve the latest transaction status for an existing order.

POST https://upigateway.dev/api/check-order-status

Request body

JSON
{
  "user_token": "${apiToken}",
  "order_id": "ORDER_ID_12345"
}

Success response

200 · COMPLETED
{
  "status": true,
  "message": "Transaction Successfully",
  "result": {
    "txnStatus": "COMPLETED",
    "orderId": "ORDER_ID_12345",
    "status": "SUCCESS",
    "amount": "149",
    "date": "2024-01-12 13:22:08",
    "utr": "412345678901"
  }
}

Failed response

200 · FAILURE
{
  "status": false,
  "message": "Transaction Failed",
  "result": {
    "txnStatus": "FAILURE",
    "orderId": "ORDER_ID_12345",
    "status": "FAILURE",
    "amount": "149",
    "date": "2024-01-12 13:22:08"
  }
}
04
POST

Webhooks & callbacks

Receive transaction updates, then verify every payment server-side.

After checkout, the customer returns to your required redirect_url. The platform also sends an HTTP POST webhook to your configured callback target.

WEBHOOK JSON
{
  "status": "SUCCESS",
  "orderId": "UNIQUE_ORDER_ID_12345",
  "amount": "149",
  "utr": "412345678901",
  "date": "2026-07-05 13:22:08",
  "remark1": "optional_remark",
  "remark2": "optional_remark_2"
}
!
Always verify webhook events

Never mark an order as paid from the webhook body alone. Call the secure Check Order Status API from your server and validate the order ID, amount, final status, and UTR.

05

Error codes & API limits

Handle these responses consistently in your integration.

HTTP statusError code / conditionDescription & solution
200SUCCESSRequest executed successfully.
400MISSING_FIELDSRequired parameters such as user_token, amount, or order_id are missing from the request body.
401INVALID_TOKENToken is invalid or expired. Copy the current token from the Settings panel.
429RATE_LIMIT_EXCEEDEDSubscription rate limit exceeded. Upgrade your plan or space out requests.
503MAINTENANCE_MODEPlatform or target gateway is undergoing scheduled maintenance.
06

Integration checklist

A few practical steps for a reliable payment flow.

  • 01
    Generate unique order IDs

    Never reuse an order ID. Store it with your internal order record.

  • 02
    Keep API calls server-side

    Protect your user token and validate all payment data on your server.

  • 03
    Poll pending orders responsibly

    Check status with reasonable intervals and stop after the 30-minute timeout.

  • 04
    Verify the final status

    Only mark an order paid after validating the status, amount, order ID, and UTR.

Copied to clipboard