-
Notifications
You must be signed in to change notification settings - Fork 121
Description
Hi team ,
I'm implementing Razorpay Subscriptions in an Expo (React Native) mobile app.
Currently, subscription activation data arrives via webhook on my backend, which is the recommended source of truth. However, in a mobile app flow, after the user completes payment in Razorpay Checkout, I want to update the subscription status immediately on the frontend so users don’t see a delay.
My concern
Since the webhook can arrive a few seconds later, there is a potential delay before the backend marks the subscription active. During that time, the user has already completed payment but may not see the subscription activated in the app.
Question
- What is the recommended approach for handling this scenario?
Specifically:
-
After successful payment callback on mobile, should I optimistically mark the user as subscribed on the frontend and then call my backend to verify using Razorpay APIs (instead of waiting for webhook)?
-
Is it considered best practice to verify subscription status immediately on backend via API after checkout success?
-
Or do you suggest waiting for webhook only and using something like WebSocket to push status to the app?
I want to follow the best practice used by large-scale Razorpay subscription apps to ensure:
-
Instant UI feedback for the user ✅
-
Backend integrity using webhook ✅
-
Idempotent + secure verification ✅
Would appreciate your guidance on the ideal flow for subscription status sync in mobile apps using Razorpay.