VibeFox Stripe for OpenCart — Help
Requirements
OpenCart: 3.0.x (tested on 3.0.5.0) or 4.0.2 and later (tested on 4.1.0.3).
PHP: 8.0 or later.
Stripe account: you need the secret API keys of your Stripe account and a webhook endpoint in the Stripe Dashboard (see Configuration). Only the secret keys and the webhook signing secrets are used. The publishable keys (pk_...) are not needed, because Stripe Checkout is a Stripe-hosted page.
VibeFox license key: bought on vibefox.net. One key works on one domain.
Installation
The download is one zip file with the packages for both OpenCart versions. Unpack it on your computer. It contains README.txt, the OpenCart 3 package wcp_stripe_gateway-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_stripe_gateway.ocmod.zip. Install only the package for your OpenCart version. The license key is the same for both versions.
OpenCart 3
1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_stripe_gateway-oc3-(version).ocmod.zip. The extension has no OCMOD modifications, so Extensions > Modifications does not need a refresh. Instead of the installer you can copy the contents of the upload folder of this package into the root folder of your store.
2. Go to Extensions > Extensions and choose the type Payments. Find VibeFox Stripe Gateway and click Install (the green + button). Your admin user needs the right to modify the payment extensions list.
3. Click Edit (the pencil button) to open the settings page. Paste your VibeFox license key into License key in the license block at the top of the page and click Activate (see License key).
4. Paste your Stripe secret keys, set up the webhook in the Stripe Dashboard and paste its signing secrets (see Configuration).
5. Turn on Enable/Disable and click Save. Test a payment in test mode with the card 4242 4242 4242 4242, then turn off Test Mode.
OpenCart 4
1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_stripe_gateway.ocmod.zip. Do not rename the file: OpenCart 4 takes the extension code from the file name, and a renamed package does not work.
2. The package appears in the list of installed extensions on the same page. Click Install (the green + button) next to it.
3. Go to Extensions > Extensions and choose the type Payments. Find VibeFox Stripe Gateway, click Install (the green + button), then Edit (the pencil button).
4. Enter the license key, the Stripe keys and the webhook as in steps 3 to 5 for OpenCart 3. The settings page and its fields are the same in both versions. Only the webhook URL is different (see Webhook).
A new install starts with the payment method turned off and test mode on.
Configuration
All settings are on the extension page: Extensions > Extensions > Payments > VibeFox Stripe Gateway > Edit. The sections are listed on the left; the Save button under the list saves the whole page. Above the settings the page warns you when the current mode has no secret key (the payment method is then hidden at checkout) or no webhook signing secret (orders are then confirmed only when the customer returns to the store after paying), and shows Test mode is on: no real payments are taken. while test mode is on. Without the right to modify the extension the page shows the settings but cannot save them.
When you save, Title must have 1 to 128 characters, Sort Order must be a whole number and Total must be a number of 0 or more. If a key or secret does not start with the expected prefix, the settings are saved and a warning that names the field is shown above the settings.
Stripe Checkout
Enable/Disable: Enable Stripe Gateway turns the payment method on or off. Default: off.
Title: the payment method name customers see at checkout. It is also the payment method name stored in the order. Default: Stripe. Required.
Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay securely with your credit or debit card via Stripe.
Sort Order: the position of Stripe among the payment methods at checkout. Leave it empty or enter a whole number.
Geo Zone: offer Stripe only for payment addresses in the selected geo zone. Default: All zones. Geo zones are set up in System > Localisation > Geo Zones.
Total: the checkout total, in the default currency of the store, that an order must reach before Stripe is offered. Leave it empty to offer Stripe for any total.
API keys
Copy the secret keys from Stripe Dashboard > Developers > API keys (the page links there). Test and live keys are separate. Test mode uses only the test keys, live mode only the live keys.
Test Mode: uses the Stripe test keys. No real money is charged; pay with Stripe test cards such as 4242 4242 4242 4242. Default: on. Turn it off to take real payments. While it is on, customers see Test mode: no real payment is taken. at the Confirm Order step.
Test Secret Key: the secret key of the test mode. It starts with sk_test_ (or rk_test_ for a restricted key).
Test Webhook Secret: the signing secret (whsec_...) of the webhook endpoint created in test mode.
Live Secret Key: the secret key of the live mode. It starts with sk_live_ (or rk_live_ for a restricted key).
Live Webhook Secret: the signing secret (whsec_...) of the webhook endpoint created in live mode.
Saved keys and secrets are never shown again. The field stays empty and shows Saved — leave empty to keep it. Type a new value only to change it. To remove a saved value, tick Clear the saved value on save under the field and click Save.
Webhook
The webhook tells your store that a payment has been made. In Stripe Dashboard > Developers > Webhooks add an endpoint in test mode and another one in live mode. Use the URL shown in Endpoint URL in this section. On OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_stripe_gateway/webhook, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_stripe_gateway/payment/wcp_stripe_gateway.webhook. It is built from the storefront address of your OpenCart installation. Copy the URL exactly as the settings show it.
Select these events for each endpoint (they are also listed in this section):
After creating each endpoint, copy its signing secret (whsec_...) from Stripe and paste it into Test Webhook Secret or Live Webhook Secret. Webhooks without a valid signature are rejected. An event is accepted only when it is signed with the secret of the mode the payment was made in, so a test secret never confirms a live payment. Without the webhook, an order is confirmed only when the customer comes back to the store after paying.
Orders
OpenCart creates the order at the Confirm Order step without a status (a missing order). The order gets a status only after Stripe has confirmed the payment. Each field below lists your OpenCart order statuses.
Order Status After Payment: the status set after a successful payment. Default: Processing.
Awaiting Payment Status: a delayed payment: the checkout is finished, Stripe has not confirmed the money yet. Default: Pending.
On Hold (Review) Status: the payment needs your review (see Order statuses). Default: Pending, because OpenCart has no On hold status. You can create your own status in System > Localisation > Order Statuses and select it here.
Failed Payment Status: a delayed payment failed. Default: Failed.
Refunded Status: the payment was fully refunded from the order page. Default: Refunded.
Advanced
Logging: writes Stripe requests and webhooks to strg_debug.log.php in the OpenCart logs folder (storage/logs). The file cannot be opened from the web, and at 5 MB it is moved to strg_debug.old.log.php. Keys and customer data are not logged. Default: off. Nothing is written while it is off, errors included.
Log: shows the size and the latest entries of the log. Click Clear log to empty it.
Delete Data on Uninstall: when on, uninstalling the extension removes the gateway settings and the log. Stripe transactions and refunds always stay, so old orders remain refundable. Default: off.
Import / Export
Export: Download JSON saves the settings as a JSON file. Secret keys are not exported.
Import: paste previously exported JSON and click Import to restore the settings. Saved secret keys are kept.
Checkout
At the Payment Method step the customer chooses the payment method (by default Stripe). At the Confirm Order step the customer sees your description and the note You will be redirected to Stripe to complete the payment securely. OpenCart creates the order at this step, still without a status. When the customer clicks Confirm Order, the extension creates a Stripe Checkout Session for the order total in the order currency and sends the customer to the Stripe payment page. There the customer pays by credit or debit card. On OpenCart 4 the customer picks the payment method with the Choose button of the payment method block, in the window Payment method options, and clicks Confirm Order at the bottom of the checkout page. The customer's e-mail is passed to Stripe, and the payment shows on the Stripe page as Order # and the order number.
After paying, the customer returns to your store. The order is marked paid only after Stripe confirms it: by the signed webhook or by a server-side request to Stripe when the customer comes back. The order then gets its status the standard OpenCart way, with the usual order e-mails and stock update, and the customer sees the OpenCart order success page. For a delayed payment the page also shows Your payment is being confirmed by Stripe. You will receive an e-mail as soon as it is confirmed. If Stripe has not confirmed the payment yet when the customer comes back, a Payment confirmation page shows the same text and a Check again button; the webhook sets the order status as soon as it arrives.
If the customer cancels on the Stripe page, the Stripe session is closed and the customer is back at checkout with The payment was cancelled. You can try again or choose another payment method. If the payment was not completed or a delayed payment failed, the message is The payment was not completed. You can try again or choose another payment method. The cart is kept. On OpenCart 4 these messages are shown above the checkout page. Each new attempt (OpenCart 3 creates a new order every time the Confirm Order step is shown, OpenCart 4 updates the order of the checkout) closes the previous open Stripe sessions of the cart, so it cannot be paid twice. If a previous session turns out to be paid already, that payment is confirmed instead of a new one. If another order of the same cart is already paid with Stripe, no new payment is started and the customer sees the order success page. A change of the cart, including a new quantity, counts as a new cart that needs its own payment.
OpenCart 4 keeps the order in the checkout until the success page is shown. If that order was closed without a payment meanwhile (for example its delayed payment failed or you cancelled it), the customer is sent back to the checkout with the message about the payment that was not completed, and the next Confirm Order pays a new order. A paid order is never shown as paid for a different cart.
If Stripe cannot start the payment, the customer stays at the Confirm Order step with a short message above the button, for example The order total is below the minimum amount Stripe can charge in this currency. Please choose another payment method. The technical reason is written to the log.
The webhook also works while the store is in maintenance mode, because OpenCart lets payment extension requests through.
The extension takes card payments only, captured immediately on the Stripe page. It has no saved cards, subscriptions or recurring payments, no on-site card form, no Apple Pay or Google Pay buttons on your site and no separate authorize and capture.
Orders and refunds
Order statuses
No status (missing order): the customer was sent to Stripe and has not paid, or Stripe has not confirmed the payment yet. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders.
Order Status After Payment (default Processing): the payment was confirmed. A note shows the Stripe payment (pi_...), the session and how it was confirmed (webhook or return).
Awaiting Payment Status (default Pending): the customer finished the checkout with a delayed payment method. When Stripe confirms the payment, the order moves to Order Status After Payment; when the payment fails, it moves to Failed Payment Status. OpenCart notifies the customer of these changes.
On Hold (Review) Status (default Pending): Stripe reported a different amount or currency than the order total, or the payment arrived after the order had been cancelled or its status changed. The note explains it. Check the order and fulfil it or refund the payment.
Refunded Status (default Refunded): the payment was fully refunded through the extension.
If a second payment arrives for an order that is already paid, the order is not changed. A note asks you to check it and refund the duplicate in the Stripe Dashboard. The same applies when the payment belongs to another order of a cart that is already paid: that order stays without a status, and the note is added to the paid order.
Notes are entries in the order History that the customer does not see.
VibeFox Stripe Gateway tab
In Sales > Orders open an order paid with Stripe. At the bottom of the order page, next to History and Additional, the VibeFox Stripe Gateway tab shows the Stripe payment ID (linked to the payment in the Stripe Dashboard) with a Test mode label for test payments, the Checkout Session, the payment Status, the amounts Paid / refunded, the refund form, the refund history and the Stripe notes of the order. The tab is shown to users who have access to the extension.
Refunds
In the VibeFox Stripe Gateway tab enter the Amount (the amount not refunded yet is filled in), optionally a Reason (optional), and click Refund via Stripe. Confirm the question Refund this amount through Stripe? This cannot be undone. Full and partial refunds are supported. You need the right to modify the extension (set in System > Users > User Groups). Refunds are made in the amount and currency Stripe charged, not the order total. The refund is sent in the mode the payment was made in (test or live), so that mode's secret key must be set. If Stripe does not accept the refund, the tab shows the error and no refund is recorded. A successful refund is added to the history and the notes with the Stripe refund ID. A full refund sets the order to Refunded Status without notifying the customer and without returning products to stock, like a manual status change. A partial refund does not change the status. Refunds are available once Stripe has confirmed the payment.
Product returns in Sales > Returns do not send money back through Stripe.
Refunds made in the Stripe Dashboard arrive by the charge.refunded webhook and are added to the notes with the total refunded in Stripe. The order status is not changed automatically. Update it manually if needed.
License key
The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox Stripe Gateway is the first block on Extensions > Extensions > Payments > VibeFox Stripe Gateway > Edit, above the settings. Paste the key into License key and click Activate. After that the block shows the key masked, the status (for example the date the license is active until and your domain) and the buttons Check now to check the status again, Change key to enter another key and Remove key to remove the key from this store. Below them are the line Product: opencart-payment-stripe and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only admin users with the Modify permission for the extension can change the key. The texts of the block follow the admin language (English and Russian are included).
If the key is not accepted, the block says why, for example Key not found, This key belongs to another product, Domain limit reached or License expired on a date. After the store address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the extension keeps working on the last known status.
One key works on one domain: the store address from the OpenCart configuration. Removing the key from the store does not free its domain slot. Free the slot in your vibefox.net account.
Without an active key, Stripe is not shown to customers at checkout. If a payment is started anyway, the customer sees This payment method is not available. Please choose another one. An admin user who is logged in to the admin in the same browser still sees the payment method in the store, marked (unlicensed — visible to admins only), so you can set up and test the extension before you buy a key. On OpenCart 4 this preview is not available: the store does not see the admin login, so without an active key the payment method is hidden for everybody. After you have opened the Edit page once, a reminder appears on the admin Dashboard. Close it with × to hide it for 7 days. Existing orders are not affected: payments already started are still confirmed, and refunds work.
When a license expires, the extension keeps working, but updates and support need a renewal. The status is checked again automatically when you open the admin Dashboard or the Edit page: once a day for the first 14 days after the key is entered, then once a week. No cron job is needed. Uninstalling the extension always removes the license key and license status.
Troubleshooting
Stripe does not appear at checkout: check that the license is active, Enable/Disable is on and the current mode has a secret key: Test Secret Key in test mode, Live Secret Key in live mode. The settings page shows a warning when the key is missing. Also check that the payment address is in the selected Geo Zone and that the order reaches the Total set in the settings.
The payment went through, but the order stays without a status: the webhook is not working. In the Stripe Dashboard check that the endpoint exists in the mode you use (test or live), that its URL is exactly the one shown in Endpoint URL and that the four events are selected. Check that the signing secret of that endpoint is in the matching field (Test Webhook Secret or Live Webhook Secret). The Stripe Dashboard shows the answer of your store for each webhook. The order also gets its status when the customer returns to the store after paying.
Webhook answers Webhook secret not configured: neither webhook secret is set. Paste the signing secret into the settings.
Webhook answers Invalid signature: the signing secret belongs to another endpoint or another mode, or the server clock is wrong. Stripe signatures are accepted within 5 minutes of the server time. The answer is also Invalid signature when an event of a live payment is signed with the test secret or the other way round: check that the test and live secrets are not swapped.
Webhook answers Busy, retry: the order was being confirmed by another request at the same moment, or the order status could not be set. Stripe retries the webhook automatically. Turn on Logging to see the reason.
The webhook URL shows Method not allowed in the browser: this is normal. The URL accepts only requests from Stripe.
The value does not look right warning on save: a key was pasted into the wrong field. Secret keys start with sk_test_ / rk_test_ or sk_live_ / rk_live_, webhook secrets with whsec_.
The customer sees an error after Confirm Order: turn on Logging and look at the Log field on the extension page. This payment method is not available. Please reload the checkout page. means the checkout session no longer matches the order, or the payment method was turned off meanwhile: the customer reloads the checkout. A wrong key gives the message that the payment method is not configured correctly. An order total below the Stripe minimum for the currency (for example 0.50 EUR) cannot be paid with Stripe.
Test payments do not confirm a live payment: test and live payments are kept apart. Switch Test Mode to the mode you want and use that mode's keys and webhook.
Order is in the review status after payment: read the notes in the VibeFox Stripe Gateway tab (see Order statuses), then fulfil the order or refund the payment.
No refund form in the tab: the tab says why: the payment is not confirmed yet, it is fully refunded, or your user group has no right to modify the extension.
Refund fails with a message about the mode: the payment was made in test or live mode, and the secret key of that mode is not set. Enter it and try again.
For developers: before the Stripe session is created, the extension triggers the OpenCart event strg_checkout_session_params with the session parameters and the order.
Uninstall
Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox Stripe Gateway. The license key and license status of this extension are always removed. OpenCart always removes its own settings of the extension: Enable/Disable, Sort Order, Geo Zone, Total and the order statuses of the Orders section, which return to their defaults on a re-install. The OpenCart event of the extension is removed too (on OpenCart 4 its events and its startup action, which lets the webhook through in maintenance mode). If Delete Data on Uninstall is on, the other gateway settings (title, description, test mode, keys, webhook secrets, logging) and the log are removed. If it is off, they are kept for a later re-install. The Stripe transactions and refunds are always kept, so orders paid before can still be refunded after a re-install. Existing orders keep their payment notes.
On OpenCart 4, to remove the files of the extension as well, go to Extensions > Installer after the uninstall and click Uninstall (the orange − button) next to VibeFox Stripe Gateway in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.
Stripe is a trademark of its respective owner. This extension is not affiliated with or endorsed by Stripe.
