Back

VibeFox Paystack 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.

Currency: the order must be in a currency Paystack accepts: NGN, USD, GHS, ZAR, KES, XOF, EGP or RWF, as enabled on your Paystack account. In other currencies the payment method is hidden. In XOF and RWF Paystack accepts whole amounts only.

Paystack account: you need the secret keys of your Paystack account: the test secret key (sk_test_...) and/or the live secret key (sk_live_...). The public keys (pk_...) are not needed, because the payment is made on the Paystack hosted page. In the Paystack dashboard you also set the webhook URL of your store (see Configuration). Your store must be reachable from the internet to receive webhooks.

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_paystack_payment-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_paystack_payment.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_paystack_payment-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 Paystack Payment 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 secret keys from the Paystack dashboard and set the webhook URL in the Paystack dashboard (see Configuration).

5. Turn on Enable/Disable and click Save. Keep Test Mode on until you have made a test payment, then turn it off to accept real payments.

OpenCart 4

1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_paystack_payment.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 Paystack Payment, click Install (the green + button), then Edit (the pencil button).

4. Enter the license key, the Paystack 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 Paystack Payment > Edit. The sections are listed on the left; the Save button under the list saves the whole page. Above the settings a status box shows the mode: Test mode: no real money is charged. or Live mode: real payments are accepted. It also warns when the secret key of the current mode is empty, when a public key (pk_...) was entered in a secret key field, when live mode has a test key (sk_test_...) or test mode has a live key (sk_live_...), and when Paystack does not accept the default currency of your store. While a key problem exists, the payment method is hidden at checkout. Without the right to modify the extension the page shows the settings but cannot save them.

When you save, Title must not be empty or longer than 128 characters, Sort Order must be a whole number, Total must be a number of 0 or more, and the geo zone and order statuses must exist; otherwise nothing is saved. Key problems do not block saving: the status box names them.

Paystack

The section starts with a short note: cards, bank transfers, USSD and mobile money on the Paystack hosted payment page, every payment confirmed on the server through the Paystack API, and the accepted currencies.

Enable/Disable: Enable Paystack Payment 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: Paystack. Required, at most 128 characters.

Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay securely using your debit card, credit card, or bank account via Paystack.

Sort Order: the position of Paystack among the payment methods at checkout. Leave it empty or enter a whole number.

Geo Zone: offer Paystack 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 Paystack is offered. Leave it empty to offer Paystack for any total.

API keys

Copy the secret keys from the Paystack dashboard, page Settings > API Keys & Webhooks. The section links to it.

Test Mode: uses the test secret key for new payments, and no real money is charged. Turn it off to accept real payments with the live secret key. Payments made in the other mode keep using the key of their own mode for verification and refunds. Default: on. While it is on, customers see TEST MODE ENABLED. No real charges will be made. at the Confirm Order step.

Test Secret Key: your Paystack test secret key. It starts with sk_test_.

Live Secret Key: your Paystack live secret key. It starts with sk_live_.

Saved keys 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 key, tick Clear the saved value under the field and click Save.

Webhook

The webhook tells your store that a payment has been made, even when the customer does not return to the store. In the Paystack dashboard, page Settings > API Keys & Webhooks, set the URL shown in Webhook URL in this section as both the Test Webhook URL and the Live Webhook URL. On OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_paystack_payment/webhook, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_paystack_payment/payment/wcp_paystack_payment.webhook. It is built from the storefront address of your OpenCart installation. Copy the URL exactly as the settings show it.

Paystack signs every webhook with your secret key, so nothing else has to be configured. Webhooks without a valid signature are rejected. The extension uses the event charge.success:

charge.success: a payment was made. The extension reads the transaction from the Paystack API with the secret key of the mode the payment was started in and sets the order status if everything matches.

Other events are answered with OK and ignored. Without the webhook, an order is confirmed only when the customer comes back to the store after paying. Bank transfer and USSD payments that complete later are confirmed only by the webhook.

Orders

OpenCart creates the order at the Confirm Order step without a status (a missing order). The order gets a status only after Paystack has confirmed the payment through the API. Each status field below lists your OpenCart order statuses.

Autocomplete Order: when on, paid orders get the Complete Order Status instead of the Paid Order Status. Default: off.

Paid Order Status: the status set after a confirmed payment. Default: Processing.

Complete Order Status: the status set after a confirmed payment when Autocomplete Order is on. Default: Complete.

Awaiting Payment Status: the customer came back while Paystack was still processing the payment (bank transfer, USSD, mobile money). The order keeps this status until the webhook confirms the payment. 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 Status: a payment that Paystack was still processing failed for an order in the awaiting status. Default: Failed.

