Fireship · @fireship

Stripe Elements & Checkout with Angular - Monetize your PWA

Uploaded March 5, 2019 · Length 8:14

Stripe Elements & Checkout with Angular - Monetize your PWA

Summary

Implement Stripe Elements and Checkout with Angular for PWA monetization, covering secure credit card collection and validation, with a focus on front-end implementation and customization.

  • stripe checkout
  • stripe elements
  • angular payments
  • pwa monetization
  • credit card validation
  • secure payment processing
  • front-end implementation
  • angular development

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    [Music]

  2. 0:06

    if you're building an app there's a good

  3. 0:08

    chance that at some point you'll want to

  4. 0:09

    convert your users into paying customers

  5. 0:11

    the most popular api for doing just that

  6. 0:13

    is stripe

  7. 0:14

    it's the payment solution behind a huge

  8. 0:16

    number of successful startups and

  9. 0:17

    companies

  10. 0:18

    like twitch squarespace and shopify just

  11. 0:20

    to name a few

  12. 0:21

    stripe has multiple javascript libraries

  13. 0:23

    that you can implement in the front end

  14. 0:24

    to easily collect credit card

  15. 0:26

    information from your customers

  16. 0:27

    in today's video you'll learn how to use

  17. 0:29

    both stripe checkout and stripe elements

  18. 0:31

    in an angular application

  19. 0:32

    if you're new here like and subscribe

  20. 0:34

    and you can grab the full source code on

  21. 0:36

    fireship io

  22. 0:37

    now the first thing i want to point out

  23. 0:38

    is that this video is only covering the

  24. 0:40

    front end implementation

  25. 0:42

    that involves securely collecting credit

  26. 0:43

    card information from the user and then

  27. 0:45

    validating it with stripe but it does

  28. 0:47

    not involve creating the actual charge

  29. 0:48

    that will collect money from the user

  30. 0:50

    for that you need a back-end

  31. 0:51

    implementation and if you're using

  32. 0:53

    firebase that means firebase cloud

  33. 0:54

    functions luckily i just released my

  34. 0:56

    full-length stripe payments master

  35. 0:58

    course and it will show you how to

  36. 0:59

    implement and test everything on the

  37. 1:00

    back end as well as integrate it with

  38. 1:02

    firebase

  39. 1:03

    the course will show you how to build a

  40. 1:04

    full stack payment solution similar to

  41. 1:06

    the one i have on fireship io that

  42. 1:07

    handle single charges subscriptions

  43. 1:10

    coupons and more but enough of that

  44. 1:11

    shameless plug let's get into our

  45. 1:13

    angular application and start writing

  46. 1:14

    some code

  47. 1:15

    we're going to start with stripe

  48. 1:16

    checkout which is very easy to implement

  49. 1:18

    and does almost all the front-end work

  50. 1:20

    for you when the user clicks on this buy

  51. 1:22

    button

  52. 1:22

    it will trigger this pop-up modal which

  53. 1:24

    will then collect their credit card

  54. 1:25

    information

  55. 1:26

    and do all the validation directly in

  56. 1:28

    that modal this is great as a drop-in

  57. 1:30

    solution

  58. 1:31

    but it doesn't give you a lot of

  59. 1:32

    flexibility to customize the styling or

  60. 1:34

    the entire checkout experience

  61. 1:36

    now at this point i want to make it

  62. 1:37

    clear that i'm using firebase in this

  63. 1:38

    project

  64. 1:39

    it's not at all required to work with

  65. 1:40

    stripe and angular but i want to show

  66. 1:42

    you what a real charge looks like

  67. 1:43

    so in order to do that i've implemented

  68. 1:45

    user authentication in this app as well

  69. 1:47

    as firebase callable functions

  70. 1:49

    as you can see i have those dependencies

  71. 1:50

    in my app module via the angularfire

  72. 1:52

    library

  73. 1:53

    one other thing you'll probably want to

  74. 1:54

    do is install the types for either

  75. 1:56

    stripe checkout or stripe.js

  76. 1:58

    just so you have autocomplete in your

  77. 1:59

    ide as you're writing your code