Rupe

One API fortaking paymentsand paying out.

Rupe speaks plain REST and JSON. Amounts are in paise, every request carries your own reference, and test keys let you try everything before real money moves.

Test keys work from the first day. Live keys work once live payments are on for your account.

One order, from your server
  1. →POST/v1/orders201order made
  2. →GET/v1/orders/INV-1042200PENDING
  3. ←POST/webhooks/paymentsorder.success
  4. →GET/v1/orders/INV-1042200SUCCESS
https://rupe.live

From order to paid in four steps

The same four steps work for every order, whichever way your customer pays.

Create an order
curl -X POST "https://rupe.live/v1/orders" \
  -H "Authorization: Bearer $SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reference": "INV-1042",
    "amount": 49900,
    "description": "Order 1042",
    "customer": { "name": "Asha Rao", "phone": "9876543210" },
    "return_url": "https://shop.example/orders/1042",
    "callback_url": "https://shop.example/webhooks/payments"
  }'
1

Create an order

Your server sends the amount in paise and your own reference. If a request times out, send it again: the same reference and amount give you the same order back, never a second one.
What comes back
HTTP/1.1 201 Created
{
  "id": "ord_8m2k4q7x9c1v3b5n6z0w2e4r",
  "reference": "INV-1042",
  "status": "PENDING",
  "amount": 49900,
  "checkout": "H2H",
  "pay_url": "https://rupe.live/pay/ord_8m2k4q7x9c1v3b5n6z0w2e4r",
  "upi_intent": "upi://pay?pa=yourshop@bank&pn=Your%20Sho…"
}
Then
// Send the customer to order.pay_url (or show order.upi_intent in your own page).
2

Send your customer to pay

Open pay_url, the hosted pay page that works for every order. When the order's checkout is H2H, you can put its upi_intent behind a button or a QR code in your own page instead.
Webhook to your server
POST /webhooks/payments
Webhook-Id: evt_4h7k2m9p3q8r1s6t5v0w2x4y
Webhook-Event: order.success
Webhook-Signature: t=<unix seconds>,v1=<hex HMAC>

{ "type": "order.success",
  "data": { "reference": "INV-1042", "status": "SUCCESS",
            "amount_paid": 49900, "utr": "429817365012" } }
Check the signature
const expected = crypto
  .createHmac("sha256", secret)
  .update(`${t}.`)
  .update(rawBody) // the body exactly as received
  .digest("hex");
// Equal to v1? Skip a Webhook-Id you have already handled.
3

Hear when it is paid

Each webhook is signed with your secret. Check Webhook-Signature against the raw body, skip a Webhook-Id you have already handled, then mark your order paid.
Your keys
# Test orders: no money moves
Authorization: Bearer sk_test_…

# Live orders, once live payments are on
Authorization: Bearer sk_live_…
Test payment. No real money moves.
Pay Your Shop
₹499.00
Simulate successSimulate failure
4

Try it all in test mode

sk_test_… keys make test orders, and no money moves. Their pay page has Simulate success and Simulate failure buttons that settle the order the way a real payment would, webhook included.

What to know before you start

The questions developers ask us first. The API guide has every field, status and error.

Base URL
https://rupe.live. Test and live requests go to the same address; the key decides which.
Keys
Authorization: Bearer sk_test_…. Make keys in your dashboard's developer settings. Each is shown once: keep it on your server, never in an app or a web page.
Amounts
Whole paise in JSON: ₹499.00 is 49900.
Safe retries
The same reference and amount answer 200 with the same order. The same reference with another amount is refused with REFERENCE_REUSED.
Webhooks
Signed with your secret. Answer with any 2xx within 10 seconds; anything else is tried again after 1 min, 5 min, 15 min, 1 h, 6 h, 24 h, 7 attempts in all.
Late payments
SUCCESS is final. Money that arrives late can still turn a FAILED or EXPIRED order SUCCESS, and you get order.success then.
Payouts
Add a beneficiary with POST /v1/beneficiaries, then pay it with POST /v1/payouts. A webhook says when the money has arrived.

Questions about your integration?

Write to us with what you are building. We will set up your account and test keys so you can start in test mode.