ChapaChapa Docs

Get Virtual Account Debit History

Retrieve a list of all debit (deduction) transactions performed on a virtual account.

The Get Virtual Account Debit History endpoint returns a list of all debit (deduction) transactions performed on a virtual account.

Use this endpoint to:

  • Show wallet spending history to users
  • Reconcile deductions against internal orders
  • Audit balance changes
  • Investigate disputes or support cases

Endpoint

GET /v2/virtual-accounts/{virtual_account_id}/debits
Host: api.chapa.co

Authentication

Headers

NameRequiredDescription
AuthorizationYesBearer <PRIVATE_API_KEY>
Content-TypeNoapplication/json

Path Parameter

ParameterRequiredDescription
virtual_account_idYesUnique virtual account identifier

Query Parameters (Optional)

ParameterTypeDescription
fromstringStart date (ISO8601) filter
tostringEnd date (ISO8601) filter
pageintegerPage number (default: 1)
per_pageintegerRecords per page (default: 20)
merchant_referencestringFilter by merchant reference

Example Request

GET https://api.chapa.co/v2/virtual-accounts/VA_ABC123456/debits?per_page=20&page=1
Authorization: Bearer CHAPA_TEST_xxxxxxxxxxxxx

Example Response

{
  "status": "success",
  "message": "Debit history retrieved successfully",
  "data": {
    "items": [
      {
        "debit_reference": "DEB_TRX_123456",
        "merchant_reference": "DEB_001",
        "amount": 3000,
        "currency": "ETB",
        "reason": "Payment for order ORD_99887",
        "meta": {
          "order_id": "ORD_99887",
          "customer_id": "CUST_12345"
        },
        "balance_before": 12500,
        "balance_after": 9500,
        "created_at": "2025-11-07T13:20:00Z"
      }
    ],
    "pagination": {
      "next_cursor": null,
      "prev_cursor": null,
      "limit": 20,
      "has_more": false
    }
  }
}

Response Fields

Debit History Item

FieldTypeDescription
debit_referencestringUnique debit transaction reference
merchant_referencestringMerchant-generated reference (if provided)
amountnumberAmount deducted
currencystringCurrency
reasonstringReason or description
metaobjectCustom metadata
balance_beforenumberBalance before debit
balance_afternumberBalance after debit
created_atstringTimestamp

Pagination

FieldTypeDescription
next_cursorstringCursor token for next page
prev_cursorstringCursor token for previous page
limitintegerNumber of items returned
has_morebooleanWhether more results exist

Best Practices

  • Filter by date range for better performance
  • Store debit_reference for reconciliation
  • Use meta.order_id to link to internal transactions
  • Provide export options (CSV) in dashboards if needed

Common Errors

HTTPError CodeDescription
404NOT_FOUNDVirtual account not found
500PROCESSING_FAILEDFailed to fetch debit history

Next Steps

On this page