v0.1.0npm install →

Getting Started

How It Works

From the moment a user clicks “Pay” to the merchant receiving INR — every step explained.


The settlement flow

01
Quote requestSDK

The frontend calls auron.getQuote(inrAmount). Auron fetches the live rate from CoinGecko, applies a 0.5% spread, and returns the USDC amount the user must send. The rate is locked for 60 seconds.

02
Wallet signs the transferPhantom

The user approves in Phantom. A TransferChecked SPL instruction moves USDC from the user's ATA to Auron's treasury ATA. The private key never leaves the wallet — your app only receives the confirmed signature.

03
Signature submitted to AuronPOST /api/v1/pay

Once Solana confirms, the frontend sends the signature and payment metadata to Auron. No funds are sent to Auron — only the cryptographic proof that the on-chain transfer happened.

04
6-layer on-chain verificationlib/verify-tx.ts

Auron fetches the parsed transaction from a Solana RPC node and runs six independent checks. A failure at any layer halts the payment with a descriptive error — no partial settlements.

05
INR settlement via RazorpayRazorpay Payout API

If all checks pass, Auron triggers a Razorpay Payout for the INR equivalent to the merchant's UPI ID. Idempotency keys are stored in Vercel KV so a retry never double-pays.

06
Merchant receives INRUPI

The merchant's UPI app shows a credit notification — typically within 2–3 minutes. They never need to know a blockchain was involved. You receive a UTR for reconciliation.

The 6 verification checks

1

Signature confirmed

Transaction must be confirmed or finalized on Solana. Retries 4× (12 s total) before failing.

2

Correct USDC mint

Transfer must reference the canonical USDC mint. Fake tokens are rejected here.

3

Treasury ATA match

Destination must be Auron's derived treasury ATA. Hard failure on mainnet; warn-only on devnet.

4

Amount tolerance

On-chain USDC must match quoted amount within 2%. Handles wallet rounding differences.

5

Idempotency guard

Signature stored in Vercel KV after first settlement. Re-submission returns 409.

6

IP rate limit

10 payment attempts per minute per IP. API key holders get higher per-key limits.

Network reference

BLOCKCHAINSolana
PAYMENT TOKENUSDC · 6 decimals
DEVNET USDCGh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr
MAINNET USDCEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
RATE SOURCECoinGecko · cached 60s · 0.5% spread
SETTLEMENTRazorpay Payout API → UPI
WARNING
On mainnet-beta all 6 checks are hard failures — no warn-only mode. Test thoroughly on devnet before switching NEXT_PUBLIC_SOLANA_NETWORK to mainnet-beta.