Quickstart

Create a charge against Airtel Money or TNM Mpamba in three steps. Use sandbox keys until go-live.

Create a charge
curl -X POST https://api.lunafinance.mw/v1/charges \
  -H "Authorization: Bearer sk_test_…" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 25000,
    "currency": "MWK",
    "method": "airtel_money",
    "customer": {
      "phone": "+265991234567"
    },
    "metadata": {
      "order_id": "ord_9f2a"
    }
  }'

Charges

Supported methods and currencies.

Payment methods

  • airtel_money — Airtel Money
  • tnm_mpamba — TNM Mpamba
  • bank_transfer — NatSwitch EFT
  • card — Visa / Mastercard

Currencies

  • MWK — Malawian Kwacha (primary)
  • USD — US Dollar
  • EUR — Euro
  • GBP / ZAR

Webhooks

HMAC-SHA256 signed events with rotating secrets. Always verify the signature.

Webhook payload (charge.succeeded)
{
  "id": "evt_3k9m2",
  "type": "charge.succeeded",
  "created": 1748000000,
  "data": {
    "object": {
      "id": "ch_8x2p1",
      "amount": 25000,
      "currency": "MWK",
      "method": "airtel_money",
      "status": "succeeded"
    }
  }
}

Sandbox

Full parity with production. Simulate success, failure, timeout and dispute states without moving real money.

Test phones

Use dedicated numbers that auto-succeed or fail so you can cover happy and edge paths.

Idempotency

Replay the same Idempotency-Key and receive the original response — never double-charge.

Webhook testing

Point a tunnel or use our dashboard to inspect signed events in real time.

SDKs & libraries

Official and community libraries (early access).

Node.js

npm i @lunafinance/node

Python

pip install lunafinance

PHP

composer require lunafinance/lunafinance

Need a sandbox key?

Request early access and we will issue test credentials and invite you to the private docs portal.

Request access →