Fireship · @fireship
Stripe Elements & Checkout with Angular - Monetize your PWA
Uploaded March 5, 2019 · Length 8:14
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.
- 0:00
[Music]
- 0:06
if you're building an app there's a good
- 0:08
chance that at some point you'll want to
- 0:09
convert your users into paying customers
- 0:11
the most popular api for doing just that
- 0:13
is stripe
- 0:14
it's the payment solution behind a huge
- 0:16
number of successful startups and
- 0:17
companies
- 0:18
like twitch squarespace and shopify just
- 0:20
to name a few
- 0:21
stripe has multiple javascript libraries
- 0:23
that you can implement in the front end
- 0:24
to easily collect credit card
- 0:26
information from your customers
- 0:27
in today's video you'll learn how to use
- 0:29
both stripe checkout and stripe elements
- 0:31
in an angular application
- 0:32
if you're new here like and subscribe
- 0:34
and you can grab the full source code on
- 0:36
fireship io
- 0:37
now the first thing i want to point out
- 0:38
is that this video is only covering the
- 0:40
front end implementation
- 0:42
that involves securely collecting credit
- 0:43
card information from the user and then
- 0:45
validating it with stripe but it does
- 0:47
not involve creating the actual charge
- 0:48
that will collect money from the user
- 0:50
for that you need a back-end
- 0:51
implementation and if you're using
- 0:53
firebase that means firebase cloud
- 0:54
functions luckily i just released my
- 0:56
full-length stripe payments master
- 0:58
course and it will show you how to
- 0:59
implement and test everything on the
- 1:00
back end as well as integrate it with
- 1:02
firebase
- 1:03
the course will show you how to build a
- 1:04
full stack payment solution similar to
- 1:06
the one i have on fireship io that
- 1:07
handle single charges subscriptions
- 1:10
coupons and more but enough of that
- 1:11
shameless plug let's get into our
- 1:13
angular application and start writing
- 1:14
some code
- 1:15
we're going to start with stripe
- 1:16
checkout which is very easy to implement
- 1:18
and does almost all the front-end work
- 1:20
for you when the user clicks on this buy
- 1:22
button
- 1:22
it will trigger this pop-up modal which
- 1:24
will then collect their credit card
- 1:25
information
- 1:26
and do all the validation directly in
- 1:28
that modal this is great as a drop-in
- 1:30
solution
- 1:31
but it doesn't give you a lot of
- 1:32
flexibility to customize the styling or
- 1:34
the entire checkout experience
- 1:36
now at this point i want to make it
- 1:37
clear that i'm using firebase in this
- 1:38
project
- 1:39
it's not at all required to work with
- 1:40
stripe and angular but i want to show
- 1:42
you what a real charge looks like
- 1:43
so in order to do that i've implemented
- 1:45
user authentication in this app as well
- 1:47
as firebase callable functions
- 1:49
as you can see i have those dependencies
- 1:50
in my app module via the angularfire
- 1:52
library
- 1:53
one other thing you'll probably want to
- 1:54
do is install the types for either
- 1:56
stripe checkout or stripe.js
- 1:58
just so you have autocomplete in your
- 1:59
ide as you're writing your code


