Accept UPI, cards, net banking, AutoPay subscriptions and PayPal with one API. Smart routing, GST invoices, reconciliation and payouts are built in. Self-hosted, and the money lands straight in your own accounts.
The parts that usually take five different products, in one self-hosted platform.
UPI (QR and intent), net banking, cards, ACH, SEPA and PayPal on a hosted, mobile-first checkout.
UPI AutoPay, e-NACH and card mandates, or an invoice each cycle. Trials, quantities and smart dunning retries.
CGST + SGST or IGST chosen automatically from place of supply, with HSN/SAC codes and a Pay button.
Route by priority, live success rate or lowest cost. If a gateway goes down, the next one takes over automatically.
Upload your bank statement and zero-fee UPI payments are matched by UTR and confirmed for you.
Pay vendors by IMPS, NEFT, RTGS or UPI, and split marketplace payments between sellers automatically.
Sell without a website. Share a link or print a QR for your counter, with fixed or pay-what-you-want amounts.
Risk scores, blocklists, velocity limits, an AES-256 encrypted vault, signed webhooks and an audit log.
Volume, success rates by method and gateway, MRR, churn and exports across every gateway, in one place.
Keep the gateways you trust. SangamPay sits on top and adds what they don't have.
| A single gateway | SangamPay | |
|---|---|---|
| Gateway outage | Checkout breaks | ✓Automatic failover to the next gateway |
| UPI fees | MDR on every payment | ✓₹0 direct UPI with auto-reconciliation |
| Your money | Held by the gateway, settled T+1/T+2 | ✓Lands directly in your accounts |
| Reporting | One dashboard per gateway | ✓One ledger across all of them |
| Lock-in | Contracts, APIs, data | ✓Switch gateways with a config change |
| Source code | Closed | ✓MIT open source, self-hosted, auditable |
Fast, mobile-first and in dark mode automatically. Customers pick UPI, a bank or a card. Bank logins and card numbers are only ever typed on the bank's own page.



Bill once or every month. SangamPay works out the tax, collects through mandates and chases failed payments for you.
Clean REST, idempotency keys, signed webhooks, OpenAPI docs, a sandbox with time travel, and zero-dependency SDKs.
from sangampay import SangamPay, verify_webhook sp = SangamPay("sk_test_...") pi = sp.payment_intents.create( amount=49900, currency="INR", # ₹499.00 description="Order #1001", idempotency_key="order-1001", ) redirect(pi["checkout_url"]) # later, in your webhook handler event = verify_webhook(body, sig, "whsec_...") if event["type"] == "payment_intent.succeeded": fulfil(event["data"]["id"])
const { SangamPay, verifyWebhook } = require("sangampay"); const sp = new SangamPay(process.env.SANGAM_KEY); const pi = await sp.paymentIntents.create( { amount: 49900, currency: "INR" }, { idempotencyKey: "order-1001" }, ); res.redirect(pi.checkout_url); // webhook const event = verifyWebhook(req.body, req.get("Sangam-Signature"), secret);
curl -X POST https://pay.yourshop.com/v1/payment_intents \ -H "Authorization: Bearer sk_test_..." \ -H "Idempotency-Key: order-1001" \ -H "Content-Type: application/json" \ -d '{"amount": 49900, "currency": "INR", "description": "Order #1001"}' # → { "id": "pi_...", "checkout_url": "https://..." }






Everything works in test mode out of the box, with a built-in sandbox for every payment method.
Python 3.10+, SQLite by default.
git clone https://github.com/Rohesen/sangampay cd sangampay pip install -r requirements.txt uvicorn sangam.main:app
Realistic payments, subscriptions and invoices.
python -m sangam.demo # prints a test key → open # localhost:8000/dashboard
Docker + Postgres, then connect your own gateway accounts.
cp .env.example .env docker compose up -d
Non-custodial by design. SangamPay never receives or holds customer funds. Payments settle in your own Razorpay, Stripe, PayPal or bank accounts, which is why anyone can self-host it. Keep it that way: pooling funds for others requires a payment aggregator licence (RBI in India).
SangamPay is free and MIT licensed. Star it, self-host it, and help add the next gateway.