Refunded Status: the payment was fully refunded from the order page. Default: Refunded.

Advanced

Debug log: writes Paystack events and API calls to paystack_p_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 paystack_p_debug.old.log.php. Errors and warnings are always logged. Keys and customer data are never logged. Default: off.

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. Payment data saved on orders is always kept. 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. The saved secret keys are kept.

Checkout

At the Payment Method step the customer chooses the payment method (by default Paystack). At the Confirm Order step the customer sees your description and the note You will be redirected to the secure Paystack page to complete the payment. OpenCart creates the order at this step, still without a status. 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. When the customer clicks Confirm Order, the extension starts a Paystack transaction for the order total in the order currency, with the customer's e-mail, and sends the customer to the Paystack hosted checkout page. There the customer pays with one of the channels enabled on your Paystack account. The payment carries the order number and the customer name.

After paying, the customer returns to your store. The order is marked paid only after Paystack confirms it: when the customer comes back and when the webhook arrives, the extension reads the transaction from the Paystack API and checks the reference, status, amount and currency. 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.

If the payment is still being processed, for example a bank transfer, the order gets the Awaiting Payment Status when the customer comes back, and the success page shows Thank you. Your payment is being confirmed by Paystack; you will receive an email confirmation. The webhook completes the order later, and the customer gets the OpenCart order status e-mail when the order becomes paid or the payment fails. For an order on review the success page shows Your payment was received and your order is being reviewed. We will contact you if anything is needed. If Paystack cannot be reached when the customer comes back, or has not confirmed the payment yet, a Payment confirmation page asks the customer not to pay again and offers Check again and Back to checkout; the webhook sets the order status as soon as it arrives.

If the customer clicks Cancel payment on the Paystack page, leaves it without paying or the payment is declined, the order stays without a status and the cart is kept. The customer is back at checkout with a message: Payment was cancelled. You can try again or choose another payment method., The payment was not completed. You can try again or choose another payment method. or Your payment was declined. You can try again or choose another payment method. 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) starts a new Paystack transaction. An older payment page stays valid: if it is paid later, the payment is still accepted. Before a new payment starts, the open attempts of the same cart from the last 24 hours are checked with Paystack. If the cart is already paid, on review or waiting for a bank transfer, the customer goes straight to the success page and no second payment is started. If another order of the same cart is paid anyway, that order stays without a status and the paid order gets a note to refund the duplicate. 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 you cancelled it), the customer is sent back to the checkout with the message Your previous order was cancelled without a payment. Please confirm the order again to pay with a new order. The next Confirm Order pays a new order. If that order was already paid for an earlier cart and the cart has changed since, the customer is taken back to the checkout, and the next Confirm Order pays a new order of the current cart. A closed order is never shown as paid.

The return link works only with its own random token. A return that cannot be matched to an order leads to checkout with We could not match this payment to an order. If you were charged, please contact us.

If Paystack cannot start the payment, the customer stays at the Confirm Order step with a short message above the button, for example Paystack could not start the payment: followed by the reason from Paystack, or Paystack is temporarily unavailable. Please try again in a moment or choose another payment method. The order total must be greater than zero, and the customer needs a valid e-mail address.

The webhook also works while the store is in maintenance mode, because OpenCart lets payment extension requests through (on OpenCart 4 the extension adds its own startup action for this, which also lets the customer return from Paystack).

The extension has no inline or popup payment form, no saved cards, no subscriptions, no split payments or subaccounts and no choice of payment channels in OpenCart.

Orders and refunds

Order statuses

No status (missing order): the customer was sent to Paystack and has not paid, left the Paystack page, or Paystack has not confirmed the payment yet. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders.

Awaiting Payment Status (default Pending): the customer came back while Paystack was still processing the payment, for example a bank transfer or USSD. The order moves to the paid status when Paystack confirms the payment. If such a payment is never completed, the order stays in this status until you change it.

Paid Order Status (default Processing) or Complete Order Status: the payment was confirmed. The complete status is used when Autocomplete Order is on. A note shows the amount, the Paystack reference, the transaction number, the mode (test or live), the payment channel, the card type and last digits for card payments, and any Paystack fees paid by the customer.

On Hold (Review) Status (default Pending): the paid amount or currency differs from the order (note Paystack amount or currency mismatch), or the payment arrived after the order had been cancelled or set to another status without payment. The note explains what to check. Fulfil the order or refund the payment.

Failed Status (default Failed): Paystack reports the latest payment attempt of an order in the awaiting status as failed or reversed. A failure of an older attempt does not change the order.

