Skip to content
Use cases

How do I accept Wave and Orange Money on WooCommerce?

No 221 Pay WooCommerce plugin is published: integrate the API from the WordPress server or sell with payment links. Steps and limits.

No 221 Pay WooCommerce plugin is described in this documentation: two routes exist, payment links (no code) and the API called by the store's server (PHP code to write). The API fits a cart of variable amount; links fit a fixed price.

Route 1: the API, for a variable cart

Create a test key

Dashboard, Developers > API keys, payments scope. The key stays in the WordPress server's configuration, never in the theme or in a page. See Authentication.

Create the payment when the order is placed

The server sends POST /v1/payments with the order total in amount, the order number in merchant_reference and the return page address in return_url. The PHP example (curl extension) is in How do I accept a first payment through the API?.

Redirect the customer

Redirect to checkout_url. The customer pays with Wave or Orange Money, then returns to return_url.

Mark the order paid by webhook

Add the URL of a store endpoint in Developers > Webhooks. On payment.succeeded, verify the signature on the raw body, read the payment again, then set the order to "paid". Do not rely on the return page alone: the customer may close it. PHP verification example: Webhooks.

A payment link is a page hosted by 221 Pay, with a fixed amount. Create one link per product or invoice, then put it behind a button or send it to the customer. Matching with WooCommerce orders stays manual: each payment carries payment_link_description, the link's description. See Payment links.

Check before production

Last updated on