Recrio – Gambia Checkout for Wave

Description

Recrio – Gambia Checkout for Wave lets WooCommerce stores accept payments with Wave, the mobile money service used across The Gambia. It connects directly to your own Wave Business account through the Wave Checkout API: there is no intermediary, and payments go straight to your Wave Business wallet.

It is built for stores that sell in Gambian Dalasi (GMD), and for stores that sell in another currency (for example shops in Europe serving the Gambian community) together with a multi-currency plugin that lets customers pay in GMD.

How it works

  1. At checkout the customer chooses Wave.
  2. The customer is sent to Wave to confirm the payment: a QR code on a computer, the Wave app on a phone.
  3. Wave notifies your store through a signed webhook and the order is marked as paid. When the customer comes back to your store, the payment is also checked directly with Wave.

Features

  • Wave Checkout API with your own Wave Business account in The Gambia.
  • Signed API requests (HMAC-SHA256), and signed webhooks with replay protection.
  • The redirect back from Wave is never trusted as proof of payment: the checkout session is read again from Wave.
  • Amount, currency, payment reference and session are matched to the order before it is marked as paid.
  • Wave accepts whole Dalasi only: totals are rounded to the nearest Dalasi and the rounding is recorded on the order.
  • Works with multi-currency plugins, both those that save orders in GMD and those that convert order totals when they are displayed.
  • Classic checkout and Checkout block. Compatible with High-Performance Order Storage (HPOS).
  • API key and secrets encrypted in the database, never sent to the browser.

Requirements

  • A Wave Business account in The Gambia, with an API key that has access to the Checkout API and request signing enabled.
  • A site served over HTTPS.
  • Orders paid in GMD: either your store currency is GMD, or a multi-currency plugin lets customers pay in GMD at checkout. In any other currency Wave is shown as an invitation to switch to GMD.

This plugin is developed by Recrio Studio. It is not affiliated with, or endorsed by, Wave.

External services

This plugin connects to the Wave Checkout API (https://api.wave.com), provided by Wave. In The Gambia the service is operated by Wave Transfer Limited.

  • When a customer places an order with Wave, the plugin creates a checkout session. It sends the amount in GMD, the currency code, a payment reference made of the site ID, the order ID and a random identifier, and the two addresses of your store to which Wave sends the customer back.
  • When the customer comes back from Wave, or pays again an order that already has a session, the plugin reads that checkout session from Wave.
  • When an administrator clicks “Test Wave connection”, the plugin sends a search request with a random reference.

Every request carries your API key and a signature of the request. No customer name, email address, phone number or postal address is sent by this plugin. Wave also sends payment notifications (webhooks) to your site’s REST API.

Wave terms: https://www.wave.com/en/terms_gm/
Wave privacy notice: https://www.wave.com/en/privacy/
Wave API documentation: https://docs.wave.com/

Privacy

The plugin stores:

  • the API key and the two signing secrets, encrypted, in the WordPress options table;
  • the gateway settings;
  • on each order paid with Wave: the Wave session ID, the payment reference, the requested amount, the transaction ID, the IDs of processed webhook events, the last payment error and order notes.

Errors are written to the WooCommerce log (source: recrio-gambia-checkout-for-wave) without credentials. Debug logging is off by default.

Deleting the plugin removes the credentials and the settings only if “Delete data on uninstall” is enabled in the settings. Payment details saved on orders are always kept for your records.

Screenshots

Installation

  1. Install and activate the plugin. WooCommerce must be active.
  2. Open WooCommerce > Settings > Payments > Wave Gambia. The settings screen repeats the steps below.
  3. In the developer section of your Wave Business Portal, create an API key. Tick only “Checkout API” (Balance API and Payout API are not needed) and tick “Enable request signing”. Wave shows the key and its signing secret only once: enter both in the plugin settings.
  4. In Wave, create a webhook. Webhook URL: the address shown in the plugin settings (there is a Copy button). Security strategy: SIGNING_SECRET. Event types: only checkout.session.completed and checkout.session.payment_failed. Enter the webhook signing secret in the plugin settings.
  5. Optional: the Wave IP allowlist. As soon as you add an address, Wave refuses requests from every other address, and the allowlist cannot be switched off again from the portal. If you use it, add the public IP address your web server uses for outgoing requests.
  6. Save, click “Test Wave connection”, then enable the payment method. If Wave refuses the request, the test explains why; when the cause is the IP allowlist, it shows the address to add.

FAQ

Which countries and currencies are supported?

The Gambia and Gambian Dalasi (GMD).

My store is in euros. Can I use it?

Yes, with a multi-currency plugin that lets customers pay in GMD at checkout. Tested on both the classic checkout and the Checkout block, with the option that lets customers pay in the selected currency turned on:

  • WBW Currency Switcher 2.2.7 and 2.3.2 (“Change currency at checkout”);
  • FOX – Currency Switcher Professional 1.5.4 (“Is multiple allowed”);
  • CURCY – Multi Currency 2.2.17 (“Pay in currency”);
  • YayCurrency 3.3.5 (checkout in a different currency);
  • Price Based on Country 4.3.4: classic checkout only. With the Checkout block the order stayed in the store currency in our tests, so Wave refuses the payment.

When a multi-currency plugin is set to always charge the store’s default currency, Wave invites the customer to switch to GMD but cannot accept the payment.

Why is the amount rounded?

Wave accepts GMD payments in whole Dalasi only. The Wave total is rounded to the nearest Dalasi. When the order is saved in GMD, a “Wave rounding adjustment” line and an order note record the difference; when a multi-currency plugin converts the order, an order note records the amount requested from Wave.

I use the same Wave wallet somewhere else too. Is that a problem?

No. Wave sends the webhook events of the whole wallet: events for checkout sessions this site did not create are acknowledged and ignored.

Can I refund from WooCommerce?

No. Make refunds from your Wave Business account, then record them in WooCommerce.

Does it work with the Checkout block?

Yes, and with the classic checkout.

Does it support multisite?

Multisite networks have not been tested. Each site needs its own Wave configuration.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Recrio – Gambia Checkout for Wave” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.4

  • The plugin is now called “Recrio – Gambia Checkout for Wave” and its folder is recrio-gambia-checkout-for-wave. Settings, credentials, the webhook URL and the payment method are unchanged.
  • Admin notices are shown only where they are needed: the missing WooCommerce notice on the Plugins screen, the connection test result on the plugin’s settings screen.
  • The order note written when a multi-currency plugin converts the order no longer shows the saved total with a currency code, which could be wrong: with WBW Currency Switcher 2.2.x an order of 10.00 EUR read “stored as 10.00 GMD”. Payments are not affected.
  • Italian translation: “dalasi” is now written in lowercase in the default payment method description too, as in the other texts.

1.0.3

  • The plugin is now called “Recrio – Wave Gambia Gateway”, the name used in the WordPress.org directory. Nothing else changes: same settings, same payment method.

1.0.2

  • Fix: on wide screens the setup guide pushed the settings fields far to the right. The guide is now shown above the fields, like WooCommerce section titles.

1.0.1

  • Setup guide in the settings: what to select when you create the API key and the webhook in the Wave Business Portal. The IP allowlist is described as optional, as Wave documents it.
  • Copy button for the webhook URL.
  • The connection test explains Wave’s error codes and, when Wave refuses the server’s IP address, shows the address to add.
  • Webhooks: events for checkout sessions this site did not create are acknowledged and ignored; payment_failed events are matched by session ID; a completed payment that does not match its order is acknowledged and recorded in an order note instead of being retried by Wave for days.
  • The installed version is recorded after an update.

1.0.0

  • Initial release.