A UK company Built and supported in the United Kingdom Help in UK hours Hosted sites kept in London

Taking card payments with Stripe

Stripe takes the card payment on its own secure page, so card details never touch your website. When the customer has paid, Stripe tells your site and the invoice is marked paid on its own.

  1. Open a Stripe account, or sign in to yours.
  2. Go to Developers → API keys and copy the secret key. It starts sk_test_ while you are testing and sk_live_ when you take real money. Not the publishable key, which starts pk_.
  3. Paste it into Stripe secret key here and save. The key is checked with Stripe as you save, and you are told straight away if it is the wrong one.
  4. So invoices mark themselves paid, add a webhook in Developers → Webhooks pointing at the address shown under Stripe webhook secret, for the checkout.session.completed event. Copy its signing secret (whsec_…) into Stripe webhook secret.

Test first with your test key and a Stripe test card, then swap in the live key. Questions about your Stripe account: Stripe support.

FAQ

Customers see “Card payment is unavailable right now”. Why?
The reason is emailed to you and shown in red under the Stripe secret key. Most often it is the publishable key (pk_) pasted instead of the secret key (sk_). If Managed Payments is switched on in your Stripe account, switch it off: with it on, Stripe will not start these payments.

Do I need the webhook?
Payments still go through without it, but the invoice will not mark itself paid. With it, it does so within seconds.

Can I test without taking real money?
Yes. Use the test secret key (sk_test_) and Stripe’s test card numbers. Nothing is charged. Swap in the live key when you are ready.

Was this helpful?

Still need help? Sign in to your account and raise a support ticket. The people who wrote the code will help, and most tickets are answered the same working day.

Sign in to raise a ticket