Balance Endpoints

Available Balance

API

Fetch balance of the merchant related to the service user

HTTP Method

GET

Headers

Endpoint

/api/v1/balance/

Request Body

None

Response Sample

{
  "amount_available": 1292.25,
  "available_commission": 12.90,
  "last_commission_withdrawal": "2023-03-16T11:47:24.927Z",
  "merchant_id": 123,
}

Response Description

Field Type Description
amount_available Float Merchant available balance
available_commission Float Available commission to withdraw
last_commission_withdrawal Datetime Last withdrawn commission
merchant_id Integer Merchant id

Balance Transaction History

API

List all balance transactions

HTTP Method

GET

Headers

Endpoint

/api/v1/balance_transactions/

Request Body

None

Response Sample

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "date_created": "2023-03-16T15:11:47.016912Z",
      "initiator": "accept",
      "recipient": "bills",
      "amount": 10.0,
      "transaction_ref": "6269928401296462697948221",
      "transaction_type": "card",
      "status": "SUCCESS"
    }
  ]
}

Response Description

Field Type Description
count Integer Total number of balance transactions existing
next String URL for the next page
previous String URL for the previous page
results List List of balance transactions

Balance Transaction

Field Type Description
initiator String Source of the balance transaction
recipient String Recipient of the balance transaction amount
amount Float Transaction amount
transaction_ref String Unique reference for transaction
transaction_type String Options are:
- card: Card payment using Accept
- accept_balance: Balance moved from Accept Balance to Bills
- commission_withdrawal: Withdrawal of merchant billing commission
status String Transaction status

Filters

The below filters can be added as query params:

  • page: Page number in paginated response
  • size: Size per page. Default size=50 . Maximum size=50
  • status: Filter with balance transaction status
  • initiator: Filter with balance transaction initiator
  • recipient: Filter with balance transaction recipient
  • transaction_type: Filter with balance transaction type
  • transaction_ref: Filter with balance transaction reference
  • date_from*: Filter balance transactions with date greater than or equal this value
  • date_to*: Filter balance transactions with date less than or equal this value.

* Note that date format in filters is YYYY-MM-DD and are in Africa/Cairo timezone