Developers

How to Integrate Bachs with WordPress and Accept Payments

10 min read

Daniel Ayoola
Illustration of the Bachs API connected to WordPress

Set up the official Bachs WooCommerce plugin, connect your account, configure webhooks, and test the complete checkout flow before accepting live payments.

You can accept payments on WordPress by connecting your WooCommerce store to Bachs. Install the official Bachs plugin, add your API key, configure payment notifications, and test your checkout before switching to live payments.

This guide walks through the setup from installation to your first payment check. It also explains how to choose your checkout experience, avoid common configuration mistakes, and troubleshoot orders that do not update after a customer pays.

The setup uses Bachs Payment Gateway for WooCommerce, published by Bachs. You will need WooCommerce installed on your WordPress website.

What you need before you start

Have the following ready:

  • A WordPress website with administrator access.
  • WooCommerce installed and configured, including your products, currency, and checkout page.
  • An HTTPS website with a valid SSL certificate for live payments.
  • A Bachs account with access to the Developer Portal.
  • A recent website backup before changing an existing payment setup.

The plugin lists minimum requirements of WordPress 6.2, WooCommerce 8.0, and PHP 7.4. These are compatibility minimums; run maintained versions appropriate for your store. Check the official plugin listing (opens in a new tab) when installing.

You can begin testing before your Bachs account is verified. To collect real payments, complete the account requirements shown in your Bachs dashboard. Verification and payment capabilities are separate from installing the WordPress plugin. See how to verify your Bachs account (opens in a new tab).

For a store already receiving orders, use a staging copy for sandbox testing. Changing the payment mode on a production website changes the experience for real shoppers too.

Step 1: Install the official Bachs plugin

  1. Sign in to your WordPress dashboard.
  2. Open Plugins → Add New Plugin.
  3. Search for Bachs Payment Gateway for WooCommerce.
  4. Check that the publisher is Bachs.
  5. Click Install Now, then Activate.

If you have the official ZIP file, use Plugins → Add New Plugin → Upload Plugin, choose the ZIP, install it, and activate it. You can get the plugin from its WordPress.org page (opens in a new tab).

Official Bachs Payment Gateway for WooCommerce listing on WordPress.org, published by Bachs

Once it is active, open WooCommerce → Settings → Payments. Find Bachs and open its settings using the available setup or management control.

Step 2: Connect your Bachs account

The API key allows your store to communicate with Bachs. Start with sandbox credentials so you can test without moving real money.

  1. Sign in to the Bachs dashboard (opens in a new tab).
  2. Switch to your sandbox environment.
  3. Open Developer Portal → API Keys.
  4. Create a secret key for this integration, with a recognizable name such as WooCommerce staging.
  5. Copy the key and store it securely. The complete value is shown when the key is created.
  6. Return to the Bachs settings in WooCommerce.
  7. Turn on Enable test (sandbox) mode and paste the key into Sandbox API Key.

Sandbox keys start with sk_sandbox_; live keys start with sk_live_. Use the key for the environment selected in the plugin. A live key will not authenticate sandbox requests.

Give the key the permissions needed by the integration. If a request fails with a permission error, review its scopes in the Developer Portal rather than repeatedly creating new keys. See the API key guide (opens in a new tab).

The Webhook Signing Secret is a separate credential. You will add it after creating your webhook endpoint in Step 4. Do not paste the API key into both fields.

Step 3: Choose your checkout settings

In the WooCommerce Bachs settings, configure the customer-facing fields:

  • Enable Bachs — Turn it on when you are ready to test the configured gateway.
  • Title — Use “Bachs” or another clear payment label that customers will recognize.
  • Description — Use a short explanation, such as “Pay securely with Bachs.” Describe only the methods available to your customers.
  • Checkout type — Choose Redirect or Popup.
  • Test mode — Keep it enabled during sandbox testing.
Bachs settings in WooCommerce showing the enable checkbox, payment title, description, and checkout type

Redirect or Popup

Redirect takes the customer to the Bachs hosted checkout. Popup opens the Bachs checkout in a modal on your website. Choose the experience that suits your store, then test it on desktop and mobile.

