Skip to content
SwifTrail
DEVELOPERS

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

01

Get keys

Sign up, complete KYC, and generate sandbox keys instantly from the dashboard.

02

Create your first payment

One POST request returns a checkout URL or UPI intent.

03

Listen for webhooks

Receive payment.captured and go live with a single key switch.

Create a payment

cURL
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"
  }'
Node.js
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);
Webhooks — HMAC-SHA256 signed, replay-protected
// 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.

ProductBase pathKey endpoints
Pay-In/v1/paymentscreate, fetch, capture, refund, list
Payment Links/v1/payment_linkscreate, fetch, cancel
Subscriptions/v1/subscriptionsplans, mandates, charge, cancel
Payouts/v1/payoutscreate, fetch, bulk, cancel
Beneficiaries/v1/beneficiariescreate, verify, list
Escrow/v1/escrowaccounts, hold, release, split
Verify/v1/verifybank, upi, pan, aadhaar, gstin, ifsc
Fintech Services/v1/servicesaeps, dmt, bbps, recharge, travel
Credit Cards/v1/cardseligibility, apply, status, offers
Fixed Deposits/v1/depositsproducts, quote, open, status
Insurance/v1/insurancequote, propose, issue, renew, claim_assist
Government Schemes/v1/schemeslist, enrol, contribute, status
Global/v1/globalcollections, receiving_accounts, fx_quotes, international_payouts
Webhooks/v1/webhooksregister, 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.