Transaction

This document covers how you can handle transactions.

After an authorization is approved, the status on the authorization will be closed and a transaction will be created. To develop a transaction after an authorization usually takes 24 hour depending on your company, however, it can take up to 30 days after authorization for hotels and airlines.

An example of transactions would be refunds. When creating a refund transaction, we will link it to the original authorization.

{
  "id": "ipi_1GTG10EEsyYlpYZ9VJn2xV3B",
  "object": "issuing.transaction",
  "amount": 100,
  "authorization": "iauth_1GBZQyEEsyYlpYZ9255L8GQC",
  "balance_transaction": null,
  "card": "ic_1GBZQJEEsyYlpYZ99v6rq38S",
  "cardholder": null,
  "created": 1585783834,
  "currency": "Birr",
  "livemode": false,
  "merchant_amount": 100,
  "merchant_currency": "Birr",
  "merchant_data": {
    "category": "taxicabs_limousines",
    "city": "Addis Ababa",
    "country": "ETH",
    "name": "Selam Abebe",
    "network_id": "1234567890",
    "postal_code": "94111"
  },
  "metadata": {},
  "type": "refund",
}

Transaction History

The use of Transaction Search API enables a list of transactions to be be presented on the Chapa account (e.g., charges, transfers, and so forth). The transactions are returned in a chronological order, with the most recent ones appearing first.

curl https://api.chapa.com/v1/balance_transactions \
  -u sk_test_51JFjDiAIHcrlaYw5omQM2aXC5ju72xg16u9HzYw7Gc20uatuepsQ7DvmSRKkWlPhuxRc8VDpB5DK31U1PnVPpmzW00cQdnkN6l: \
  -d limit=3 \
  -G
  • Sample Response
    {
    "object": "list",
    "url": "/v1/balance_transactions",
    "has_more": false,
    "data": [
      {
        "id": "txn_1JITYbAIHcrlaYw5NWrNHD6Q",
        "object": "balance_transaction",
        "amount": 100,
        "available_on": 1627543289,
        "created": 1627543289,
        "currency": "aed",
        "description": "My First Test Charge (created for API docs)",
        "exchange_rate": null,
        "fee": 0,
        "fee_details": [],
        "net": 100,
        "reporting_category": "charge",
        "source": "ch_1JGLQMAIHcrlaYw5ve5zTYeN",
        "status": "available",
        "type": "charge"
      },
      {...},
      {...}
    ]
    }
    

Authorization
Split Transfers
Next →