Quick start
The shortest route from a fresh installation to a tested Stripe payment, with Stripe's test cards and the checklist for going live.
Set up in test mode
- Install the extension and validate your licence. See Installation and Licence activation.
- In the header of the administration, choose the Store you are configuring.
- Open the Stripe connection tab. Paste your Stripe test secret key, which begins with
sk_test_, into Test secret key. Stripe connection explains where to find it. - Open the Payment notifications tab. Copy the Test address with Copy URL.
- In your Stripe Dashboard, in test mode, add a webhook destination with that address and these four events:
checkout.session.completed
checkout.session.async_payment_succeeded
checkout.session.async_payment_failed
checkout.session.expired- In Stripe, open the destination you created, reveal its signing secret, which begins with
whsec_, and paste it into Test signing secret in the Stripe connection tab. - Open the Settings tab. Set Mode to Test, choose a Paid order status and set Payment method to Enabled.
- Click Save settings. You see "Settings saved."
The method now appears at checkout as "Card / Apple Pay / Google Pay".
Test the payment
In test mode no money moves. Use the test cards Stripe publishes, with any future expiry date and any three-digit security code:
| Card number | Result |
|---|---|
4242 4242 4242 4242 | Payment succeeds |
4000 0025 0000 3155 | Asks for 3D Secure authentication, then succeeds |
4000 0000 0000 0002 | Card is declined |
The full list is on Stripe's testing page.
Run these checks, each with a new order:
- Successful payment. Pay with the first card. You return to the OpenCart success page. The order has your paid status, its history shows "Stripe payment verified:" followed by the Stripe payment reference, stock is reduced and the confirmation e-mail arrives.
- 3D Secure. Pay with the second card and complete the authentication.
- Declined card. Use the third card. Stripe shows the decline on its page and no order is confirmed.
- Cancellation. On the Stripe page, use the link back to your store. You return to the checkout and no order is confirmed.
- Browser closed. Pay successfully and close the browser tab before returning to the store. Within moments the order is still confirmed, through the webhook. This proves your webhook works.
- Open Payment activity and check that each attempt shows the expected state, and that each paid order was confirmed once.
In Stripe, the webhook destination shows each delivery and the answer of your store. Successful deliveries show a 2xx status.
Going live
- In Stripe, switch to live mode and copy your live secret key, which begins with
sk_live_. Paste it into Live secret key. - Open the Payment notifications tab and copy the Live address. It is different from the test address.
- In Stripe, in live mode, add a new webhook destination with the live address and the same four events.
- Copy the signing secret of the live destination into Live signing secret. It is different from the test one.
- In Settings, set Mode to Live, check Paid order status, the availability rules and that Payment method is Enabled. Click Save settings.
- Check the first real order: it must reach Paid and confirmed in Payment activity, and the webhook delivery in Stripe must show a 2xx status.
Repeat the whole procedure for each store of a multi-store installation.
Still need help?
Open a support ticket from your account and our team will look at your store with you.