Get Virtual Account Debit History
This endpoint allows you to retrieve all debit transactions for a specific virtual account. The response is paginated, providing up to 25 transactions per page.
Endpoint
URL: https://api.chapa.co/v1/virtual-account/history/debit/{account_number}
Method: GET
Authentication
Authorization
: Pass your secret key as a bearer token in the request headerContent-Type
: application/json
Path Parameters
Parameter | Type | Description |
---|---|---|
account_number | string | The virtual account number to fetch history for |
Response
A successful request returns a list of debit transactions with pagination details.
Response Parameters
Parameter | Type | Description |
---|---|---|
status | string | Status of the request (“success” or “failed”) |
message | string | A message describing the result |
data | object | Contains pagination details and transactions information |
Pagination Parameters
Parameter | Type | Description |
---|---|---|
current_page | number | The current page number |
first_page_url | string | URL to the first page of results |
from | number | Starting index of records on current page |
next_page_url | string | URL to the next page (null if on last page) |
path | string | Base path for pagination URLs |
per_page | number | Number of records per page (default: 25) |
prev_page_url | string | URL to the previous page (null if on first page) |
transactions | array | List of transaction objects |
Transaction Object Properties
Property | Type | Description |
---|---|---|
chapa_reference | string | Chapa’s reference for the transaction (can be null) |
Merchant Reference | string | Your reference for the transaction |
type | string | Type of transaction (e.g., “credit”, “debit”) |
note | string | Transaction note or description (can be null) |
amount | number | Transaction amount |
currency | string | Transaction currency (e.g., “ETB”) |
created_at | string | Timestamp of transaction creation |
updated_at | string | Timestamp of last transaction update |
Example Request
import requestsurl = "https://api.chapa.co/v1/virtual-account/history/debit/100700352"headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer CHASECK-xxxxxxxxxxxxxxxx'}response = requests.get(url, headers=headers)print(response.text)