Built by developers, for developers
One API key. Everything financial — pay-in, payouts, verification, cards, deposits, insurance, cross-border. Predictable REST endpoints, idempotent requests, signed webhooks and a sandbox that behaves exactly like production.
API reference below is a preview; the full reference lives at docs.swiftrail.ai.
Quickstart
Get keys
Sign up, complete KYC, and generate sandbox keys instantly from the dashboard.
Create your first payment
One POST request returns a checkout URL or UPI intent.
Listen for webhooks
Receive payment.captured and go live with a single key switch.
Create a payment
curl -X POST https://sandbox-api.swiftrail.ai/v1/payments \
-u sr_test_key_id:sr_test_key_secret \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 8f3c2c9e-1b21-4f2a-9d1e-2c1a7e9b1a10" \
-d '{
"amount": 149900,
"currency": "INR",
"order_id": "ORD-10045",
"customer": { "name": "Asha Verma", "email": "asha@example.com" },
"methods": ["upi", "card", "netbanking"],
"callback_url": "https://merchant.example.com/payment/return"
}'import SwifTrail from "@swiftrail/node";
const sr = new SwifTrail({ keyId: process.env.SR_KEY_ID, keySecret: process.env.SR_KEY_SECRET });
const payment = await sr.payments.create({
amount: 149900, currency: "INR", order_id: "ORD-10045",
customer: { name: "Asha Verma", email: "asha@example.com" },
methods: ["upi", "card", "netbanking"],
callback_url: "https://merchant.example.com/payment/return"
}, { idempotencyKey: crypto.randomUUID() });
res.redirect(payment.checkout_url);// Verify a webhook (Node.js)
const sig = crypto.createHmac("sha256", WEBHOOK_SECRET).update(rawBody).digest("hex");
if (!crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(req.headers["x-sr-signature"]))) {
return res.status(400).end();
}
// { "type": "payment.captured", "data": { "id": "pay_01HZX8K3F9Q2", "amount": 149900, ... } }Products & endpoints
Base URLs: sandbox-api.swiftrail.ai · api.swiftrail.ai. Amounts in paise, ISO-4217 currencies, cursor pagination, versioned paths.
| Product | Base path | Key endpoints |
|---|---|---|
| Pay-In | /v1/payments | create, fetch, capture, refund, list |
| Payment Links | /v1/payment_links | create, fetch, cancel |
| Subscriptions | /v1/subscriptions | plans, mandates, charge, cancel |
| Payouts | /v1/payouts | create, fetch, bulk, cancel |
| Beneficiaries | /v1/beneficiaries | create, verify, list |
| Escrow | /v1/escrow | accounts, hold, release, split |
| Verify | /v1/verify | bank, upi, pan, aadhaar, gstin, ifsc |
| Fintech Services | /v1/services | aeps, dmt, bbps, recharge, travel |
| Credit Cards | /v1/cards | eligibility, apply, status, offers |
| Fixed Deposits | /v1/deposits | products, quote, open, status |
| Insurance | /v1/insurance | quote, propose, issue, renew, claim_assist |
| Government Schemes | /v1/schemes | list, enrol, contribute, status |
| Global | /v1/global | collections, receiving_accounts, fx_quotes, international_payouts |
| Webhooks | /v1/webhooks | register, list, test |
Why developers like SwifTrail
Sandbox from day one
Full-fidelity test rails, test cards, test VPAs, simulated failures.
Idempotent by default
Send Idempotency-Key; retries never double-charge or double-pay.
Signed webhooks
HMAC-SHA256 signatures on every event; replay-protected.
Consistent errors
Machine-readable code, human message, doc_url.
SDKs & plugins
Node, Python, PHP, Java, Go, .NET; Android, iOS, React Native, Flutter; Shopify, WooCommerce, Magento.
Status page
Per-rail health and incident history.
Developer support: developers@swiftrail.ai · Status: status.swiftrail.ai
Get sandbox keys today.
A full-fidelity sandbox, test data and a developer channel for your team.
