Stripe (Secure Credit Card) is a payment processor that is easy to use and to set up, fast, and has excellent support. It's available in many countries and allows you, as an Ozcart admin, to accept customer payments via various credit and debit cards.
Set up Stripe
- To set up Stripe with Ozcart, first log in to your administration area and navigate to Configuration > Payment Plugins > Stripe. Click on the Activate icon and then on the Edit icon.
- Set the Environment setting accordingly. You'll need to decide if you'd like to use the Test keys or Live keys. Test keys are for the website admin to test the checkout process with no real money being transferred. Live keys are used when you're ready to start selling to live clients.
- Navigate to Stripe's website and log in to your account.
- To create test keys, you'll have to access sandboxes in Stripe. Under your dashboard account picker (where your company image is), switch to the sandbox called Test mode. If none exist, create a new sandbox.
- To create live keys, find and click on Developers > API Keys.
- Create and/or copy both the Publishable key and the Secret key.
- In your Ozcart admin area, if you want to test your integration, paste the test keys, otherwise, paste the live keys. Make sure to enter both live keys or both test keys.
- Next, you'll set up your webhook endpoint, This ensures that even if the customer’s browser freezes or closes during checkout, Stripe can still notify Ozcart to mark the order as paid. The customer is less likely to retry and accidentally pay again, preventing duplicate payments. In Ozcart, copy the Webhook URL and go to your Stripe dashboard to Developers > Webhooks.
- Click on Add destination.
- Keep Your account selected and API as is. Under All events, enter, in the search bar, the following: payment_intent.succeeded
- Select it and click on Continue. Then, keep Webhook endpoint selected.
- Enter a relevant Destination name, such as Ozcart Stripe webhook URL. In Endpoint URL, enter the Webhook URL you copied earlier.
- Click Create destination.
- You have successfully set up a webhook endpoint. Next, we'll take care of the optional Webhook Signing Secret, which helps with security. You should be on the Webhooks tab, viewing the created webhook. If not, then go to Developers > Webhooks and click on the created webhook to view it.
- You should see the Signing secret on that page. Click the Reveal icon to view it. Copy it and add it to the Webhook Signing Secret in Ozcart. If you ever roll the secret, you'll have to update it in Ozcart as well.
- In Ozcart, set the Stripe payment plugin Status to Enabled.
- Set the Order Status to the status you'd like an order to have after purchase. Authorized is the default choice.
- Set the Currency to your default one. This would also be the one that withdraws to your bank account. You may not see all the possible currencies until you enter your API keys.
- As for the Store Cards setting, we suggest not storing cards (Disabled) or else you may no longer be PCI compliant. This setting is no longer available in our latest Stripe updates, keeping you PCI compliant.
- Save.
- Then, navigate to your front-end to perform a test checkout to confirm that Stripe appears as a payment option. Use test API keys to test the checkout process without spending real funds.
Important: If you are using reward points, make sure to read the important section at the bottom of the Reward Points article.