Finvex API Reference
Finvex provides a complete payment infrastructure API for Indian startups. Accept payments via Razorpay + Cashfree, manage subscriptions, automate GST, send WhatsApp payment links, and more — all through a single API.
Base URL
https://finvexpay.com/v1100+ Endpoints
33 features
REST API
JSON responses
Rate Limit
300 req/min
Authentication
Finvex supports two authentication methods:
1. API Key (Server-to-server)
Pass your API key in the X-Finvex-Key header:
curl https://finvexpay.com/v1/orders \ -H "X-Finvex-Key: finvex_test_KEYID:SECRET"
2. JWT Bearer Token (Dashboard)
Used by the dashboard. Obtain via login, include in Authorization header:
curl https://finvexpay.com/v1/merchant \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
Test vs Live Mode
Keys prefixed with finvex_test_ operate in test mode. Switch to finvex_live_ for production.
Orders & Payments
Create payment orders, verify payments, and process refunds.
/ordersCreate a new payment order
/ordersList all orders
/orders/:idGet order details
/orders/:id/verifyVerify payment after checkout
/paymentsList all payment transactions
/payments/:id/refundRefund a payment
/settlementsList settlements
Create Order
Creates a payment order and routes to the best provider (Razorpay or Cashfree).
Parameters
amountintegerrequiredAmount in paise (e.g., 50000 = ₹500)currencystringCurrency code (default: INR)receiptstringYour internal order referencedescriptionstringOrder descriptioncustomerobjectCustomer info: name, email, phonecurl -X POST https://finvexpay.com/v1/orders \
-H "X-Finvex-Key: finvex_test_KEY:SECRET" \
-H "Content-Type: application/json" \
-d '{
"amount": 50000,
"currency": "INR",
"description": "Pro Plan",
"customer": {
"name": "Anil Kumar",
"email": "anil@example.com",
"phone": "+919876543210"
}
}'const finvex = require('finvex-node')('finvex_test_KEY:SECRET')
const order = await finvex.orders.create({
amount: 50000,
currency: 'INR',
description: 'Pro Plan'
})
console.log(order.id) // finvex_ord_...import finvex
client = finvex.Client('finvex_test_KEY:SECRET')
order = client.orders.create(
amount=50000,
currency='INR',
description='Pro Plan'
)
print(order['id']) # finvex_ord_...Subscriptions
Create recurring billing plans and manage customer subscriptions with UPI Autopay support.
/plansCreate a billing plan
/plansList all plans
/subscriptionsSubscribe a customer to a plan
/subscriptionsList subscriptions
/subscriptions/:id/cancelCancel subscription
/subscriptions/:id/pausePause subscription
/subscriptions/:id/resumeResume subscription
# Create a monthly plan
curl -X POST https://finvexpay.com/v1/plans \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{"name":"Pro","amount":99900,"interval":"monthly"}'
# Subscribe a customer
curl -X POST https://finvexpay.com/v1/subscriptions \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{"plan_id":"finvex_plan_xxx","customer_email":"user@example.com"}'Payment Links
Create shareable payment links — no coding needed by your customers.
/payment-linksCreate a payment link
/payment-linksList payment links
/payment-links/:id/cancelCancel a payment link
curl -X POST https://finvexpay.com/v1/payment-links \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{"amount":150000,"description":"Invoice #1234","customer_email":"client@example.com"}'Webhooks
Receive real-time notifications for payment events. Webhooks are signed with HMAC-SHA256.
/webhooksCreate a webhook endpoint
/webhooksList webhook endpoints
/webhooks/:id/testSend a test webhook
/webhooks/:idDelete webhook endpoint
Verify Webhook Signature
const crypto = require('crypto')
function verifyWebhook(payload, signature, secret) {
const expected = 'sha256=' + crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex')
return crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(signature)
)
}
// In your Express/Fastify handler:
app.post('/webhooks/finvex', (req, res) => {
const sig = req.headers['x-finvex-signature']
if (!verifyWebhook(req.rawBody, sig, WEBHOOK_SECRET)) {
return res.status(401).send('Invalid signature')
}
// Process event...
res.sendStatus(200)
})GST Engine
Auto-calculate GST (CGST/SGST/IGST), generate e-invoices, and prepare GSTR-1 returns.
/gst/calculateCalculate GST for a transaction
/gst/invoicesGenerate e-invoice
/gst/invoicesList GST invoices
/gst/gstr1?month=2026-04Generate GSTR-1 for a month
/gst/hsn-lookup?q=softwareSearch HSN/SAC codes
curl -X POST https://finvexpay.com/v1/gst/calculate \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"amount": 100000,
"hsn_code": "998316",
"seller_state": "KA",
"buyer_state": "MH"
}'AI Dunning
AI-powered payment recovery. When a subscription charge fails, Finvex uses Claude AI to determine the optimal retry strategy.
/dunning/triggerTrigger dunning for a failed payment
/dunningList dunning records
/dunning/:id/scheduleGet AI retry schedule
/dunning/analytics/recovery-rateRecovery analytics
WhatsApp Payments
Send payment links, invoices, and receipts via WhatsApp. Supports 6 Indian languages.
/whatsapp/send-paymentSend payment link via WhatsApp
/whatsapp/send-invoiceSend invoice via WhatsApp
/whatsapp/send-receiptSend receipt via WhatsApp
/whatsapp/bulk-sendBulk send via CSV
curl -X POST https://finvexpay.com/v1/whatsapp/send-payment \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"phone": "+919876543210",
"amount": 50000,
"description": "Monthly subscription",
"language": "hi"
}'Analytics (CFO Mode)
SaaS metrics: MRR, ARR, churn rate, LTV, and cohort analysis.
/analytics/overviewRevenue, orders, success rate
/analytics/mrrMonthly Recurring Revenue + history
/analytics/churnChurn rate and churned customers
/analytics/ltvAverage customer lifetime value
/analytics/top-customersTop 10 customers by revenue
Instant Payouts
Send money to any UPI ID or bank account instantly.
/payoutsCreate a payout
/payoutsList payouts
/payouts/bulkBulk payouts (up to 500)
/payouts/verify-upiVerify a UPI VPA
curl -X POST https://finvexpay.com/v1/payouts \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{"amount":100000,"method":"upi","upi_vpa":"merchant@upi"}'Checkout Builder
Create no-code checkout pages with custom branding.
/checkout-pagesCreate a checkout page
/checkout-pagesList checkout pages
/p/:slugPublic checkout page (no auth)
Embed SDK
Add Finvex payments to any website or app.
<script src="https://js.finvexpay.com/v1/checkout.js"></script>
<script>
const finvex = Finvex('finvex_test_YOUR_KEY')
finvex.checkout({
order_id: 'ORDER_ID',
amount: 50000,
currency: 'INR',
handler: (response) => {
// Verify payment on your server
fetch('/verify', {
method: 'POST',
body: JSON.stringify(response)
})
}
})
</script>Integration Guide
Step-by-step guide to integrate Finvex payments into your application.
Step 1: Get API Keys
Log in to your Finvex Dashboard and create API keys from the Developers section. You will get a key_id and key_secret.
Step 2: Create an Order (Server-side)
When a customer initiates payment, create an order from your backend:
app.post('/create-order', async (req, res) => {
const response = await fetch('https://finvexpay.com/v1/orders', {
method: 'POST',
headers: {
'X-Finvex-Key': 'KEY_ID:KEY_SECRET',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: req.body.amount,
currency: 'INR',
customer: { email: req.body.email }
})
})
const order = await response.json()
res.json(order)
})Step 3: Open Checkout (Client-side)
Use the Finvex SDK to open the payment checkout:
const order = await fetch('/create-order', {
method: 'POST',
body: JSON.stringify({ amount: 50000 })
}).then(r => r.json())
const finvex = Finvex('finvex_test_KEY')
finvex.checkout({
order_id: order.id,
amount: order.amount,
handler: (response) => {
// Step 4: Verify payment
verifyPayment(response)
}
})Step 4: Verify Payment (Server-side)
Always verify payments on your server before fulfilling orders:
app.post('/verify-payment', async (req, res) => {
const { order_id, payment_id, signature } = req.body
const response = await fetch(`https://finvexpay.com/v1/orders/${order_id}/verify`, {
method: 'POST',
headers: {
'X-Finvex-Key': 'KEY_ID:KEY_SECRET',
'Content-Type': 'application/json'
},
body: JSON.stringify({ payment_id, signature })
})
const result = await response.json()
if (result.verified) {
// Payment confirmed - fulfill the order
await fulfillOrder(order_id)
}
})Step 5: Handle Webhooks
Set up webhooks for reliable payment notifications:
// Register webhook in dashboard or via API
// Then handle incoming events:
app.post('/webhooks/finvex', (req, res) => {
const sig = req.headers['x-finvex-signature']
if (!verifySignature(req.rawBody, sig, WEBHOOK_SECRET)) {
return res.status(401).send('Invalid')
}
const event = req.body
switch (event.event) {
case 'payment.captured':
handlePaymentCaptured(event.data)
break
case 'refund.processed':
handleRefund(event.data)
break
}
res.sendStatus(200)
})Store (Merchant of Record)
Create and manage your storefront. Finvex acts as your Merchant of Record, handling payments, taxes, and compliance.
/storeCreate a new store
/storeGet store details
/storeUpdate store settings
curl -X POST https://finvexpay.com/v1/store \
-H "X-Finvex-Key: KEY:SECRET" \
-H "Content-Type: application/json" \
-d '{
"name": "My SaaS Store",
"slug": "my-saas",
"currency": "INR",
"description": "Digital products and subscriptions"
}'Products
Create and manage digital products with auto-generated checkout URLs. Supports one-time purchases and recurring subscriptions.
/productsCreate a new product
/productsList all products
/products/:idUpdate a product
/products/:idDelete a product
curl -X POST https://finvexpay.com/v1/products \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"name": "Pro Plan",
"price": 99900,
"type": "subscription",
"interval": "monthly",
"description": "Access to all premium features"
}'Sales & Purchases
Track all purchases, revenue, and platform fees. View detailed sales analytics and export reports.
/salesList all sales with filters
/sales/statsRevenue stats, platform fees, net earnings
# Get sales with date filter curl https://finvexpay.com/v1/sales?from=2026-01-01&to=2026-04-13 \ -H "X-Finvex-Key: KEY:SECRET" # Get revenue stats curl https://finvexpay.com/v1/sales/stats \ -H "X-Finvex-Key: KEY:SECRET"
Hosted Checkout
Customer-facing hosted checkout pages. No integration required -- share the URL and start selling.
/buy/:store/:productPublic checkout page (no auth required)
/buy/:store/:product/payProcess payment for a product
/buy/:store/:product/successPost-payment success page
# Process a checkout payment (public endpoint)
curl -X POST https://finvexpay.com/v1/buy/my-saas/pro-plan/pay \
-H "Content-Type: application/json" \
-d '{
"customer_email": "buyer@example.com",
"customer_name": "Priya Sharma",
"payment_method": "upi"
}'License Keys
Issue and manage software license keys. Auto-generated on purchase, with activation and verification endpoints.
/licenses/verifyVerify a license key
/licenses/activateActivate a license on a device
# Verify a license key
curl -X POST https://finvexpay.com/v1/licenses/verify \
-H "Content-Type: application/json" \
-d '{"license_key":"FINVEX-XXXX-XXXX-XXXX","product_id":"prod_xxx"}'
# Activate on a device
curl -X POST https://finvexpay.com/v1/licenses/activate \
-d '{"license_key":"FINVEX-XXXX-XXXX-XXXX","device_id":"device_abc123"}'Affiliates
Create and manage a referral program. Track affiliate signups, conversions, and commissions.
/affiliatesCreate an affiliate partner
/affiliatesList all affiliates and stats
/ref/:codePublic referral redirect (no auth)
curl -X POST https://finvexpay.com/v1/affiliates \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"name": "Partner One",
"email": "partner@example.com",
"commission_percent": 20,
"products": ["prod_xxx"]
}'Coupons
Create discount codes with flexible rules -- percentage or flat discounts, usage limits, and expiry dates.
/couponsCreate a coupon code
/couponsList all coupons
/coupons/validateValidate a coupon at checkout
curl -X POST https://finvexpay.com/v1/coupons \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"code": "LAUNCH50",
"discount_type": "percent",
"discount_value": 50,
"max_uses": 100,
"expires_at": "2026-12-31"
}'Revenue Splits
Automatically split revenue between team members, co-founders, or partners on every sale.
/splitsCreate a revenue split rule
/splitsList all split rules
curl -X POST https://finvexpay.com/v1/splits \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"product_id": "prod_xxx",
"splits": [
{"email": "founder@example.com", "percent": 60},
{"email": "cofounder@example.com", "percent": 40}
]
}'Product Variants
Create pricing tiers for your products (e.g., Starter, Pro, Enterprise) with different features and limits.
/products/:id/variantsCreate a product variant
/products/:id/variantsList variants for a product
curl -X POST https://finvexpay.com/v1/products/prod_xxx/variants \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"name": "Enterprise",
"price": 499900,
"features": ["Unlimited users", "Priority support", "Custom domain"],
"sort_order": 3
}'Bundles
Bundle multiple products together and sell them at a discounted price.
/bundlesCreate a product bundle
/bundlesList all bundles
curl -X POST https://finvexpay.com/v1/bundles \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"name": "Complete Toolkit",
"products": ["prod_aaa", "prod_bbb", "prod_ccc"],
"price": 199900,
"description": "Get all three products at 40% off"
}'Reviews
Collect and display customer ratings and reviews on your product pages.
/reviewsSubmit a review (public, no auth)
/products/:id/reviewsList reviews for a product
# Submit a review (public endpoint)
curl -X POST https://finvexpay.com/v1/reviews \
-H "Content-Type: application/json" \
-d '{
"product_id": "prod_xxx",
"rating": 5,
"comment": "Excellent product, saved us hours!",
"customer_email": "buyer@example.com"
}'Waitlist
Collect early interest before launching a product. Manage pre-launch waitlists with position tracking.
/waitlist/joinJoin a waitlist (public, no auth)
/waitlist/:product_idList waitlist entries for a product
# Join a waitlist (public endpoint)
curl -X POST https://finvexpay.com/v1/waitlist/join \
-H "Content-Type: application/json" \
-d '{"product_id":"prod_xxx","email":"interested@example.com","name":"Rahul"}'
# View waitlist (authenticated)
curl https://finvexpay.com/v1/waitlist/prod_xxx \
-H "X-Finvex-Key: KEY:SECRET"Abandoned Carts
Track visitors who start checkout but do not complete payment. Use data for recovery campaigns.
/cart/trackTrack a cart event (public, no auth)
/abandoned-cartsList abandoned carts
# Track a cart event (public endpoint)
curl -X POST https://finvexpay.com/v1/cart/track \
-H "Content-Type: application/json" \
-d '{
"product_id": "prod_xxx",
"customer_email": "visitor@example.com",
"step": "checkout_started"
}'
# List abandoned carts
curl https://finvexpay.com/v1/abandoned-carts \
-H "X-Finvex-Key: KEY:SECRET"Email Marketing
Manage subscribers and send broadcast emails to your customer base. Built-in templates for product launches, updates, and promotions.
/subscribersList all email subscribers
/broadcastsCreate a broadcast email
/broadcasts/:id/sendSend a broadcast to subscribers
# Create a broadcast
curl -X POST https://finvexpay.com/v1/broadcasts \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"subject": "New Feature Launch",
"body_html": "<h1>Big News!</h1><p>We just shipped...</p>",
"segment": "all_customers"
}'
# Send the broadcast
curl -X POST https://finvexpay.com/v1/broadcasts/bc_xxx/send \
-H "X-Finvex-Key: KEY:SECRET"UPI QR Codes
Generate dynamic UPI QR codes for in-person or invoice payments. Track scan and payment status in real time.
/qr/createCreate a UPI QR code
/qr/:idGet QR code status and image URL
/qr/:id/closeClose/expire a QR code
curl -X POST https://finvexpay.com/v1/qr/create \
-H "X-Finvex-Key: KEY:SECRET" \
-d '{
"amount": 50000,
"description": "Invoice #5678",
"customer_name": "Walk-in Customer",
"expires_in": 3600
}'Multi-Currency
Support international customers with real-time currency conversion. Display prices in 30+ currencies while settling in INR.
/currenciesList supported currencies and rates
/currencies/convertConvert between currencies
# List supported currencies curl https://finvexpay.com/v1/currencies \ -H "X-Finvex-Key: KEY:SECRET" # Convert amount curl "https://finvexpay.com/v1/currencies/convert?from=USD&to=INR&amount=9900" \ -H "X-Finvex-Key: KEY:SECRET"
KYC
Creator verification and KYC compliance. Required for enabling payouts and going live.
/kycGet KYC verification status
/kyc/submitSubmit KYC documents for verification
# Check KYC status
curl https://finvexpay.com/v1/kyc \
-H "X-Finvex-Key: KEY:SECRET"
# Submit KYC documents
curl -X POST https://finvexpay.com/v1/kyc/submit \
-H "X-Finvex-Key: KEY:SECRET" \
-H "Content-Type: application/json" \
-d '{
"pan": "ABCDE1234F",
"gst_number": "29ABCDE1234F1Z5",
"bank_account": "encrypted_account_data",
"document_type": "aadhaar"
}'Customer Portal
Give your customers a self-service portal to view purchases, download products, and manage subscriptions.
/portal/loginCustomer login via magic link (public)
/portal/purchasesList customer purchases (public, session auth)
# Send magic link to customer
curl -X POST https://finvexpay.com/v1/portal/login \
-H "Content-Type: application/json" \
-d '{"email":"customer@example.com"}'
# Customer views their purchases (with session token)
curl https://finvexpay.com/v1/portal/purchases \
-H "Authorization: Bearer portal_session_token"Admin
Platform administration endpoints for managing merchants, viewing global stats, and assigning roles. Requires admin-level authentication.
/admin/statsPlatform-wide statistics and metrics
/admin/merchantsList all merchants on the platform
/admin/merchants/:id/roleUpdate a merchant role
# Get platform stats (admin only)
curl https://finvexpay.com/v1/admin/stats \
-H "Authorization: Bearer ADMIN_JWT_TOKEN"
# Update merchant role
curl -X PUT https://finvexpay.com/v1/admin/merchants/merchant_xxx/role \
-H "Authorization: Bearer ADMIN_JWT_TOKEN" \
-d '{"role":"verified_seller"}'Need help? Contact support@finvexpay.com
Finvex API v1.0 — Last updated April 2026