Transactions

Transaction List

Get paginated list of transactions belonging to the current user

HTTP Method

GET

Endpoint

/api/v1/transactions/

Request Body

None

Headers

Response Sample

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "rrn": "iZk6rvyvI4LPPYjxy4ERZBaQMQfHk2qxmeztg",
      "date_created": "2023-02-15T17:05:38.028586Z",
      "status": "SUCCESS",
      "amount": 103.21,
      "fees": 3.0,
      "merchant_commission": 1.06,
      "service": {
        "id": 743514,
        "name": "Bill payment",
        "payment_outputs": [
          {
            "description": "رقم التيليفون",
            "name": "phone_number",
            "data_type": "str",
            "is_hidden": false
          }
        ],
        "receipt_footer": "Use the code #123# to recharge"
      },
      "provider": {
        "id": 14,
        "name": "Etisalat"
      },
      "category": {
        "id": 4,
        "name": "Telecom and Internet",
        "image": "https://mydomain/image.png"
      }
    }
  ]
}

Response Description

Field Type Description
count Integer Total number of transactions existing
next String URL for the next page
previous String URL for the previous page
results List List of transactions

Transaction

Field Type Description
rrn String Transaction RRN
status String Transaction status. One of: SUCCESS - FAIL - PENDING - AMBIGUOUS
amount Float Transaction amount
fees Float Transaction fees
date_created Datetime Transaction timestamp
merchant_commission Float Merchant commission per transaction in EGP
category Object Details of the category (id, name, image)
provider Object Details of the provider (id, name)
service Object Details of the service (id, name,payment_outputs,receipt_footer)

Filters

The below filters can be added as query params:

  • page: Page number in paginated response
  • size: Size per page. Default size=50 . Maximum size=50
  • rrn: Filter with transaction RRN
  • status: Filter with transaction status
  • date_from*: Filter transactions with date greater than or equal this value
  • date_to*: Filter transactions with date less than or equal this value.
  • provider_id: Filter transactions by provider id
  • provider__name: Filter transactions by provider name (English)
  • category_id: Filter transactions by category id
  • category__name: Filter transactions by category name (English)

* Note that date format in filters is YYYY-MM-DD and are in Africa/Cairo timezone

Transaction Status

Check status for a transaction

HTTP Method

GET

Endpoint

/api/v1/transactions/<rrn>/status/

Headers

Request Body

None

Response Sample

{
  "code": "0001",
  "request_id": "d39bedf9-55dc-4481-a513-80f0f1964d83",
  "rrn": "RRN",
  "date_created": "2022-10-05T11:23:42.388975+02:00",
  "status": "SUCCESS",
  "amount": 204.27,
  "fees": 40.85,
  "merchant_commission": 2.4,
  "data": {
    "phone_number": "01234567890",
    "voucher_code": "ABCDEFGHIJK"
  }
}

Response Description

Field Type Description
code String API Response code indicating the status of the request. List of codes defined here
rrn String Transaction RRN
status String Transaction status. One of: SUCCESS - FAIL - PENDING - AMBIGUOUS
request_id String Unique request id that can be used afterwards for logging/debugging
amount Float Transaction amount
fees Float Transaction fees
date_created Datetime Transaction timestamp
merchant_commission Float Merchant commission per transaction in EGP
data Object Payment outputs, the data that should be displayed in the receipt, can be null or empty object