1
00:00:02,240 --> 00:00:05,020
Now, I will start by creating an account.

2
00:00:05,020 --> 00:00:07,220
For this, I clicked on create account

3
00:00:07,220 --> 00:00:09,430
and here you can then well,

4
00:00:09,430 --> 00:00:12,773
fill in your details to create your own Stripe account.

5
00:00:14,370 --> 00:00:16,280
Now, once you did create an account

6
00:00:16,280 --> 00:00:17,620
and you are signed in,

7
00:00:17,620 --> 00:00:19,460
you should end up on a starting page

8
00:00:19,460 --> 00:00:21,520
that looks something like this,

9
00:00:21,520 --> 00:00:24,820
and by default, you should be in testing mode,

10
00:00:24,820 --> 00:00:27,950
which means that you can play around with Stripe

11
00:00:27,950 --> 00:00:30,843
without creating any real transactions.

12
00:00:32,729 --> 00:00:35,030
Now if you click on Developers here,

13
00:00:35,030 --> 00:00:36,010
what you'll see

14
00:00:36,010 --> 00:00:41,010
is that there you can actually go to API keys

15
00:00:41,210 --> 00:00:43,930
and here we have certain API keys,

16
00:00:43,930 --> 00:00:47,480
which we will need for then sending requests

17
00:00:47,480 --> 00:00:51,410
to that Stripe API, hence the name API keys.

18
00:00:51,410 --> 00:00:53,410
These will be extra pieces of data

19
00:00:53,410 --> 00:00:55,380
that will be sent to Stripe

20
00:00:55,380 --> 00:00:57,370
when we wanna perform an action,

21
00:00:57,370 --> 00:01:00,420
like making a credit card payment charge

22
00:01:00,420 --> 00:01:03,870
so that we identify ourselves to Stripe.

23
00:01:03,870 --> 00:01:06,940
And with we, I mean we the developer

24
00:01:06,940 --> 00:01:09,915
who works on a page that wants to use Stripe

25
00:01:09,915 --> 00:01:13,200
because, of course, the Stripe API

26
00:01:13,200 --> 00:01:14,940
has to be protected somehow,

27
00:01:14,940 --> 00:01:18,170
otherwise anyone could start sending requests

28
00:01:18,170 --> 00:01:22,300
to Stripe to make any kinds of payment charges.

29
00:01:22,300 --> 00:01:23,800
That's why you need an account

30
00:01:23,800 --> 00:01:25,490
and then your API key

31
00:01:25,490 --> 00:01:28,220
so that every request you make to Stripe

32
00:01:28,220 --> 00:01:30,230
can be connected to your account

33
00:01:30,230 --> 00:01:32,180
and therefore, you can't start sending

34
00:01:32,180 --> 00:01:35,570
arbitrary transaction requests to Stripe.

35
00:01:35,570 --> 00:01:37,410
At least everything will be tracked

36
00:01:37,410 --> 00:01:38,773
to your account in the end.

37
00:01:40,150 --> 00:01:42,000
Now, here on this API keys page,

38
00:01:42,000 --> 00:01:45,390
you should also view the testing data only,

39
00:01:45,390 --> 00:01:47,970
which means you get API keys that allow you

40
00:01:47,970 --> 00:01:51,180
to create test transactions only.

41
00:01:51,180 --> 00:01:54,350
You won't be able to create real transactions with that.

42
00:01:54,350 --> 00:01:57,100
For this, you would have to activate your account first

43
00:01:57,100 --> 00:01:58,650
so that then in a next step,

44
00:01:58,650 --> 00:02:01,190
you can start making real charges

45
00:02:01,190 --> 00:02:03,220
where you then really deduct money

46
00:02:03,220 --> 00:02:05,450
from people's credit cards.

47
00:02:05,450 --> 00:02:07,250
But here we just wanna test,

48
00:02:07,250 --> 00:02:09,759
so we will stay in this testing mode.

49
00:02:09,759 --> 00:02:11,990
Now, with that, we finished step one.

50
00:02:11,990 --> 00:02:15,540
Step two is to install this Stripe package.

51
00:02:15,540 --> 00:02:17,650
For this, we can copy this command,

52
00:02:17,650 --> 00:02:19,740
and now here in our project,

53
00:02:19,740 --> 00:02:22,810
we can run npm install stripe.

54
00:02:22,810 --> 00:02:25,840
Optionally also with that --save flag,

55
00:02:25,840 --> 00:02:28,650
and this will add it as a third-party package

56
00:02:28,650 --> 00:02:31,023
as we added many packages before.

57
00:02:32,310 --> 00:02:33,980
Again, this is a package

58
00:02:33,980 --> 00:02:37,190
that will help us communicate to this Stripe API

59
00:02:37,190 --> 00:02:39,190
since Stripe offers an API,

60
00:02:39,190 --> 00:02:42,520
which is not intended to be used directly by us

61
00:02:42,520 --> 00:02:46,160
with us sending our own HTTP requests to it

62
00:02:46,160 --> 00:02:49,630
but where we instead should use such a third-party package,

63
00:02:49,630 --> 00:02:52,313
which will then behind the scenes send the requests.

64
00:02:53,880 --> 00:02:55,630
So now to send such requests,

65
00:02:55,630 --> 00:02:57,960
we can move on to the next steps

66
00:02:57,960 --> 00:02:59,870
because here in this code example,

67
00:02:59,870 --> 00:03:01,730
in the official documentation,

68
00:03:01,730 --> 00:03:06,090
we can see how we could make an example payment,

69
00:03:06,090 --> 00:03:08,578
how we could charge a credit card

70
00:03:08,578 --> 00:03:10,530
and this, therefore is the code

71
00:03:10,530 --> 00:03:12,823
which we wanna add to our project.

