Configuring the Stripe gateway

Stripe is a modern payment processor that combines a traditional payment gateway and merchant account into one service. That makes it possible to set up the gateway in a matter of minutes. The ease of setup along with simple pricing and a well-documented API has made Stripe one of the most popular gateways for web developers.

Getting ready

It's best to open a Stripe account before reading or going through this recipe. You'll need to enter your important business details like business tax ID number if you're in the US. You'll also need the WooCommerce Stripe plugin (available on WooThemes.com) installed and activated on your site.

An SSL certificate is required to process actual credit cards. Contact your host about setting one up on your site. You don't need an SSL certificate to set up the plugin or test.

How to do it…

In order to configure the Stripe gateway, let's take a look at the following steps:

  1. From the WordPress admin, go to WooCommerce | Settings | Checkout.
  2. Click on Stripe.
  3. Check the Enable Stripe field.

    Note

    By default, the Title and Description field will say something like Pay with your credit card via Stripe. I suggest simplifying this to Pay with your credit card. Most customers don't know or care what Stripe is. They just know that they want to pay with their credit card.

    How to do it…
  4. Log in to your Stripe account and copy your Live Secret Key, Live Publishable Key, Test Secret Key, and Test Publishable Key into the corresponding fields in WooCommerce. You can also go straight to the API keys in your Stripe account via https://dashboard.stripe.com/account/apikeys.

    Note

    If you usually ship your products a day after receiving the order, I recommend leaving the Capture charge immediately setting checked. If it takes you a few days, then I recommend unchecking that field and manually charging the customer when you ship the product. You should technically only charge the customer once the order has shipped, but it's most likely not worth the hassle if you ship the product within 24 hours.

  5. Click on the Save changes button.

    Note

    To make checking out a bit easier for your customers, it's nice to remember their credit card number. You can do that by checking the Enable saved cards field. WooCommerce never stores credit card numbers, but it can remember credit card tokens, which is something that a gateway will send to WooCommerce after a transaction. It's something only your Stripe account can use for further orders, and if someone hacks your site there's no chance of them getting the credit card number. This means you don't have to worry about PCI compliance.

There's more…

With Stripe, you need an SSL certificate and you'll have to protect your checkout page. In the following recipe, we'll show you how to do that.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset