The Stripe payment option lets customers pay you using a credit card, debit card, or one of a number of other payment methods that you can enable within your Stripe account. If paying by card, the customer remains on your site throughout the payment process. Stripe’s website shows the fees charged by the various payment methods.
Getting your API keys
To connect your site to Stripe you need to get your Stripe API keys. There are two sets of API keys: test keys allow you to test your account without transferring money, while live keys are used to take payments.
To get your test API keys, log in to your Stripe account, click Developers at the top of the page, and then click API keys. You will see a panel like this:
Your secret key will initially be hidden. Click Reveal test key to reveal it:
You can click on each key to copy it to the clipboard.
To get your live API keys, click Activate your Stripe account and activate your account. Once your account has been activated, click Get your live API keys.
Setting up Stripe in your shop
To set up Stripe in your shop, click Payment in the shop admin panel menu and then click Stripe. You can then change the following settings:
Status
Whether Stripe is available as a payment method.
Mode
Whether to perform test payments or live payments.
Test public key
The test public/publishable key. This key will start pk_test_.
Test secret key
The test secret key. This key will start sk_test_.
Live public key
The live public/publishable key. This key will start pk_live_.
Live secret key
The live public/publishable key. This key will start sk_live_.
You only need to enter the keys for the mode than you currently using, so the live keys can be left blank until you switch to live mode.
Testing Stripe
When in test mode you can use the card number 4000 0027 6000 3184, along with any future expiry date and any security code. This card has 3D Secure enabled, so a pop-up window will be shown asking you to authorise the transaction. In live mode the pop-up window will show a message from the customer’s bank asking for the authentication details required by the bank (such as a code sent to the customer in a text message).
Enabling other payment methods
To enable other payment methods, log in to your Stripe account, click the Settings icon (which looks like a gear) at the top-right of the page, click Payments, and then click on the Payment Methods tab. You can enable any of the payment methods by clicking on the corresponding Turn on button:
To enable Apple Pay and Google Pay you will also need to verify your site’s domain name. To do this, click on the Payment method domains tab and click the Add a new domain button. Enter your website’s domain name and click Save and continue. Your domain name will then be verified. Note that your site must be live on its domain name for this to work. If your site is not yet live, you will need to return to this page after your site has gone live.
When enabling payment methods such as bank transfers, Stripe will show a pop-up advising you to use ‘webhooks’ to ensure you don’t dispatch an order before payment is received. Your shop has already been set-up to use webhooks, so you don’t need to worry about this notice — the order will only show in your shop, and you and your customer will only receive the order confirmation e-mail, once the payment has been received.