Plugins
WooCommerce is the platform plugin that exists today. It adds Capay Global as a payment method on the checkout page, creates the collection server-side and settles the order from the signed webhook.
Get your test keys
Create a free account, then open Developers > API keys in the dashboard. Sandbox keys start with sk_test_ and are shown once, so store the key the moment it appears. Sandbox keys never touch a real provider and never move real money.
Requirements
WordPress 6.4 or later, WooCommerce 8.0 or later, PHP 8.1 or later, and a shop served over https so the gateway can reach your webhook URL.
Install
- Get the plugin zip from Capay Global: until the public release, request it through Support in your dashboard.
- In WordPress admin open Plugins > Add New > Upload Plugin, choose the zip and activate it.
- Open WooCommerce > Settings > Payments and enable Capay Global.
- Fill in the settings below, save, and place a sandbox order before you switch to production keys.
Settings
Keys are stored server-side in the WordPress options table and never reach the browser. The plugin uses the key you fill in for the mode it is running in, and the environment follows the key prefix, not a separate switch.
| Setting | What it does |
|---|---|
| Sandbox secret key (sk_test_) | The sandbox key from Developers > API keys. Used while the plugin is in test mode; nothing real moves. |
| Production secret key (sk_live_) | The production key. The plugin refuses to take live orders until this is set. |
| Webhook secret (whsec_) | The whsec_ secret returned when you registered the endpoint. Without it the plugin rejects every delivery, which is the correct behaviour. |
| Enabled methods | Which payment methods appear at checkout (mobile money, bank). Restricted by what your corridors actually support. |
| Statement name | The name the payer sees on the payment prompt and on the receipt. |
Register the webhook
The plugin listens on one URL. Register it for the five event types the plugin acts on: anything else is ignored, so a narrower subscription keeps your delivery log readable.
https://<your-shop>/wc-api/capay_global_webhook
collection.completed collection.failed collection.expired collection.cancelled refund.completed
Register it in the dashboard under Developers > Webhooks: https://dashboard.capayglobal.com/developers/webhooks
Or register it from a terminal or a script:
curl -X POST https://api.capayglobal.com/v1/webhook_endpoints \
-H "Authorization: Bearer sk_test_XXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{
"url": "https://shop.example.com/wc-api/capay_global_webhook",
"event_types": ["collection.completed","collection.failed","collection.expired","collection.cancelled","refund.completed"],
"description": "WooCommerce"
}'Copy the whsec_ value from the response into the plugin's webhook secret field. It is shown once; if you lose it, rotate the secret in the dashboard and paste the new one.
Test in the sandbox
Place orders with a sandbox key and the magic phone numbers: +237650000001 completes, +237650000002 fails with insufficient funds, +237650000005 expires. Check that the order status in WooCommerce follows each outcome: Sandbox
Order status mapping
completed marks the order paid; failed, cancelled and expired mark it failed with the reason_code in the order note; refund.completed records the refund. Every other status leaves the order pending on purpose: an in-flight payment is not a failed payment, and the plugin never cancels an order on a status it does not recognise.