描述
Payment Gateway for Bachs for WooCommerce lets your store accept payments through Bachs, a payments platform for internet businesses across African markets.
📖 Documentation and setup guide: ibrahim.ng/payment-gateway-for-bachs-for-woocommerce
Features
- Hosted checkout redirect or on-site popup — choose whether customers are redirected to the Bachs hosted checkout page or pay in a Bachs modal without leaving your store. No card data ever touches your server either way.
- Multiple payment methods — cards, bank transfer, mobile money, and crypto stablecoins (USDT, USDC), all handled on the Bachs checkout.
- Sell in USD or NGN, get paid across Africa — price your store in USD or NGN and, with Bachs Adaptive Pricing enabled, customers can pay in their own local currency (NGN, GHS, KES, UGX, TZS, XAF, XOF, ZMW, RWF and more). Bachs settles to you in USD or NGN.
- Webhook-verified fulfilment — orders complete on the
collection.succeededevent, with signature verification, not on the browser redirect. - Failed, expired and short payments — failed payments mark the order failed, short payments put it on hold for you to review, and customers whose checkout expired can pay again or cancel from the order payment page.
- Refunds — issue a refund straight from the WooCommerce order screen.
- Sandbox mode — build and test against the Bachs sandbox before going live.
- WooCommerce Blocks — works with both the classic and block-based checkout.
- HPOS compatible — supports WooCommerce High-Performance Order Storage.
Requirements
- WordPress 6.2 or higher
- WooCommerce 8.0 or higher
- PHP 7.4 or higher
- An SSL certificate (required for live payments)
- A Bachs account — sign up at bachs.io
External services
This plugin connects to the Bachs API to create checkout sessions, verify payments, and process refunds. It is required for the plugin to function.
When a customer pays with Bachs, the plugin sends the following to Bachs (https://api.bachs.io, or https://sandbox-api.bachs.io in test mode):
- Order reference and total amount
- Currency
- Customer billing details (name, email address, and phone number, when provided)
- A product record representing the order
The customer then pays on the Bachs hosted checkout (https://checkout.bachs.io) — either by redirect, or, when the Popup checkout type is selected, in a modal opened by the Bachs checkout script (https://checkout.bachs.io/bachs.js) loaded on the order-pay page. Card and payment details are handled entirely by Bachs; this plugin never stores or processes card numbers or other sensitive payment data. Bachs also sends signed webhook notifications back to your site to confirm payment and refund status.
For details on how Bachs handles data, see:
- Bachs website: https://bachs.io
- Bachs documentation: https://docs.bachs.io
- Bachs Privacy Policy: https://bachs.io/privacy
- Bachs Buyer Terms: https://bachs.io/buyer-terms
屏幕截图



安装
- Upload the plugin to
/wp-content/plugins/, or install it through Plugins Add New. - Activate the plugin.
- Go to WooCommerce Settings Payments Bachs.
- Enable the gateway and enter your Bachs API keys (sandbox and/or live).
- Copy the Webhook URL shown on the settings screen into your Bachs developer portal, subscribe to the listed events, and paste the webhook signing secret back into the plugin.
- Save. Use test mode with a sandbox key to run a test payment before going live.
常见问题
-
Which currencies are supported?
-
Set your WooCommerce store currency to USD or NGN — these are the currencies Bachs prices and settles in. Your customers are not limited to those, though: with Adaptive Pricing enabled in your Bachs dashboard, shoppers across Africa can pay in their own local currency (such as GHS, KES, UGX, TZS, XAF, XOF, ZMW and RWF), or with cards, bank transfer, mobile money, or crypto stablecoins (USDT, USDC), all on the Bachs checkout. Bachs converts and settles the funds to your balance in USD or NGN.
-
Do I need to configure webhooks?
-
Yes. Fulfilment relies on webhooks. Add the Webhook URL from the plugin settings to your Bachs developer portal, subscribe to
collection.succeeded,collection.failed,collection.underpaid,checkout.expired,refund.paidandrefund.failed, and paste the signing secret into the plugin. -
Redirect or popup?
-
Under Checkout type you can choose Redirect (the customer is sent to the Bachs hosted checkout page) or Popup (the Bachs checkout opens in a modal on your store, so the customer never leaves your site). Both use the same secure Bachs checkout and are confirmed by the same webhook.
-
Why did my order not complete after payment?
-
Orders complete when Bachs delivers the signed
collection.succeededwebhook. Confirm your webhook URL and signing secret are set correctly, and that your site is reachable from the internet. -
Can I refund a payment?
-
Yes, from the WooCommerce order screen. Note that Bachs allows a single refund per charge, so once a charge has been refunded (fully or partially) a further refund through Bachs is not possible.
-
Does it support subscriptions?
-
Not in this version. This release covers one-time payments and refunds.
评价
此插件暂无评价。
贡献者及开发者
更新日志
1.1.0
- Fix: customers can pay again for an unpaid order. A second payment attempt no longer fails with a “Duplicate reference” error, and an open Bachs checkout is reused.
- Fix: the order payment page now shows a “Cancel order & restore cart” link.
- Fix: the popup takes customers back to the order payment page to start again when their checkout expires, and shows an error if the checkout modal can’t open.
- Fix: the Bachs icon no longer shows at full size on the classic checkout, and now appears before the payment method title.
- Fix: refund order notes now show the Bachs refund ID.
- New: handles the
checkout.expiredevent, which replacescollection.abandoned(removed by Bachs). An expired checkout adds an order note and leaves the order pending so the customer can pay again. - New: short payments (
collection.underpaid) put the order on hold with the amount paid and outstanding. - New: failed refunds (
refund.failed) add an order note so you know the customer wasn’t refunded. - New: webhooks are verified with the
X-Bachs-Signature-V2header when present, so rotating the signing secret doesn’t interrupt deliveries. - New: checkout sessions are created with an idempotency key, and API errors in the log include the Bachs error code and request ID.
1.0.0
- Initial release: hosted-checkout one-time payments, refunds, failed/abandoned handling, WooCommerce Blocks support, and HPOS compatibility.
