Razorpay
Introduction
Razorpay is a comprehensive payment gateway that enables businesses to accept and process payments through various methods, including credit/debit cards, UPI, and net banking.
Supported Countries
- India in
Available Payment Methods
Razorpay currently only supports INR currency.
Payment Type | Payment Method Key | Integration Status | Refund Supported | Sandbox Availability |
---|---|---|---|---|
Cards, UPI, Wallets, Net Banking | RAZORPAY_ALL | ✅ | ✅ | ✅ |
Miscellaneous Details
- Doesn't support API flow (only web flow is supported)
- Webhooks are source of truth for razorpay. Make sure
Webhooks Configuration
To ensure we never miss important payment events and to reconcile payments reliably, you must configure webhooks in the Razorpay Dashboard. Webhooks act as your source of truth for payment state changes (e.g. captures, failures, refunds) and are mandatory for a robust, production-ready integration.
1. Navigate to Webhooks in Dashboard
- Log in to your Razorpay Dashboard
- Go to Accounts & Settings
- Click Webhooks under Website and App Settings
2. Add a New Webhook Endpoint
- Click:
+ Add New Webhook
- Webhook URL: Your public HTTPS endpoint (e.g.
https://dev-api.portone.cloud/webhook/razorpay/YOUR_PORTONE_KEY
) - Secret: A strong, unguessable string (could be your
PORTONE_SECRET
) - Alert Email: Email address to receive failure/deactivation alerts
3. Select Events to Subscribe
At a minimum, subscribe to the following events:
payment.captured
– when a payment succeeds and the amount is capturedpayment.failed
– when a payment attempt failsrefund.processed
– when a refund is successfully issued- (Optional)
payment.refunded
– for partial or full refund notifications
Razorpay Webhook Docs: Link
Sandbox
Credentials
- Create a account from razorpay website
- Get key id and key secret from settings -> api-keys
Key | Value |
---|---|
Key Id | |
Key Secret |
Use following values in embedded JS code to pay via Global Payments channel
"pmt_channel": "RAZORPAY",
"pmt_method": "RAZORPAY_ALL",
Reference links
Updated 17 days ago