Step 1: Connect Razorpay
Follow the Razorpay Connection Setup guide to add your API keys and webhook secret. Come back here once the connection is active.Step 2: Enable the required webhook events
Go to your Razorpay Dashboard: Settings → Webhooks → [your Flexprice endpoint] and enable these events:token.confirmed is only needed if you use Autopay & Mandates. Without it, mandate registrations never complete and the session stays pending. It is harmless to enable for payment-link-only setups.Webhook URL
Your Flexprice webhook URL follows this format:TENANT_ID and ENVIRONMENT_ID in Settings → General.
Step 3: Verify the webhook secret
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.Step 4: Test the flow
Use Razorpay test mode before going live. Test cards:
Test UPI:
After a test payment, confirm:
- Session status is
completed - Subscription status is
active - Invoice status is
finalized - Your server received the
checkout.session.completedevent
pending after payment, check the Razorpay webhook delivery log and confirm all five events are enabled on the correct endpoint URL.
Troubleshooting
Razorpay Connection Setup
Connect your Razorpay account to Flexprice.
Checkout Sessions API
Create your first session once Razorpay is configured.

