API reference › Finance › Pro formas
List pro forma payments
GET /v1/finance/pro-formas/{id}/payments
- Scope
finance:read- Roles
- admin, scheduler
Returns payment history and allocation records for a pro forma.
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
id required | string | Pro forma ID Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/finance/pro-formas/{id}/payments" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Pro forma payments retrieved successfully
Pro forma payments retrieved successfully.
{
"success": true,
"message": "Pro forma payments retrieved successfully.",
"data": [
{
"id": 42,
"pro_forma_id": "PF-1IU6BD",
"client_id": "CLT-N3B72G",
"amount": "250.00",
"payment_method": "manual",
"transaction_id": "txn_1A2B3C",
"payment_date": "2025-01-20",
"status": "completed",
"notes": "string",
"created_by": "USR-9WE3TK",
"created_at": "string",
"updated_at": "string",
"allocations": [
{
"id": 91,
"pro_forma_payment_id": 42,
"invoice_id": "INV-QKPWQ9",
"allocated_amount": "250.00",
"allocation_source": "payment",
"invoice": {}
}
]
}
]
}Response fields (22)
3 top-level fields; 1 hold nested fields, listed below.
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | array of object (19 nested) | Payments against this pro forma, newest first. Model rows, so the keys are snake_case. |
Nested fields
data 19 fields
| Field | Type | Description |
|---|---|---|
data[].id | integer | Example |
data[].pro_forma_id | string | Example |
data[].client_id | string | Example |
data[].amount | string | Cast to two decimal places. Example |
data[].payment_method | string | Example |
data[].transaction_id | string or null | Example |
data[].payment_date | string (date) | Example |
data[].status | string | Example |
data[].notes | string or null | |
data[].created_by | string or null | Example |
data[].created_at | string (date-time) or null | |
data[].updated_at | string (date-time) or null | |
data[].allocations | array of object | How the payment was spread over the pro forma's invoices. |
data[].allocations[].id | integer | Example |
data[].allocations[].pro_forma_payment_id | integer | Example |
data[].allocations[].invoice_id | string | Example |
data[].allocations[].allocated_amount | string | Example |
data[].allocations[].allocation_source | string | One of: |
data[].allocations[].invoice | object or null | The allocated invoice, eager-loaded. |
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
Unable to retrieve payment history
{
"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 |