Skip to main content
GET
/
v1
/
transactions
List Transactions
curl --request GET \
  --url https://api.moflay.com/v1/transactions \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "trxn_ABC123DEF456GHI",
      "customerId": "cus_MNO345PQR678STU",
      "object": "transaction",
      "environment": "development",
      "type": "payment",
      "amount": 1000,
      "description": "Payment for Order #12345 - Premium Subscription",
      "currency": "KES",
      "status": "completed",
      "phoneNumber": "254712345678",
      "receiptNumber": "QMF7MBB5ED",
      "fee": 100,
      "netAmount": 900,
      "failureReason": null,
      "metadata": {},
      "source": "api",
      "processedAt": "2024-12-19T10:30:00.000Z",
      "createdAt": "2024-12-19T10:25:00.000Z",
      "paidAt": "2024-12-19T10:32:00.000Z",
      "failedAt": null
    }
  ],
  "meta": {
    "cursor": "eyJpZCI6IjEyMyJ9",
    "hasPreviousPage": false,
    "hasNextPage": true
  }
}

Authorizations

Authorization
string
header
required

The API key to use for authentication

Query Parameters

q
string | null

Search for transactions by description, phone number, or receipt number

Example:

"Premium Subscription"

cursor
string | null

Cursor for pagination, representing the last item from the previous page

Example:

"eyJpZCI6IjEyMyJ9"

customerId
string | null

Filter transactions by specific customer ID

Example:

"cus_MNO345PQR678STU"

statuses
enum<string>[] | null

Array of transaction statuses to filter by. Available statuses: 'pending', 'completed', 'failed', 'refunded'

Example:
["pending", "completed"]
amountRange
number[] | null

Amount range as [min, max] in cents to filter transactions by monetary value. Example: [10000, 50000] for KES 100.00 to KES 500.00

Example:
[10000, 50000]
amount
string[] | null

Array of specific amounts (as strings in KES) to filter transactions by exact values. Values are converted to cents internally.

Example:
["150.75", "299.99", "1000.00"]
limit
number
default:10

The number of transactions to return (1-100)

Required range: 1 <= x <= 100
Example:

10

start
string<date-time> | null

Start date (inclusive) for filtering transactions in ISO 8601 format

Example:

"2024-12-01T00:00:00.000Z"

end
string<date-time> | null

End date (inclusive) for filtering transactions in ISO 8601 format

Example:

"2024-12-31T23:59:59.999Z"

sortOrder
enum<string>
default:desc
Available options:
asc,
desc
Example:

"desc"

sortField
enum<string>
default:createdAt
Available options:
createdAt,
paidAt,
failedAt,
amount,
status,
phoneNumber,
processedAt
Example:

"createdAt"

Response

List of all transactions

data
object[]
required
meta
object
required
I