Help integrate stripe with mongodb + nextjs application

Job ID: 33201942

Budget: $30 – $250 USD

Request detail
I'm trying to integrate Stripe subscription into a sample saas application. I currently have it set up where as user signs up, they are greeted with a paywall to subscribe. After choosing, it leads to stripe payment. After success it leads back to paywall..

The correct solution should be after payment success should be lead to protected routes / protected headers etc.

I need help on getting stripe session and store it in MongoDB and get this session in the nextjs app to use it for the user to access protected routes..

or if the user cancels the subscription, it leads the user back to the paywall. or if the account is deleted, the subscription is also deleted on stripe.
Related categories: NoSQL Couch & Mongo MySQL Node.js Next.js