Now, I will start by creating an account.
For this, I clicked on create account
and here you can then well,
fill in your details to create your own Stripe account.
Now, once you did create an account
and you are signed in,
you should end up on a starting page
that looks something like this,
and by default, you should be in testing mode,
which means that you can play around with Stripe
without creating any real transactions.
Now if you click on Developers here,
what you'll see
is that there you can actually go to API keys
and here we have certain API keys,
which we will need for then sending requests
to that Stripe API, hence the name API keys.
These will be extra pieces of data
that will be sent to Stripe
when we wanna perform an action,
like making a credit card payment charge
so that we identify ourselves to Stripe.
And with we, I mean we the developer
who works on a page that wants to use Stripe
because, of course, the Stripe API
has to be protected somehow,
otherwise anyone could start sending requests
to Stripe to make any kinds of payment charges.
That's why you need an account
and then your API key
so that every request you make to Stripe
can be connected to your account
and therefore, you can't start sending
arbitrary transaction requests to Stripe.
At least everything will be tracked
to your account in the end.
Now, here on this API keys page,
you should also view the testing data only,
which means you get API keys that allow you
to create test transactions only.
You won't be able to create real transactions with that.
For this, you would have to activate your account first
so that then in a next step,
you can start making real charges
where you then really deduct money
from people's credit cards.
But here we just wanna test,
so we will stay in this testing mode.
Now, with that, we finished step one.
Step two is to install this Stripe package.
For this, we can copy this command,
and now here in our project,
we can run npm install stripe.
Optionally also with that --save flag,
and this will add it as a third-party package
as we added many packages before.
Again, this is a package
that will help us communicate to this Stripe API
since Stripe offers an API,
which is not intended to be used directly by us
with us sending our own HTTP requests to it
but where we instead should use such a third-party package,
which will then behind the scenes send the requests.
So now to send such requests,
we can move on to the next steps
because here in this code example,
in the official documentation,
we can see how we could make an example payment,
how we could charge a credit card
and this, therefore is the code
which we wanna add to our project.