No-code

WordPress / WooCommerce

A WooCommerce plugin for taking payments at checkout. Coming soon.

Coming soon

The plugin is not published yet. Until it is, use payment links, or call the REST API from your own code.

What it will do

  • Add InversePay as a payment method at WooCommerce checkout.
  • Keep your test and live keys in the plugin's settings.
  • Mark orders paid from our webhooks.

Until then

With no code, send a payment link for the order.

From your own plugin or theme, call the API on the server with wp_remote_post. This creates a test charge of 5,000 RWF from an MTN wallet:

$response = wp_remote_post('https://api.inversepay.app/api/b/v1/charges', [
    'headers' => [
        // Defined in wp-config.php, never in the plugin or the database.
        'Authorization' => 'Bearer ' . INVERSEPAY_TEST_KEY,
        'Content-Type'  => 'application/json',
    ],
    'body' => wp_json_encode([
        'idempotency_key' => 'order-1001',
        'amount_minor'    => 500000,
        'currency'        => 'RWF',
        'payer'           => ['phone_number' => '250788123456', 'network' => 'MTN', 'country_code' => 'RW'],
    ]),
]);
$charge = json_decode(wp_remote_retrieve_body($response), true);

The Quickstart covers the response and what happens next.

Want it sooner?

Tell us at developers@inversepay.app.

On this page