v0.1.0npm install →

API Reference

API Reference

All endpoints served from your Auron deployment. Hosted instance: https://auron-mocha.vercel.app


Authentication

Pass your API key in the x-api-key header. Keys are stored as SHA-256 hashes — the raw key is never persisted.

bash
curl -X POST https://auron-mocha.vercel.app/api/v1/pay \
  -H "Content-Type: application/json" \
  -H "x-api-key: ak_live_xxx" \
  -d '{ ... }'
NOTE
Omitting x-api-key triggers human wallet mode — requests pass through without authentication. Use this for browser apps where the user signs the transaction themselves.

Submit a payment

POST/api/v1/pay

Verifies an on-chain USDC transfer and queues a Razorpay UPI payout. All 6 verification checks run before any payout is triggered.

Request body

txSignaturestringREQUIRED

Confirmed Solana transaction signature for the USDC transfer.

merchantUpiIdstringREQUIRED

UPI ID of the merchant — e.g. merchant@paytm

merchantNamestringREQUIRED

Display name of the merchant.

inrAmountnumberREQUIRED

INR amount the merchant should receive.

usdcAmountnumberREQUIRED

USDC amount that was sent on-chain.

paymentIdstringREQUIRED

Your unique payment ID (32 hex chars).

idempotencyKeystringREQUIRED

Unique key per attempt. Reuse on retry to prevent double-pay.

userIdstring

Sender's Solana wallet address. Used for per-user rate limiting.

quoteFxRatenumber

FX rate from getQuote(). Enables price guard — rejects payments where the live rate moved more than 2% against the quote.

Response

json
{ "paymentId": "a1b2c3d4...", "status": "queued", "message": "Payment queued for settlement" }

Error codes

400Missing or invalid fields
401API key invalid or revoked
409Already settled (idempotency collision)
422On-chain verification failed
429Rate limit exceeded — check Retry-After
500Internal error — safe to retry after 5 s

Get a quote

GET/api/quote?inrAmount=999

Live USDC amount for a given INR payment. Cached 60 s server-side.

json
{ "inrAmount": 999, "usdcAmount": 11.84, "auronRate": 84.37, "marketRate": 84.79, "spread": 0.005, "spreadPercent": "0.50%", "validUntil": 1718734800000 }

Get current rate

GET/api/rate

Current USDC/INR market rate and Auron's effective rate after spread.

json
{ "marketRate": 84.79, "auronRate": 84.37, "spread": 0.005, "spreadPercent": "0.50%", "fallback": false, "usdcPer1000Inr": 11.851 }
WARNING
When fallback: true, CoinGecko is unavailable and the rate comes from cache. Avoid locking in large quotes during fallback.