Issue
I am working on a project where I have to integrate Stripe Recurring Payment with custom checkout page.
I tried many ways but nothing is working.
I hope i get a answer here.
Also Please someone help me with how to store payments every month in data base.
Thank you for your answers.
Solution
You can have recurring payments with Express and React using Stripe. At a high level you need to:
- Create a product and a recurring price, either with the dashboard or with the API
- Create a Subscription on the backend and retrieve the
latest_invoice.payment_intent.client_secret
of the subscription. You can see an example here with Express. - Use the client secret to collect payment information on the frontend. For React this is covered on this documentation page.
To store the monthly payments in your database, you can use Stripe webhooks to listen to the invoice.paid
event
Answered By - soma Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.