PhoenixKit.Modules.Billing.Providers.Razorpay (phoenix_kit v1.7.71)

Copy Markdown View Source

Razorpay payment provider implementation.

Razorpay is a popular payment gateway in India. Uses their REST API for:

  • Payment Links (hosted checkout)
  • Orders API
  • Customers and Tokens (saved payment methods)
  • Refunds

Configuration

Required settings in database:

  • billing_razorpay_enabled - "true" to enable
  • billing_razorpay_key_id - Razorpay Key ID
  • billing_razorpay_key_secret - Razorpay Key Secret
  • billing_razorpay_webhook_secret - Webhook secret for signature verification

Razorpay Flow

  1. Create Order with amount and currency
  2. Create Payment Link or use Checkout.js
  3. User completes payment on Razorpay
  4. Razorpay sends webhook on payment success
  5. Verify signature and process payment

Webhook Events

  • payment.authorized - Payment authorized (for 2-step payments)
  • payment.captured - Payment captured successfully
  • payment.failed - Payment failed
  • refund.created - Refund initiated
  • refund.processed - Refund completed

Currency Support

Primary currency is INR. International payments supported with: USD, EUR, GBP, SGD, AED, CAD, CNY, SEK, NZD, MXN, etc.