If a second payment arrives for an order that is already paid, the order is not changed. A note asks you to refund the duplicate payment in the Paystack dashboard. A payment that arrives for an order in another processing status, for example Shipped, is only noted on the order.

Notes are entries in the order History that the customer does not see.

VibeFox Paystack Payment tab

In Sales > Orders open an order paid with Paystack. At the bottom of the order page, next to History and Additional, the VibeFox Paystack Payment tab shows the Transaction reference, the Mode with a Test label for test payments, the payment Status, the Transaction ID, the Channel and Card, the payment date, the amounts Paid / refunded, the refund form, the refund history and the Paystack notes of the order. The tab is shown to users who have access to the extension.

Refunds

In the VibeFox Paystack Payment tab enter the Amount (the amount not refunded yet is filled in), optionally a Reason (optional), and click Refund via Paystack. Confirm the question Refund this amount through Paystack? This cannot be undone. Full and partial refunds are supported. You need the right to modify the extension (set in System > Users > User Groups). The refund goes to the transaction that paid the order, with the secret key of the mode (test or live) it was made in, so that mode's key must be set. Refunds are made in the amount and currency Paystack charged, so for an order on review after an amount or currency mismatch you can refund up to what the customer actually paid, not the order total. In XOF and RWF refunds must be whole amounts.

Paystack queues refunds: the note and the refund history show the status Paystack returned, for example pending, and the refund ID. If Paystack does not accept the refund, the tab shows Paystack refund failed: with the reason, and no refund is recorded. 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 Paystack has confirmed the payment.

Product returns in Sales > Returns do not send money back through Paystack. Refunds made in the Paystack dashboard, and the final status of refunds queued by Paystack, are not synchronised back to OpenCart. If needed, record them manually.

License key

The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox Paystack Payment is the first block on Extensions > Extensions > Payments > VibeFox Paystack Payment > 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-paystack 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, Paystack 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

Paystack does not appear at checkout: check that the license is active, Enable/Disable is on, the current mode has a correct secret key (Test Secret Key with sk_test_... in test mode, Live Secret Key with sk_live_... in live mode) and the order currency is one Paystack accepts. The status box at the top of the settings names the problem. 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 did not reach your store and the customer did not come back. In the Paystack dashboard check that the Test Webhook URL and the Live Webhook URL are exactly the URL shown in Webhook URL, and that no firewall or password protection blocks it. Turn on Debug log and look at the Log field for rejected webhooks.

Webhook answers Invalid signature: the webhook was not signed with the test or live secret key entered in the settings, for example because the keys belong to another Paystack account. Enter the keys of the account that sends the webhook.

Webhook answers Secret key not configured: neither secret key is set. Enter the secret keys in the settings.

Webhook answers Verification failed, Busy, retry later or Order could not be updated, retry later: the transaction could not be read from the Paystack API at that moment, the cart was being processed by the customer return at the same time, or the order status could not be set. Paystack sends the webhook again. The log shows the reason.

Webhook answers OK - unknown reference: the payment was not made for an order of this store, for example a Paystack payment page or another integration on the same account. It is ignored.

The webhook URL shows Empty body in the browser: this is normal. The URL accepts only requests from Paystack.

The customer sees Payment gateway is not properly configured: the secret key of the current mode is missing or wrong. Fix it as the status box at the top of the settings says. This payment method is not available. after Confirm Order means the payment method was turned off meanwhile or the checkout no longer matches the order: the customer reloads the checkout.

The order is in the review status after payment: read the notes in the VibeFox Paystack Payment tab (see Order statuses), then fulfil the order or refund the payment.

The order stays in the awaiting status: Paystack has not confirmed the payment yet. Check the transaction in the Paystack dashboard and the webhook settings. If the customer never completed the payment, change the status manually.

No refund form in the tab: the tab says why: the payment is not confirmed yet, it is fully refunded, your user group has no right to modify the extension, or the secret key of the payment's mode is missing.

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 configured. Enter it and try again.

For developers: the extension triggers the OpenCart events paystack_p_payment_request (the transaction request), paystack_p_supported_currencies and paystack_p_currency_decimals.

Uninstall

Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox Paystack Payment. 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 and the customer's return through in maintenance mode). If Delete data on uninstall is on, the other gateway settings (title, description, test mode, keys, autocomplete, logging) and the log are removed. If it is off, they are kept for a later re-install. The Paystack payment data of orders and the 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 Paystack Payment in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

Paystack is a trademark of its respective owner. This extension is not affiliated with or endorsed by Paystack.