Accept a payment – Create a PaymentIntent with PHP

Channel Avatar
Comment
X
Share
Accept a payment - Create a PaymentIntent with PHP
Accept a payment – Create a PaymentIntent with PHP
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.

In this video, you’ll learn how to create a PaymentIntent on the server using PHP and how to setup a basic Webhook handler. For part two of this series to confirm a PaymentIntent using a variety of payment methods, watch one of the videos in the playlists for front end frameworks:

HTML and JavaScript – https://www.youtube.com/playlist?listPLy1nL-pvL2M7EUdqARPiayuj5cjGMLCvM
React – https://www.youtube.com/playlist?listPLy1nL-pvL2M6HFApWUDSGA4Y7btyKx7cE
iOS – https://www.youtube.com/playlist?listPLy1nL-pvL2M6yD1D72ceqqrW_1BqyN4It
Android – https://www.youtube.com/playlist?listPLy1nL-pvL2M4IvDG-DOFKi_UCEgQkHu3n

If you’d like to learn how to create a PaymentIntent on the server in another server side language, consider watching one of these episodes:

Ruby – https://www.youtube.com/watch?v079khYtqWPo&listPLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk&index12
Python – https://www.youtube.com/watch?vTgjwx-38Dic&listPLy1nL-pvL2M55YVn0mGoQ5r-39A1-ZypO&index11
Node.js – https://www.youtube.com/watch?vWG4ehXSEpz4&listPLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY&index11
Java – https://www.youtube.com/watch?v-uyXCnPXegE&listPLy1nL-pvL2M5TnSGVjEHTTMgdnnHi-KPg&index11
Go – https://www.youtube.com/watch?vcbsCxLDL4EY&listPLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a&index12
.NET – https://www.youtube.com/watch?vmqEjRgoZWdo&listPLy1nL-pvL2M4cNNoUtjWevYSci4ubsbhC&index11

### Resources

Code: https://github.com/stripe-samples/accept-a-payment/tree/main/custom-payment-flow
Documentation: https://stripe.com/docs/payments/payment-intents
How intents work: https://stripe.com/docs/payments/intents
Playlist: https://www.youtube.com/playlist?listPLy1nL-pvL2M5eqpSBR9KL7K0lcnWo0V0a

### 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

### Presenter

CJ Avilla, Developer Advocate at Stripe – https://twitter.com/cjav_dev

### Support

If you have a question, please feel free to reach out to our support team on Discord at https://stripe.com/go/developer-chat.

### Updates

Sign up to stay updated with developer news: https://go.stripe.global/dev-digest

### Feedback

If you have any feedback about this or other episodes, let us know: https://forms.gle/VjNqzRhotM2snYo88.
#Stripe #Payments

Take the opportunity to connect and share this video with your friends and family if you find it useful.

Keywords: stripe, payments, Create a PaymentIntent with PHP, Use PHP to accept payment, PHP Payment Stripe, Stripe PHP, Stripe PHP PaymentIntent, PaymentIntent PHP, Accept a payment php, accept a payment, how to accept payments with php, @cjav_dev

Read Also

Leave a Reply

Your email address will not be published. Required fields are marked *