ChapaChapa Docs

All Transactions

View all your transactions using the Chapa API

This endpoint allows you to view all the transactions.

How to View All Transactions

Endpoint: https://api.chapa.co/v1/transactions
Method: GET
Authorization: Pass your secret key as a bearer token in the request header to authorize this call.

cURL
JavaScript
PHP
Python

Successful Response

The API returns a paginated list of all transactions with details including transaction references, amounts, status, payment methods, and timestamps.

{
  "message": "Transactions retrieved successfully",
  "status": "success",
  "data": {
    "transactions": [
      {
        "status": "pending",
        "ref_id": "VcEu3Hf55JU",
        "type": "Payment Link",
        "created_at": "2024-07-27T02:22:46.000000Z",
        "currency": "ETB",
        "amount": "12.000",
        "charge": "0.000",
        "trans_id": null,
        "payment_method": "card",
        "customer": {
          "id": 1301688,
          "email": null,
          "first_name": null,
          "last_name": null,
          "mobile": null
        }
      }
    ],
    "pagination": {
      "per_page": 10,
      "current_page": 1,
      "first_page_url": "https://api.chapa.co/v1/transactions?page=1",
      "next_page_url": "https://api.chapa.co/v1/transactions?page=2",
      "prev_page_url": null
    }
  }
}

Response Parameters

ParameterTypeDescription
messagestringResponse message
statusstringStatus of the request (success/failed)
data.transactionsarrayArray of transaction objects
statusstringTransaction status (pending, success, failed)
ref_idstringChapa reference ID for the transaction
typestringType of transaction (Payment Link, API, etc.)
created_atstringTimestamp when transaction was created
currencystringCurrency code (ETB, USD)
amountstringTransaction amount
chargestringTransaction fee
trans_idstring|nullTransaction ID (if available)
payment_methodstringPayment method used (card, telebirr, etc.)
customerobjectCustomer information object
customer.idnumberCustomer ID
customer.emailstring|nullCustomer email address
customer.first_namestring|nullCustomer first name
customer.last_namestring|nullCustomer last name
customer.mobilestring|nullCustomer mobile number
paginationobjectPagination information
pagination.per_pagenumberNumber of items per page
pagination.current_pagenumberCurrent page number
pagination.first_page_urlstringURL to first page
pagination.next_page_urlstring|nullURL to next page (if available)
pagination.prev_page_urlstring|nullURL to previous page (if available)

Failed Response

{
  "message": "Invalid API Key or the business can't accept payments at the moment. Please verify your API key and ensure the account is active and able to process payments.",
  "status": "failed",
  "data": null
}

Refer to Error Codes for all possible responses.

Pagination

The response includes pagination information to help you navigate through multiple pages of transactions. Use the next_page_url and prev_page_url fields to fetch additional pages.

Next Steps

On this page