API reference › Finance › Invoices
Get payment history by client ID
GET /v1/finance/invoices/payment-history/by-client/{client_id}
- Scope
finance:read- Roles
- admin, scheduler
Fetches a paginated list of payment history for a specific client.
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
client_id required | string | Client ID Example |
Query parameters
| Name | Type | Description |
|---|---|---|
search | string | Search query |
status | string | Filter by payment status Example |
startDate | string (date) | Filter from this date (YYYY-MM-DD) |
endDate | string (date) | Filter until this date (YYYY-MM-DD) |
sortBy | string | Sort by field Example |
sortOrder | string | Sort order One of: |
perPage | integer | Items per page Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/finance/invoices/payment-history/by-client/{client_id}" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Payment history retrieved successfully
Payment history retrieved successfully.
{
"success": true,
"data": [
{
"id": 42,
"paymentDate": "01/20/2025",
"amount": 250,
"assignment": "N/A",
"assignmentId": "INV-QKPWQ9",
"invoiceId": "INV-QKPWQ9",
"status": "Completed",
"paymentMethod": "Bank Transfer",
"transactionId": "txn_1A2B3C",
"notes": "string"
}
],
"meta": {
"currentPage": 1,
"lastPage": 4,
"perPage": 10,
"total": 37
}
}Response fields (17)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
data | array of object | |
data[].id | integer | Example |
data[].paymentDate | string or null | Formatted with the organization's date format. Example |
data[].amount | number (float) | Example |
data[].assignment | string | Title of the first work item on the invoice, or N/A. Example |
data[].assignmentId | string | Carries the invoice id, or N/A. Example |
data[].invoiceId | string | Example |
data[].status | string | Example |
data[].paymentMethod | string | Title-cased, or N/A when none is recorded. Example |
data[].transactionId | string or null | Example |
data[].notes | string or null | |
meta | object | |
meta.currentPage | integer | Example |
meta.lastPage | integer | Example |
meta.perPage | integer | Example |
meta.total | integer | Example |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'finance:read' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Server error
{
"success": false,
"message": "An unexpected error occurred — please try again.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | string or null | Null in production. The exception message only when the application runs with debug on, so nothing is leaked to an integrator. |
code | string | Always empty: the server-error response carries no error code. Example |