Get All Transactions
Retrieve a list of all transactions in your account.
Endpoint
GET https://api.cashonrails.com/api/v1/
Headers
| Header | Type | Description |
|---|---|---|
| Authorization | string | Bearer token with your secret key |
| Content-Type | string | application/json |
Sample Request
Sample Response
{
"status": true,
"message": "Transactions retrieved",
"data": [
{
"id": 204404,
"domain": "live",
"status": "success",
"reference": "100004251010120646142810790227",
"amount": "1000",
"gateway_response": null,
"paid_at": "2025-10-10 13:07:03",
"created_at": "2025-10-10T12:07:03.000000Z",
"channel": "banktransfer",
"currency": "NGN",
"ip_address": "162.158.230.113"
}
],
"meta": {
"total": 1,
"current_page": 1,
"per_page": 50,
"last_page": 1,
"from": 1,
"to": 1
}
}Response Fields
## Query Parameters
| Parameter | Type | Description |
|-----------|---------|-------------|
| `page` | integer | Page number for pagination (default: 1) |
| `paginate` | integer | Number of transactions per page. Current validator accepts `1` to `100`. |
| `status` | string | Filter by transaction status (`success`, `pending`, `failed`, `abandoned`) |
| `from_date` | string | Start date for filtering (`YYYY-MM-DD`) |
| `to_date` | string | End date for filtering (`YYYY-MM-DD`) |
| `customer` | string | Filter by customer ID or email |
| `amount` | integer | Filter by transaction amount |
| `currency` | string | Filter by currency code (e.g., NGN, USD, GHS) |
| `search` | string | Search by supported transaction fields. Max 100 characters. |
| `timezone` | string | Timezone used when applying date filters. Max 64 characters. |
### Sample Response
## Sample Request
```http
GET https://api.cashonrails.com/api/v1?page=1&paginate=20&status=successcURL Request
curl -X GET "https://api.cashonrails.com/api/v1?page=1&paginate=20&status=success" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json"Query Parameters
## Response Fields
| Field | Type | Description |
|----------------|---------|--------------------------------------|
| `status` | boolean | Indicates if the request was successful |
| `message` | string | Human-readable message |
| `data` | array | Array of transaction objects |
| `meta` | object | Pagination metadata |
### Transaction Object Fields
| Field | Type | Description |
|------------------|---------|--------------------------------------|
| `id` | integer | Unique transaction ID |
| `domain` | string | Environment (live/test) |
| `status` | string | Transaction status |
| `reference` | string | Unique transaction reference |
| `amount` | string | Transaction amount |
| `gateway_response` | string | Gateway response message |
| `paid_at` | string | Payment completion timestamp |
| `created_at` | string | Transaction creation timestamp |
| `channel` | string | Payment channel used |
| `currency` | string | Transaction currency |
| `ip_address` | string | Customer's IP address |
Use this endpoint to retrieve a comprehensive list of all transactions, allowing you to monitor and manage your payment activities effectively.Last updated on