Now that we got this introduction to services
and APIs, let's see a concrete example.
And, as I said, we're going to continue with the online shop
we worked on before, and we're going to add payments
with help of Stripe, which is a super popular service,
getting used by a lots of big websites,
which helps us integrate payments
into our websites and products.
Now, Stripe offers lots of products.
If you have a look at their official page,
they offer help with fraud detection, with sales tax,
with card issuing, with invoicing,
but they also allow you to collect payments,
for example, credit card payments.
And you can integrate Stripe into your website
through their official API.
So they're clearly defined set of actions
of API endpoints you can use in your code
as soon as you add Stripe to your project,
and that's exactly what we're going to do
in this core section.
Now I will say that every API and every service
you're going to use is different.
You always have to dive into the official documentation
to learn how to integrate a given service
and API into your project.
For Access, you had to read the documentation
of that package to learn how to use the Access API.
For a Stripe you'll have to dive into their documentation
to add payments successfully.
Services are so different that there is no uniform
way of adding them.
Still, the example I'll show you in this course section
should help you get started.
And speaking of getting started,
on Stripe.com, if you go to this developers area,
you should find that get started link to this prebuilt
checkout page, here.
If you can't find it, I also attach a link to that page,
to this lecture.
Here, you can learn how you can add Stripe checkout,
which is a way of handling payments to your website.
And it's one of the easiest way of handling payments.
That's what we're going to use this approach.
Again, Stripe has many features
and you definitely should check out official documentation
if you are serious about adding it to your own website.
Here, I'm going to focus on a relatively
simple demo instead.
So, Stripe checkout is the product I want to use,
and now we can go to the left here
and see a sample integration.
Now, the Stripe documentation is really amazing.
You can see code examples here on the right,
and you can easily switch between different programming
languages to see how you would integrate Stripe into these
different programming languages.
And in the end, the great thing is that using Stripe
in your note project for handling payments is super easy.
In the end, a three step process, you could say.
You will need to create a Stripe account.
We're going to do this in a second.
Then you need to install the Stripe third party package.
Stripe is more than just a third party package,
but you still need a third party package to communicate with
that Stripe API from inside your code.
Some APIs work without such packages, some APIs give
you URLs to which you can send requests to trigger
certain actions or get certain pieces of data
for a Stripe, here, it's different.
We install a third-party package,
which will then behind the scenes,
talk to that Stripe API by sending requests.
It will still always be about sending requests though,
because our website will need to communicate
with Stripe's servers,
and that only works through requests and responses,
but it will be hidden from us
with help of that third-party package.
So therefore, we will need to install that.
And then we'll have to write some code for sending
the right data to the Stripe servers,
through that Stripe package.
And to then proceed correctly, once we get back a response.
Now, therefore let's go through these steps, step-by-step
and integrate payments into our online shop
in the next lectures.