DEV Community

Type-safe Payments with Next.js, TypeScript, and Stripe πŸ”’πŸ’Έ

Thor ι›·η₯ž on February 11, 2020

Demo: https://nextjs-typescript-react-stripe-js.now.sh/ Code: https://github.com/vercel/next.js/tree/canary/examples/with-stripe-typescript Code...
Collapse
 
regisnut profile image
Regisnut

Thks Thor, is it possible to let a user decide the amount and the frequency for a subscription??
I can do it with my revolut, I can decide the amount and add a frequency, hence it becomes a recurrent subscription.

Collapse
 
rchrdnsh profile image
rchrdnsh • Edited

This is great, although there is much I don’t understand... if you would consider doing a version of this tutorial for Gatsby/Netlify as well, and compare/contrast the two that would be amazing... also gonna look at the Lambda thing you posted a few comments down :-)

Collapse
 
trag profile image
Chris Trag
Collapse
 
nejurgis profile image
Nejurgis

Thor, thank you for the post, could you maybe go into detail how would one create a payment intent with Gatsby? I need to create a custom payment form so using Stripe Checkout is not enough ..

Collapse
 
thorwebdev profile image
Thor ι›·η₯ž

For this you will need a server-side component. This can be a Lambda/Netlify/Zeit function.

dabit3 image


has an example of this over at github.com/jamstack-cms/jamstack-e.... Hope that helps :)
Collapse
 
jamonholmgren profile image
Jamon Holmgren

This is fantastic -- thank you Thor!

Collapse
 
smakosh profile image
smakosh

Great article! Thanks for sharing, could you please include the part where we add webhooks to Stripe using Stripe CLI?