AFRISWITCH

API Reference — Transactions & Wallets

Institutional base URL:

https://api.afriswitch.net/api/v1/

1. PAYIN — Deposit

POST /transactions/payin/

Request example

{
  "amount": 1000,
  "currency": "GNF",
  "operator": "mtn",
  "country": "GN",
  "phone_number": "224XXXXXX448",
  "opaque_id": "test_payin_001"
}

Response example (masked)

{
  "reference": "DP-AFS-GN-XXXX-2026XXXX-0004",
  "opaque_id": "asw_trx_xxxxxxxxxxxx",
  "transaction_type": "deposit",
  "type": "fiat",
  "status": "pending",
  "amount": "1000.00",
  "currency": "GNF",
  "operator_name": "MTN Guinea",
  "created_at": "2026-00-00T12:12:19Z",
  "processed_at": null,
  "payment_url": null,
  "qr_code": null
}

Note: The flow may be payment_url, OTP or USSD depending on the operator.

2. PAYOUT — Withdrawal

POST /transactions/payout/

Request example

{
  "amount": 200,
  "currency": "XOF",
  "operator": "orange-senegal",
  "country": "SN",
  "destination": "+221XXXX2235",
  "metadata": { "note": "Institutional payout test" }
}

Response example (masked)

{
  "reference": "TX-2026XXXX-XXXXXX",
  "opaque_id": "asw_trx_xxxxxxxxxxxx",
  "transaction_type": "withdrawal",
  "type": "fiat",
  "status": "success",
  "amount": "200.00",
  "currency": "XOF",
  "operator_name": "Orange Senegal",
  "created_at": "2026-00-00T12:32:10Z",
  "processed_at": "2026-00-00T12:32:13Z"
}

3. DETAIL — Transaction Detail

GET /transactions/detail/<reference>/

{
  "reference": "TX-2026XXXX-XXXXXX",
  "transaction_type": "withdrawal",
  "status": "success",
  "amount": "100.00",
  "currency": "XOF",
  "history": [
    {
      "status": "success",
      "source": "operator",
      "timestamp": "2026-00-00T12:32:13Z"
    }
  ]
}

4. HISTORY — Transaction History

GET /transactions/history/<reference>/

{
  "reference": "TX-2026XXXX-XXXXXX",
  "transaction_type": "withdrawal",
  "status": "success",
  "amount": "100.00",
  "currency": "XOF",
  "history": [
    {
      "status": "success",
      "source": "operator",
      "timestamp": "2026-00-00T12:32:13Z"
    }
  ]
}

5. STATUS — Transaction Status

GET /transactions/status/<reference>/

{
  "reference": "TX-2026XXXX-XXXXXX",
  "status": "success",
  "amount": "100.00",
  "currency": "XOF",
  "transaction_type": "withdrawal",
  "created_at": "2026-00-00T12:32:10Z",
  "processed_at": "2026-00-00T12:32:13Z"
}

6. WALLET — Balance

GET /wallets/fiat/<currency>/

{
  "wallet_reference": "WF-XXXXXXXXXXXX",
  "balance": "4797.00",
  "currency_code": "XOF",
  "updated_at": "2026-00-00T21:45:42Z"
}

7. WALLET — Movements

GET /wallets/fiat/<currency>/movements/

[
  {
    "movement_type": "withdrawal",
    "amount": "507.50",
    "fee_amount": "7.50",
    "currency_code": "XOF",
    "created_at": "2026-00-00T21:37:26Z"
  }
]