Razorpay: API Design — Orders & Payment Capture
Docs-backedREST API at api.razorpay.com/v1/. The standard payment flow: create an Order (POST /v1/orders with amount, currency, receipt), collect payment via checkout (hosted page or embedded), capture the payment (POST /v1/payments/{id}/capture — Razorpay uses a two-step model). Refunds: POST /v1/payments/{id}/refund. Subscriptions: create plans, then subscriptions linking customers to plans. Invoices for one-time or recurring billing. The API mirrors Stripe's resource-oriented design with some India-specific additions (UPI payment links, virtual accounts for bank transfers). Pagination uses skip/count parameters. Webhooks deliver events for payments, orders, subscriptions, and settlements. QR code generation for UPI payments. Settlement reporting provides reconciliation data. The API design is clean and well-organized.