Either way, Bachs handles the payment interface. The WooCommerce payment option leads into that experience; enabling the plugin does not mean every individual payment method appears as a separate option on your WordPress checkout.

Customers may be offered cards, bank transfer, mobile money, or crypto depending on the account’s enabled capabilities and the checkout currency. For example, NGN supports card and bank-transfer collection, while supported local mobile-money currencies use their corresponding payment methods. See supported payment methods (opens in a new tab) before promising a particular method to customers.

Step 4: Set up payment notifications

A webhook is a message Bachs sends directly to your website when a payment changes status. It lets WooCommerce receive payment confirmation even if the customer closes their browser or does not return to your store.

The official plugin provides a Webhook URL in its settings. Copy that exact address. On a typical installation it looks like:

https://yourstore.com/wc-api/bachs/

Use your own website’s generated URL, including its correct domain and any WordPress installation path.

  1. In the Bachs dashboard, stay in the same environment as the plugin.
  2. Open Developer Portal → Webhooks.
  3. Click Add endpoint or the destination-creation control shown in your dashboard.
  4. Paste the Webhook URL from WooCommerce.
  5. Give the endpoint a name such as WooCommerce sandbox.
  6. For a store receiving payments into its own Bachs account, choose Account events.
  7. Select the six events listed below and save the endpoint.
  • collection.succeeded — A successful collection.
  • collection.failed — A failed collection.
  • collection.underpaid — A payment below the expected amount.
  • checkout.expired — An expired checkout session.
  • refund.paid — A successful refund outcome.
  • refund.failed — A failed refund outcome.
Bachs webhook destination editor showing a WooCommerce endpoint URL and Account events selected

Open the saved endpoint, copy its signing secret, and paste it into Sandbox Webhook Signing Secret in WooCommerce. Save the plugin settings. For live mode, the corresponding field is Live Webhook Signing Secret.

The API key creates and checks payment requests; the signing secret lets the plugin verify incoming notifications. Keep both private. Bachs requires a publicly reachable HTTPS endpoint for delivery. Refer to the webhook setup guide (opens in a new tab) for endpoint management and delivery behavior.

Step 5: Test your WordPress payment integration

Test the complete purchase flow before accepting real orders. Use your staging store with test mode enabled and the sandbox key and webhook secret saved.

  1. Add a product to your cart and open checkout.
  2. Confirm that Bachs appears as a payment option.
  3. Enter test customer details and place the sandbox order.
  4. Complete payment in the Bachs sandbox checkout using its test controls.
  5. Open the order in WooCommerce → Orders and review its payment information and order notes.
  6. Check the matching sandbox payment and webhook delivery in Bachs.

Also test a failed payment and, where the sandbox controls support it, an underpayment. These tests show whether the store handles unsuccessful outcomes clearly. Bachs provides a separate sandbox with simulated money and its own keys, payments, and webhook endpoints. Use the current sandbox testing instructions (opens in a new tab) for available test scenarios.

Bachs selected as a payment option in a WooCommerce test-store checkout

Check payment confirmation, not just the return page. A customer reaching your thank-you page is only one part of the test. Review the order record and the corresponding Bachs event before treating the integration as ready.

Check order emails separately as well. A missing email does not, by itself, prove that the payment failed. If the order has updated correctly, inspect WooCommerce’s email settings and your website’s email delivery setup.

Step 6: Switch to live payments

Once your sandbox checks pass and your Bachs account can receive live payments, configure the production store:

  1. Switch the Bachs dashboard to your live business account.
  2. Create or retrieve your securely stored live API key.
  3. Create a live webhook endpoint using the production store’s Webhook URL and the six events above.
  4. In WooCommerce, turn off Enable test (sandbox) mode.
  5. Enter the Live API Key and that endpoint’s Live Webhook Signing Secret.
  6. Confirm Enable Bachs is selected, then save.
WooCommerce Bachs live configuration with masked API key and signing secret, plus the generated webhook URL

