Stripe Payment Gateway Integration on Google Cloud

The Stripe payment gateway provides an easy and powerful way to accept credit cards directly on the web application. Stripe make it easy to integrate checkout system and collect payment on the website. The Stripe API is a powerful solution to integrate checkout system in the web application to provide a smooth payment experience.Stripe is responsible for processing and keeping clients’ credit/debit card data so no information of essence would be stored on your server and you would not have to comply with all the rules that come with storing credit/debit cards.

Let’s start integration:

Step 1: Create account on https://dashboard.stripe.com/register.

Step 2: After the setup ,Login into Account and navigate to account settings > API Keys.

Before getting started Collect the Publishable key and Secret key to later use in the script .Referring stripe docs , stripe produces code which can be used on the website directly ,the code which looks like this https://stripe.com/docs/checkout

The simple integration uses a script tag inside your payment form to render the blue Checkout button. Upon completion of the Checkout process, Checkout submits your form to your server, passing along a stripeToken and any elements your form contains. When adding the following code to your page, make sure that the form submits to your own server-side code within the action attribute:

Step 3: Now Replace the data-key in script code with your publishable key and in the PHP form replace the set API key with Secret key

require_once can be used in two ways,here i used example for composer so in php form you can find autoload.php. Alternatively you can download or know more about composer https://github.com/stripe/stripe-php/

Step:4 : Testing the Payment Process

To test the payment process, you need test card details. Use any of the following test card numbers, a valid future expiration date, and any random CVC number, to test Stripe payment gateway integration in PHP.

4242424242424242 Visa
4000056655665556 Visa (debit)
5555555555554444 Mastercard
5200828282828210 Mastercard (debit)
378282246310005 American Express
6011111111111117 Discover


Change the Test API keys (Publishable key and Secret key) with the Live API keys (Publishable key and Secret key) in the script once the testing is done with test data

Get a complimentary 30 minute marketing consultation and an audit report from our expert who has been awarded by LinkedIn Pro as ‘Best of 2017 & 2016’ in various categories including – ‘Marketing Consulting’, ‘Digital Marketing’ and ‘Lead Generation’.

Learn how other organizations are partnering with us for turnkey marketing services and solutions impacting real business outcomes.

Roy Lingam CEO,Delphi USMLE. Chicago

NectarSpot team successfully re-branded and revamped our old website delphiusmle.com to a fast loading and aesthetically pleasing within a short time frame of four weeks. NectarSpot designers and developers created a distinct UI/UX landing pages that communicates our brand as an established brand identity helping us to get more conversions. Our end users appreciate the site’s unique and polished presentation through an informative, well laid-out content and beautifully designed pages that helps a seamless interaction . The team is extremely organized and communicative and working with their team was seamless and highly collaborative. Their team is both technically and creatively talented. After creating relevant landing pages and revamping the entire site, NectarSpot is helping us to generate qualified leads through Google Ads campaign. We see a definitive increase in key web metrics such as higher conversion rate, lower bounce rate and higher engagement. We would highly recommend NectarSpot to anyone looking to up-brand their digital identity and get qualified leads.
Read More Testimonials....

Ryan Frederickson ArT Wine Preserver

NectarSpot team executed the Quick and solid build of AMP website. Not afraid of small tweaks here and there. The team has, from the beginning of project, focus on conversion and provided a seamless workflow for my prospects to visit, educate and finally purchase on my e-commerce portal. They provided design, development on AMP framework and helped to host e-commerce portal on scalable and secure google cloud. We are looking forward to working with them in future for other projects as well.
Read More Testimonials....

Read more to gain insights from our blogs.
Receive latest marketing insights, data and inspiration by subscribing .

Start Your Project Today (100% Satisfaction Guaranteed)

  • NectarSpot Inc. is an integrated digital marketing agency specializing in Design & Development of Web, Mobile & Voice Applications.
    We excel in providing Optimization, Automation, PPC & Analytics services to high performing brands across industries.

    Contact us today at +1 630 999 (7768) or email at info@nectarspot.com to know more.

Need help?

We are right here!