Server SDKs
Node.js
A server SDK for charges, payouts and webhook verification. Coming soon.
Coming soon
This library is not published yet. The REST API it will wrap works today; the example below calls it directly.
What it will do
- Create and fetch charges and payouts from your Node server, with typed requests and responses.
- Check that a webhook came from us in one call, before you act on it.
- Install with
npm install @inversepay/node(not yet published).
Until then
Call the API directly with fetch (Node 18 or later). This creates a test charge of 5,000 RWF from an MTN
wallet, with your test key in INVERSEPAY_TEST_KEY:
const res = await fetch('https://api.inversepay.app/api/b/v1/charges', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.INVERSEPAY_TEST_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
idempotency_key: 'order-1001',
amount_minor: 500000,
currency: 'RWF',
payer: { phone_number: '250788123456', network: 'MTN', country_code: 'RW' },
}),
});
const charge = await res.json();The Quickstart covers the response and what happens next, and the API reference lists every field.
Want it sooner?
Tell us at developers@inversepay.app.