Configure Razorpay to work with Flexprice Checkout Sessions, including the exact webhook events required.
Before creating your first Checkout Session with Razorpay, you need a connected Razorpay account and the correct webhook events enabled in your Razorpay dashboard.
Go to your Razorpay Dashboard: Settings → Webhooks → [your Flexprice endpoint] and enable all five events:
Event
Required for
payment.captured
Payment reconciliation
payment.failed
Payment failure handling
payment_link.paid
Activating the subscription when payment completes
payment_link.cancelled
Cleaning up when a customer cancels the payment link
payment_link.expired
Cleaning up when the payment link expires
If payment_link.paid is not enabled, Flexprice will never receive payment confirmation and the subscription will stay inactive. Verify all five events are enabled before testing.
Flexprice validates the signature on every inbound Razorpay webhook. If the secret doesn’t match, events are rejected silently.Go to Settings → Connections → Razorpay in Flexprice and confirm the webhook secret matches what’s shown in your Razorpay dashboard for that endpoint.
Use Razorpay test mode before going live.Test cards:
Network
Card number
CVV
Expiry
Visa
4386 2894 0766 0153
Any 3 digits
Any future date
Mastercard
2305 3242 5784 8228
Any 3 digits
Any future date
Test UPI:
UPI ID
Simulates
success@razorpay
Successful payment
failure@razorpay
Failed payment
After a test payment, confirm:
Session status is completed
Subscription status is active
Invoice status is finalized
Your server received the checkout.session.completed event
If the session stays pending after payment, check the Razorpay webhook delivery log and confirm all five events are enabled on the correct endpoint URL.