Implement Stripe in 3 steps using php

Hi Geeks,
This Article is focused on Implement Stripe in 3 steps using php, where you can easily accept payments through stripe by using this code. the stripe checkout.js
is used here with server side code also.

Step 1: Create a product list page named index.php with following code:

Output Screen for this will look like this:


Note: you can get products from database also,but here for demonstration i am showing these static.

Step 2: Create a Checkout Page with name pay.php, here you need to replace the stripe public key mention in the comment also.

Output Screen:


Step 3: Create a server side script for charge customer named as charge.php with following code, here you need to replace the Stripe private key mention in comment also:

Output Screen:


Note: there should be a stripe library in the root folder you can download it from here:
and extract it with name stripe as you can see in following screenshot


Still you have any problem in integrating you can directly call me and i will send you the complete working code,

you can comment here or send me a email on