🇮🇳 BitPays India API — INR
Collect and disburse in India over UPI intent + QR. The contract is identical to every other BitPays market — one base URL, one bearer token, the same webhook envelope. Only the currency, method and checkout differ.
At a glance
| Country code | IN |
|---|---|
| Currency | INR (₹) |
| Methods | upi-intent · p2p · p2c · BANK |
| Rail | UPI intent + QR |
| Customer (upi-intent, p2p) | Send the customer's real customer.name, customer.phone (10-digit mobile) and customer.email whenever you have them; the acquiring bank expects them on every transaction. Requests without them are still accepted. |
| Amounts | Integer whole rupees — 500 means ₹500, not paise. |
| Limits | Integer only — decimals are rejected. Platform range 100–100,000 INR per order; per-merchant limits may be lower. |
Environments
| Production | https://api.bitpays.live |
|---|---|
| Staging (pre-production) | https://api.staging.bitpays.live |
| Path prefix | /v1 on every endpoint |
| Content type | application/json |
Staging is not a sandbox. Staging is a pre-production environment connected to live payment channels. Transactions initiated in staging may move real money. Do not use staging for test payments or payouts.
Staging has its own database and its own API keys; production keys do not work there. Treat every staging transaction as real money unless BitPays has confirmed in writing that your staging account is routed to the simulated channel described below.
Simulated channel (only when enabled for your staging account)
BitPays can route a staging account to a simulated channel. It is not on by default and
is configured per account — ask support whether it applies to yours before relying on it. When it
is in use for India, no request leaves the platform: the simulated channel returns a well-formed upi://pay intent pointing at the clearly-marked placeholder VPA bitpays.sandbox@upi, so scanning it in a real UPI app moves no money.
On that simulated channel the result is chosen by the last two digits of the whole amount, so every branch is reproducible on demand:
| Amount ends in | Result | Use it to test |
|---|---|---|
…11 | failed | Failure handling and the payment.failed webhook |
…22 | stays pending | Timeout / expiry handling and polling |
| anything else | success | The happy path and the payment.success webhook |
Webhooks are not simulated separately: the platform status pipeline drives the transition, so the simulated channel exercises your real webhook endpoint and signature verification.
Authentication
Exchange your API keys for a bearer token, then send it on every request. Tokens last 1 hour.
curl -s -X POST https://api.bitpays.live/v1/auth/token \
-H 'Content-Type: application/json' \
-d '{"client_id":"YOUR_CLIENT_ID","client_secret":"YOUR_CLIENT_SECRET"}'
Create a payment
Send an X-Idempotency-Key on every create. Retrying with the same key returns the
original order instead of creating a second one.
curl -s -X POST https://api.bitpays.live/v1/payin/create \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-H 'X-Idempotency-Key: in-order-1001' \
-d '{
"merchant_order_id": "ORDER-1001",
"amount": 500,
"currency": "INR",
"method": "upi-intent",
"customer": { "name": "Rahul Sharma", "phone": "9876543210", "email": "rahul@example.com" },
"return_url": "https://your-site.com/thanks"
}'
The India checkout
The cashier shows a scannable UPI QR plus the payee UPI ID to copy. The app buttons open the customer UPI app so they paste the UPI ID — BitPays does not launch a prefilled pay-intent, which avoids unverified-payee risk prompts.
Payment status
curl -s https://api.bitpays.live/v1/payin/status/ORDER_ID \
-H 'Authorization: Bearer $TOKEN'
Treat the webhook as the source of truth and this endpoint as reconciliation. Never mark an order paid because a checkout page or a payment app merely opened.
Webhooks
BitPays POSTs a signed JSON envelope to your configured URL on every final state
(payment.success, payment.failed, payout.success,
payout.failed). Verify the HMAC signature header before trusting the body, respond
2xx quickly, and make your handler idempotent on delivery_id — retries
use exponential backoff.
Payouts
curl -s -X POST https://api.bitpays.live/v1/payout/create \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-H 'X-Idempotency-Key: in-payout-1001' \
-d '{
"merchant_payout_id": "PO-1001",
"amount": 100,
"currency": "INR",
"method": "UPI",
"beneficiary": {
"name": "Jane Doe",
"phone": "9876543210",
"account_number": "ACCOUNT_NUMBER",
"ifsc": "IFSC_CODE"
}
}'
Payout availability for India depends on your contract — confirm with support before building against it.
In-house collection (BitPays Bank)
Orders routed to the in-house rail are assigned a collector bank or UPI account and a unique fractional amount (for example ₹1499.87). The customer must transfer that exact amount so the incoming credit auto-matches. The merchant is still credited the full order amount.
Order statuses
| Status | Meaning |
|---|---|
created | Order accepted, customer has not paid |
pending | Awaiting the customer or the rail |
processing | The provider is settling it |
success | Paid and confirmed — safe to fulfil |
failed | Not paid |
expired | The payment window elapsed |
Errors & limits
Every error returns a JSON body with success: false, a stable
code and a human message. Branch on code, never on the
message text.
Retry only on 5xx. A 4xx says the request or the account configuration has
to change first, so retrying it unchanged will fail the same way every time.
| HTTP | code | What it means |
|---|---|---|
| 422 | INVALID_REQUEST | Validation failed. details holds the messages per field, and issues[] gives a machine-readable code for each one. |
| 422 | ROUTE_NOT_CONFIGURED | No payment route is enabled on your account for this currency and method. Permanent until support enables that market — do not retry. |
| 422 | AMOUNT_OUTSIDE_LIMITS | No available channel accepts this amount. Try a different amount. |
| 403 | PAYIN_DISABLED | Collections are switched off for your account. |
| 409 | DUPLICATE_ORDER | That merchant_order_id already exists. |
| 409 | IDEMPOTENCY_CONFLICT | The same X-Idempotency-Key was reused with a different body. |
| 503 | PAYMENT_TEMPORARILY_UNAVAILABLE | Every channel for this request is down or at capacity. Retry shortly — this is not a decline. |
| 503 | PROVIDER_ERROR and similar | The upstream bank or acquirer rejected the attempt. See reason below. |
When a create fails at the provider, the response carries what we know, so you do not have to open a ticket to find out why:
reason | The upstream rejection, in plain text, with credentials removed. Present only when the provider told us something useful. |
|---|---|
order_id | The order we created and then marked FAILED. Quote this to support, or read it back from the status endpoint. |
merchant_order_id | Your own reference for the same order. |
retryable | true when the failure looked transient. Absent when we could not tell. |
Rate limits apply per IP, and you should whitelist your server IP before going live in production.
Amount limits
Three things bound an amount, in this order:
| Currency band | A wide sanity range per currency. For INR the API rejects anything outside it with AMOUNT_BELOW_MINIMUM or AMOUNT_ABOVE_MAXIMUM. |
|---|---|
| Your account limits | The per-merchant minimum and maximum set for you. This is the one that usually applies — ask support to change it. |
| Channel limits | Each payment channel has its own range. If an amount falls outside every available channel you get 422 AMOUNT_OUTSIDE_LIMITS. |
Full multi-country reference: /docs