Transactions
List your transactions or look one up. Use this to confirm a callback before fulfilling an order.
Each transaction has: id, transaction_type (incoming or outgoing), product, amount, currency, status, reference_number, external_reference, checkout_request_id, merchant_request_id, mpesa_receipt_number, phone_number, service_fee, livemode, result_desc, channel (id, name, type), transaction_date, created_at.
Paginated, filtered list. Does not query M-Pesa.
Scope: account_api
Parameters
| Field | In | Type | Required | Description |
|---|---|---|---|---|
page |
query | integer | no |
Default 1.
Range 1 – … |
limit |
query | integer | no |
Default 20.
Range 1 – 100 |
status |
query | string | no |
Transaction status.
One of: pending, completed, failed, cancelled, reversed |
transaction_type |
query | string | no |
Direction of money.
One of: incoming, outgoing |
channel_id |
query | integer | no |
Your channel id.
Range 1 – … |
date_from |
query | date | no | YYYY-MM-DD. |
date_to |
query | date | no | YYYY-MM-DD. |
amount_min |
query | integer | no |
Whole KES.
Range 0 – … |
amount_max |
query | integer | no |
Whole KES.
Range 0 – … |
phone_number |
query | string | no | Any accepted phone format. |
order_by |
query | string | no |
Default created_at_desc.
One of: created_at_desc, created_at_asc, amount_desc, amount_asc |
Request
curl -X GET "https://swiftwallet.co.ke/v3/transactions?page=…" \ -H "Authorization: Bearer $SWIFTWALLET_API_KEY" \ -H "Accept: application/json"
Response fields
success transactions[] pagination.current_page pagination.total_pages pagination.total_records pagination.limit pagination.has_next pagination.has_prev filters_applied
Send exactly one of the three identifiers. A pending row is re-queried from M-Pesa at most once per cooldown.
Scope: account_api
Parameters
| Field | In | Type | Required | Description |
|---|---|---|---|---|
mpesa_receipt |
query | string | one of the three | M-Pesa receipt. |
checkout_request_id |
query | string | one of the three | From the STK response. |
external_reference |
query | string | one of the three | Your own id. |
Request
curl -X GET "https://swiftwallet.co.ke/v3/transactions?mpesa_receipt=…" \ -H "Authorization: Bearer $SWIFTWALLET_API_KEY" \ -H "Accept: application/json"
Response fields
success search_type search_value transaction