An Interest In:
Web News this Week
- March 22, 2024
- March 21, 2024
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
React Stripe.js and the Payment Element
What youll learn
With React Stripe.js and the Payment Element you can create a custom payment integration on your site that can offer more than 18 global payment methods with a single integration depending on your location and their availability. In this demo youll learn how to integrate the Payment Element with your React app, and how to turn on new payment methods via the dashboard without having to change, test or re-deploy your code.
Prerequisites
If youd like to follow along, youll need a Stripe account which you can sign up for here and you can clone the getting started branch of the repo here.
Table of contents
- 00:00 Introduction
- 01:07 Cloning the repo and getting started
- 02:12 npm installs and starting the app
- 03:50 Building out payment.js
- 05:18 Creating a payment intent on the back end
- 06:27 Fetching and saving the client secret
- 07:28 Using the elements provider
- 08:36 Creating the checkout form
What to watch next
You can watch more videos on automatic payment methods here
About the author
Matthew Ling (@mattling_dev) is a Developer Advocate at Stripe. Matt loves to tinker with new technology, adores Ruby and coffee and also moonlighted as a pro music photographer. His photo site is at matthewling.com and developer site is at mattling.dev.
Stay connected
In addition, you can stay up to date with Stripe in a few ways:
Follow us on Twitter
Join the official Discord server
Subscribe to our Youtube channel
Sign up for the Dev Digest
Original Link: https://dev.to/stripe/react-stripejs-and-the-payment-element-34d0
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To