Client Transactions
Retrieve all transactions for a specific client.
Endpoint
INFO
GET /api/v1/dashboard/clients/{client}/transactions
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
client | integer | Client ID |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
type | string | - | Filter: charge, refund, deposit |
status | string | - | Filter: pending, completed, failed |
page | integer | 1 | Page number |
per_page | integer | 15 | Items per page |
Example Request
bash
curl -X GET "https://api.daakey.com/api/v1/dashboard/clients/1/transactions" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"Response
Success (200)
json
{
"success": true,
"message": "Client transactions retrieved",
"data": [
{
"id": 100,
"type": "charge",
"amount": 120.00,
"currency": "USD",
"status": "completed",
"booking": {
"id": 50,
"reference": "BK-2024-00050"
},
"payment_method": {
"brand": "visa",
"last_four": "4242"
},
"created_at": "2024-01-10T10:00:00Z"
},
{
"id": 95,
"type": "deposit",
"amount": 200.00,
"currency": "USD",
"status": "completed",
"booking": {
"id": 50,
"reference": "BK-2024-00050"
},
"payment_method": {
"brand": "visa",
"last_four": "4242"
},
"created_at": "2024-01-10T10:00:00Z"
},
{
"id": 96,
"type": "refund",
"amount": -200.00,
"currency": "USD",
"status": "completed",
"booking": {
"id": 50,
"reference": "BK-2024-00050"
},
"reason": "Deposit refund",
"created_at": "2024-01-10T18:30:00Z"
}
],
"meta": {
"client": {
"id": 1,
"name": "John Doe"
},
"summary": {
"total_charges": 1250.00,
"total_refunds": 200.00,
"net": 1050.00
},
"current_page": 1,
"last_page": 1,
"per_page": 15,
"total": 3
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}