Python for Entrepreneurs Transcripts
Chapter: Making money (credit cards and businesses)
Lecture: Stripe Checkout overview
0:02 Are you ready to see what this Stripe checkout is all about?
0:05 One of the things you'll hear often when people talk about these checkout flows
0:09 and accepting credit cards are the funnels, conversion funnel,
0:12 purchase funnel and so on, and you want the number of steps involved,
0:16 and the amount of information to be entered as minimal as possible,
0:20 and as far as I can tell, this Stripe checkout
0:23 is the absolute bare minimum for new customers.
0:27 So, let's see how this works, first I'll show what we have on Talk Python Training,
0:31 and how I use it, you may recognize this as we go through it,
0:34 and then I'll show you a little bit of behind the scenes on stripe.com
0:38 and then we are going to write the code ourself.
0:42 OK, so over here, we can go pick a course, you can see I am not logged in,
0:45 let's just pick the Jumpstart course, and come down here you can see
0:49 there is a button here that says buy now, get lifetime access for 69 dollars.
0:53 So, if i click this, notice I am not logged in,
0:58 It says OK we are going to buy this course, here is a little logo,
1:02 I can put in my email, if I were logged in, that email would already be pre-populated,
1:06 so I am going to put in a credit card, expiration date, CVC
1:10 and I hit pay and that's the entire funnel, that's the entire process.
1:14 This happens on Stripe server, this is actually coming from Stripe.
1:19 What I put here never goes to my server, it only goes to Stripe.
1:24 Now, once this is submitted, a token, a one-time token will be sent back
1:28 to my Pyramid web app and then we'll do the processing to basically enter you
1:33 in the course so that I know to give you access to it, things like that.
1:36 So over here at stripe.com/checkout,
1:39 they have many different options for what you can do,
1:42 but you can see they have a little example to show you what it looks like,
1:46 it looks similar to what I just showed you, right?
1:49 So, to get started, they have some documentation and basically
1:52 all you have to do besides having a Stripe account,
1:55 which does not require special type of bank account or anything,
1:59 just any account to transfer money into
2:01 when you get paid, right, that's the good part.
2:04 You have an account, you have a bank account, you set up an account with Stripe,
2:08 and then you get an API code here and then this is all you need, it's just this script,
2:13 so you can see all of this, these details, this data,
2:17 -key, data-amount and so on, this drives the UI that you saw.
2:21 Here you can see the script that is running this actually comes from Stripe,
2:25 and then you've got a final POST back that you are going to go
2:29 and this is where you receive the token to finalize the payment.
2:32 Now you are trading a little bit of flexibility here,
2:38 lack of flexibility for both avoiding some of the PCI compliance issues
2:43 as well as simplicity, all this checkout stuff and verification you don't have to do,
2:47 so for example if I come over here and I put in just some random stuff,
2:53 and I put like 11/11 of course that's expired, 123 and I try to pay it says
3:01 no, no, look, those two things are wrong, already,
3:05 so if I put- no, no, I meant 21, all this nice validation is already good,
3:09 apparently that came back as some kind of credit card
3:12 but they don't only have just the UI for it but all the validation
3:16 and it's kind of playful as well, so let's go see
3:20 how we can take this API and embed it into our web app to buy albums.