WooCommerce
Accept Watenga payments on your WooCommerce store via the embedded checkout widget. Install from the merchant App marketplace or upload the plugin package.
Installation
- Download the plugin from downloads.watenga.africa/plugins/watenga-woocommerce.zip (or install via WordPress.org when published).
- In WordPress admin: Plugins → Add New → Upload Plugin → Activate.
- WooCommerce → Settings → Payments → Watenga → Enable.
- Enter your Client ID (publishable key) and Secret Key from the Developer Console → Apps & credentials → your API app.
- Set webhook URL to:
https://YOUR-DOMAIN/wc-api/watenga
Classic and block checkout
Watenga is listed in the Cart and Checkout blocks (plugin 2.1 and later) and in the classic checkout ([woocommerce_checkout]). Either way, placing the order takes the customer to the order pay page, where the Watenga widget charges that order's total. The order is marked paid only after your server re-reads the transaction with your secret key, and the signed webhook completes it even if the customer closes the browser first.
Test mode
Use pk_test_* / sk_test_* keys from a sandbox API app. The same API host is used for test and live; key prefix selects the mode.
| Card number | Brand | What happens |
|---|---|---|
4111 1111 1111 1111 | Visa | Approved: payment.capture.completed |
4000 0000 0000 0002 | Visa | Declined by the issuer (do not retry): payment.capture.declined |
4000 0000 0000 9995 | Visa | Declined, insufficient funds (the buyer may retry) |
4000 0000 0000 0119 | Visa | Provider timeout: stays pending, then fails |
Expiry: any future month, e.g. 12/34. CVC: any 3 digits. Any name and address. Test keys only: these numbers never reach a card network.
| Number | International | What happens |
|---|---|---|
0771111111 | +263771111111 | Approved at once: payment.capture.completed |
0772222222 | +263772222222 | Pending for about 30 seconds (onPending), then approved |
0773333333 | +263773333333 | The buyer refuses the prompt (onCancel): payment.capture.cancelled |
0774444444 | +263774444444 | Insufficient balance, fails at once: payment.capture.declined |
Any mobile wallet in test mode; no real phone is prompted.
Troubleshooting
| Error | Solution |
|---|---|
| Invalid API key | Confirm Client ID and Secret Key match your Sandbox/Live app |
| Webhook signature failed | Re-save webhook secret in plugin settings |
| Order stuck pending | Check WooCommerce → Status → Logs; verify webhook URL is reachable |
| PHONE_REQUIRED | Enable phone field at checkout for mobile money |