Run a small, deliberate live purchase using an amount supported by your chosen payment method. This is a real transaction. Verify it in Bachs and WooCommerce, and check that the customer experience and order notification are correct. Repeat the checkout check on a phone.

Keep the difference between pricing and settlement in mind. The currency displayed in WooCommerce is not necessarily the currency held in your Bachs balance. Review your account’s balance settings and supported currencies (opens in a new tab) before launch.

Troubleshoot common Bachs integration issues

Bachs does not appear at checkout

Check that WooCommerce and the official Bachs plugin are active, the gateway is enabled, and a key is saved for the selected mode. Confirm that your store currency is supported. Then open a fresh checkout with a payable product in the cart. If you use caching, clear the relevant caches after saving your changes.

Checkout returns an authentication or permission error

First check the environment: sandbox mode needs a sandbox key, and live mode needs a live key. Next, review the key’s permissions and whether it was revoked or rotated. If the error concerns account activation or unavailable payment methods, check the account’s tasks and capabilities in Bachs.

The customer paid but the order is still waiting

Compare the order’s payment reference with the payment in Bachs. Open the webhook endpoint and inspect delivery attempts. Check the destination URL, selected events, enabled state, and signing secret. A firewall, access challenge, invalid certificate, or unreachable website can prevent delivery.

Review the WooCommerce order notes before changing its status. Some orders are held because confirmation has not arrived; others need a payment discrepancy reviewed. Fix the underlying issue instead of treating every held order as successfully paid.

The popup does not open

Test Redirect checkout to narrow down the problem. On a staging copy, check whether a script optimization, consent tool, or security setting is interfering with the popup. Re-test after any change, including on mobile.

You need more detail about an error

Enable the plugin’s debug logging temporarily, reproduce the issue, and inspect WooCommerce → Status → Logs. Share the relevant error with support after removing customer details and credentials. Turn off additional logging when you finish troubleshooting.

Moving from another Bachs plugin

If your store already has a Bachs integration, check the exact plugin name before replacing it. Similar names do not guarantee shared settings, webhook addresses, or support for historical orders.

Back up the website, record the current configuration, and review any pending payments or refunds. Transfer compatible settings to the official plugin, copy its generated Webhook URL into the correct Bachs endpoint, and verify the signing secret. Complete the checkout and notification checks before deleting the previous plugin. Plan how any outstanding transactions from the previous integration will be handled.

Frequently asked questions

Do I need WooCommerce to use this plugin

Yes. Bachs Payment Gateway for WooCommerce adds Bachs to WooCommerce’s payment flow. A WordPress website without WooCommerce needs WooCommerce configured first to follow this guide.

Does it work with the WooCommerce Checkout block

The official plugin supports classic checkout and WooCommerce Blocks. Test your store’s actual checkout, especially if a theme or extension customizes it.

Can I accept recurring subscriptions

The official WordPress plugin version reviewed for this guide covers one-time payments and refunds. Do not assume that Bachs platform subscription features are available through this plugin. Check the plugin’s current release notes for changes.

Can I refund a Bachs payment from WooCommerce

The plugin includes a refund integration, but eligibility depends on the payment. Bachs currently does not support refunds for NGN bank-transfer payments. For eligible payments, a successful partial refund also uses the payment’s one-refund allowance. Review the refund guide (opens in a new tab) before choosing an amount.

If the plugin blocks a partial refund because the order currency and settlement currency differ, review the refund in Bachs instead. Do not enter the WooCommerce amount into a different currency without checking the conversion.

Will every customer see every payment method

No. The available options depend on the account’s enabled methods and the specific checkout. Check the methods offered for the currencies and markets you serve.

Start accepting payments with Bachs

Install the official Bachs WooCommerce plugin (opens in a new tab), connect your sandbox credentials, and complete a test order with a verified payment notification. When those checks pass and your account is ready, switch to your live credentials.

Open your Bachs dashboard to get started. (opens in a new tab)

Your global billing infrastructure is ready.

Built for founders shipping SaaS and digital products to the world. Accept payments, automate billing, and go global — in minutes.

Start Building

No credit card required. Set up in minutes.