Purchase access to watch this video.

Unlock course for £159

Already purchased access? Login

Introduction to Stripe and Cashier

  1. To handle payments, we're going to be using the Stripe payment gateway. Stripe
  2. has
  3. support for many countries, a list of which you can find used in the link in the
  4. resources
  5. section for this lesson. Stripe offers us the building blocks to create
  6. subscription-based products. It's still quite a bit of work to integrate this
  7. by hand in
  8. an application, even when using Stripe's PHP SDK. There's lots to handle,
  9. such as
  10. capturing the initial payment from the customer and making sure our application
  11. and representation
  12. of subscription stays in sync with the actual subscription status in Stripe.
  13. For example, when Stripe is unable to take payment from a customer, the
  14. subscription
  15. will eventually be cancelled and we need to make sure that we also cancel the
  16. subscription
  17. in our application so a customer cannot continue enjoying access if they're not
  18. paying for
  19. it. To help, the Laravel team has created Cashier,
  20. a package that utilises the Stripe PHP SDK to make using Stripe easier in Laravel
  21. based
  22. projects. We'll be using Cashier to create subscriptions and then redirect our
  23. customers
  24. to Stripe Checkout to capture payment and then leveraging Cashier's built-in
  25. webhooks
  26. to make sure our subscription stays in sync with the actual subscription status
  27. in Stripe.

Resources