FREELessons: 9Length: 50 minutes

• Overview
• Transcript

# 2.1 Getting Familiar With Stripe

In this lesson we’ll take a closer look at Stripe, and I’ll explain how it might be of benefit. We’ll take a look at Stripe’s pricing structure and the charges you can expect when using Stripe.

## 4.Conclusion1 lesson, 01:32

### 2.1 Getting Familiar With Stripe

In this lesson, we're going to be getting ourselves familiar with what Stripe is and what it offers us. Now, you might already have some idea of what Stripe is, but let's just talk about it quickly. Stripe advertises itself as a set of unified APIs and tools that instantly enable businesses to accept and manage online payments. In a nutshell, Stripe is a payment gateway. But why would we bother using Stripe? Why not just add one of those simple PayPal checkout buttons and be done with it? See now that's a good question, and it is one that you should really be asking yourself. Stripe allows you to process the payment from your application. So the customer doesn't have to click through to PayPal. And they don't have to go through several more forms on the PayPal website just to pay for a subscription, or pay for some products. Stripe is a much more streamlined approach. With it, you can accept and process the payment directly from your application. This will usually involve fewer page loads and clicks for the customer, which is always a good thing. Stripe can also accept a number of different payment methods, including credit cards and bitcoins. When you compare it to a service like PayPal, Stripe may seem a little bit more complicated to implement, but it's really not that hard. Thankfully, Stripe does include a very handy JavaScript library called Checkout, which is built upon the Stripe.js library. This acts very much like a PayPal payment button. Checkout will integrate a form directly into your application so that you don't have to worry about actually handing the credit card details. Checkout will send an AJAX request with the customer's details to the Stripe servers which will then return a unique token. You can then use this token to process the payment. We'll be talking more about this and the security implications in the lessons to come. So now you might be wondering how much all this will cost. Well, it's actually free, but you will be charged a small fee per transaction. Let's take a look at those fees now. For the United States, Stripe will charge 2.9% of the transaction, plus an additional $0.30. The fees that Stripe charge will vary from country to country, so it's always worth investigating what fees you may be charged. Let's look at an example of how Stripe charges the fees. Say we want to charge a customer$100. First, Stripe takes 2.9% of the total, which in this case would be $2.90. We're now left with$97.10. Then Stripe will charge an additional flat-rate fee of $0.30, which will leave us with a total of$96.80. But if you prefer, you can make up that loss by moving the Stripe fee onto the customer. Stripe has a detailed help article covering this in detail. Basically, all we need to do is take the amount we wish to charge the customer and add the flat rate fee to it. In our case, if we wish to charge $100 then we need to add the 30 cents, which would give us$100.30. Next, we need to divide this by the percentage fee subtracted from 1. Our percentage fee is 2.9%, which you can represent as 0.029. So, 1 minus 0.029 is 0.971, so if we do the division, we'll end up with roughly $103.30. Now you might notice that this is slightly higher than the initial fee that we calculated for the$100, but this is to compensate for the higher charge. If we now calculate the fees charged based on this amount, we'll get a fee of \$3.30. So if you like, you can charge your customer for the Stripe fees. All right, so now that we know how Stripe handles our payments, and how we'll be charged on a per transaction basis, let's go ahead and log in to our Stripe account. If you don't have an account, then go ahead and sign up now. From our Stripe dashboard, we can immediately see an overview of all of our charges and our customers. On the left, we're able to navigate to our customers, our plans, payments, coupons and other odds and ends to configure our account. At the top, we're able to switch between the test and live modes. Some other things that we need to be aware of are our API keys, which can be found by going to our Account Settings and then selecting API Keys. Your private key should be kept confidential. And don't worry, I'll be regenerating these keys afterwards so that they cannot be used. And that just about covers the basics of Stripe. In the next lesson we're going to start by installing Laravel, and later we'll take a look at HTTP verse HTTPS.

Back to the top