ChapaChapa Docs

Get Virtual Account Credit History

Retrieve a list of all credit (deposit) transactions performed on a virtual account.

The Credit History endpoint returns a list of all credit (deposit) transactions performed on a virtual account.

Use this endpoint to:

  • Show wallet top-up history to users
  • Reconcile deposits with your internal funding records
  • Audit balance changes and trace funding sources
  • Investigate customer support issues

Endpoint

GET /v2/virtual-accounts/{virtual_account_id}/credits
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/credits?per_page=20&page=1
Authorization: Bearer CHAPA_TEST_xxxxxxxxxxxxx

Example Response

{
  "status": "success",
  "message": "Credit history retrieved successfully",
  "data": {
    "items": [
      {
        "deposit_reference": "DEP_TRX_987654",
        "merchant_reference": "DEP_001",
        "amount": 5000,
        "currency": "ETB",
        "reason": "Wallet top-up",
        "meta": {
          "order_id": "ORD_99887",
          "customer_id": "CUST_12345"
        },
        "balance_before": 7500,
        "balance_after": 12500,
        "created_at": "2025-11-07T13:10:00Z"
      }
    ],
    "pagination": {
      "next_cursor": null,
      "prev_cursor": null,
      "limit": 20,
      "has_more": false
    }
  }
}

Response Fields

Credit History Item

FieldTypeDescription
deposit_referencestringUnique deposit transaction reference
merchant_referencestringMerchant-generated reference (if provided)
amountnumberAmount credited
currencystringCurrency
reasonstringReason or description
metaobjectCustom metadata
balance_beforenumberBalance before credit
balance_afternumberBalance after credit
created_atstringTimestamp

Pagination

FieldTypeDescription
next_cursorstringCursor token for next page
prev_cursorstringCursor token for previous page
limitintegerItems returned
has_morebooleanWhether more results exist

Best Practices

  • Filter by date range for faster results
  • Use merchant_reference and Idempotency-Key when depositing to prevent duplicates
  • Store deposit_reference for reconciliation
  • Use meta to connect deposits to your internal objects (order_id, customer_id, etc.)

Common Errors

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

Next Steps

On this page