Launching an online learning platform or SaaS application in India requires navigating rigorous regulatory standards: Reserve Bank of India (RBI) recurring e-Mandates, 18% Goods and Services Tax (GST) under SAC 998431 (Online Education Services), and merchant domain verification.
In this exhaustive 2026 benchmark, we compare India's two leading payment processors — Cashfree Payments and Razorpay — across pricing, developer APIs, webhook reliability, and automated GST invoice generation.
2026 Feature & Fee Comparison Matrix
| Capability | Cashfree Payments | Razorpay |
|---|---|---|
| Domestic UPI Rate | 1.75% – 1.90% (Custom volume pricing available) | 2.00% flat + 18% GST on fees |
| Debit & Credit Cards | 1.85% – 1.95% | 2.00% (RuPay Debit 0%) |
| International Cards | 3.50% + ₹7 | 3.00% – 3.50% + ₹7 |
| Automated Payouts | Instant 24x7 via IMPS / UPI rails | RazorpayX instant payouts |
| Recurring Subscriptions | Cashfree Subscriptions (UPI AutoPay + Cards) | Razorpay Subscriptions (UPI AutoPay + Cards) |
| GST SAC 998431 Support | Built-in CGST/SGST/IGST breakdown in receipts | Standard invoice generator |
| Domain Whitelisting | Fast approval for both TSX Learnify Verified CodeTSX Learnify Verified Code | Strict underwriting for custom domains |
| Developer Documentation | Clean modern REST APIs + TypeScript SDKs | Extensive SDKs & legacy plugins |
Indian Regulatory Compliance: The 18% GST Rule
Under Indian tax legislation, digital educational courses, career masteries, and AI coaching platforms are categorized under:
- Service Accounting Code (SAC):(Higher Education & Online Skill Services)TSXLearnify Verified Code
998431 - GST Rate: 18% Total
Tax Calculation Breakdown
- Intrastate Transactions (Same State as Company HQ):
- CGST: 9%
- SGST: 9%
- Total: 18%
- Interstate Transactions (Customer in a Different State):
- IGST: 18%
TYPESCRIPTLearnify Verified Code// Production GST Calculation Logic in Learnify AI export function computeGstBreakdown(basePriceInr: number, customerStateCode: string, merchantStateCode: string = "27") { const isIntrastate = customerStateCode === merchantStateCode; const gstRate = 0.18; const totalTax = Math.round(basePriceInr * gstRate * 100) / 100; if (isIntrastate) { const half = Math.round((totalTax / 2) * 100) / 100; return { cgstRate: 9, cgstAmount: half, sgstRate: 9, sgstAmount: half, igstRate: 0, igstAmount: 0, totalTax, grandTotal: basePriceInr + totalTax }; } else { return { cgstRate: 0, cgstAmount: 0, sgstRate: 0, sgstAmount: 0, igstRate: 18, igstAmount: totalTax, totalTax, grandTotal: basePriceInr + totalTax }; } }
Securing Webhook Signatures: Critical Best Practice
Never credit course enrollments or update wallet balances without cryptographically verifying the incoming webhook signature. A malicious user can easily spoof an HTTP POST request to your webhook endpoint.
TYPESCRIPTLearnify Verified Codeimport crypto from "crypto"; export function verifyCashfreeWebhookSignature( rawBody: string, receivedSignature: string, timestamp: string, secretKey: string ): boolean { // Cashfree signature verification algorithm const data = timestamp + rawBody; const expectedSignature = crypto .createHmac("sha256", secretKey) .update(data) .digest("base64"); return crypto.timingSafeEqual( Buffer.from(receivedSignature), Buffer.from(expectedSignature) ); }
The Verdict: Which Gateway Should You Choose?
- Choose Cashfree if: You want lower transaction MDR fees (1.9%), high-volume automated creator payouts, and transparent recurring subscription billing with fast domain approval.
- Choose Razorpay if: You want a ubiquitous checkout experience that almost every Indian consumer recognizes, or need out-of-the-box international card processing on day one.
- The Ideal Architecture: Implement Cashfree as the primary gateway for Indian subscriptions and creator earnings, with Razorpay as a resilient secondary payment option.
