Accept a payment - Create a PaymentIntent with Node.js

Accepting a one-time payment with a custom form requires two steps. First, creating a PaymentIntent on the server. Second, confirming the payment intent on the client. It’s also recommended that you handle fulfillment for a purchase when receiving a webhook notification of successful payment.

Table of contents

00:00 Overview
01:11 Setup the office hours sample
01:45 Add route to create-payment-intent
02:12 Create a basic PaymentIntent using the API with stripe-go
02:45 Test the endpoint with cURL
03:12 Accept payment method type and currency in request
04:57 Handle errors
05:48 Handle webhook notifications
08:23 Add a config route for fetching publishable keys
09:00 Recap and conclusion

#node.js #paymentintent #javascript

Accept a payment - Create a PaymentIntent with Node.js