How to pass user details to Razorpay for subscription tracking

I tried creating a custom page using the Publish Page option and the Landing Page plug-in, and since I want to add a subscription model using Razorpay, I want to pass the current user’s email or username so that Razorpay knows which user has made a payment and can then add them to a group. I’m facing trouble passing the username or email. Would that be possible, and how?

You’ll need a plugin.

You’d have a hook at got called after login (or some other trigger since people don’t log in that much) that would go to Razorpay and see if they were subscribers. A better solution would be to have Razorpay call a custom webhook when someone’s subscription status had changed and modify the group that way; probably you’d want both the webhook and the login check.

1 Like

Hi @MihirR , Razorpay’s hosted page doesn’t allow subscription products in the way that they offer one-time purchases. Because subscription links have to be generated on per-user basis.

There are only two ways:

  1. Create subscription links manually from Razorpay’s Dashboard:
    • Go to Home Page
    • Subscriptions
    • Create a Subscription Plan
    • Create a Subscription link: you will need to enter customer details, plan etc.
    • It will give you a subscription link to share with the customer
    • The customer clicks on the link and pays for the subscription
    • You will need to find a way to add them using some other means, automation is almost impossible
  2. The best way: Subscription API
    • This requires a significant development effort and dedicated server maintenance to run the payment integration. If you’re a professional developer, you can do it yourself. However, if you’re not, I provide exactly this integration service.

I hope this is not too little, too late.

The fact that Stripe is not fully active in India is the reason why we have to make do with this custom development.

Please let me know if you need any help paid or otherwise.