Server SDKs

Python

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 Django, Flask, FastAPI or a plain script.
  • Check that a webhook came from us in one call, before you act on it.

Until then

Call the API directly with requests. This creates a test charge of 5,000 RWF from an MTN wallet, with your test key in INVERSEPAY_TEST_KEY:

import os
import requests

res = requests.post(
    "https://api.inversepay.app/api/b/v1/charges",
    headers={"Authorization": f"Bearer {os.environ['INVERSEPAY_TEST_KEY']}"},
    json={
        "idempotency_key": "order-1001",
        "amount_minor": 500000,
        "currency": "RWF",
        "payer": {"phone_number": "250788123456", "network": "MTN", "country_code": "RW"},
    },
)
charge = 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.

On this page