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

NameTypeDescription
id requiredstring

Pro forma ID

Example PF-ABC123.

Every call also sends Authorization and X-Tenant-ID; see Getting started.

Example request

Shell
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.

JSON
{
  "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.

FieldTypeDescription
successboolean

Example true.

messagestring

Example Pro forma payments retrieved successfully..

dataarray of object (19 nested)

Payments against this pro forma, newest first. Model rows, so the keys are snake_case.

Nested fields

data 19 fields
FieldTypeDescription
data[].idinteger

Example 42.

data[].pro_forma_idstring

Example PF-1IU6BD.

data[].client_idstring

Example CLT-N3B72G.

data[].amountstring

Cast to two decimal places.

Example 250.00.

data[].payment_methodstring

Example manual.

data[].transaction_idstring or null

Example txn_1A2B3C.

data[].payment_datestring (date)

Example 2025-01-20.

data[].statusstring

Example completed.

data[].notesstring or null
data[].created_bystring or null

Example USR-9WE3TK.

data[].created_atstring (date-time) or null
data[].updated_atstring (date-time) or null
data[].allocationsarray of object

How the payment was spread over the pro forma's invoices.

data[].allocations[].idinteger

Example 91.

data[].allocations[].pro_forma_payment_idinteger

Example 42.

data[].allocations[].invoice_idstring

Example INV-QKPWQ9.

data[].allocations[].allocated_amountstring

Example 250.00.

data[].allocations[].allocation_sourcestring

One of: payment, credit. Example payment.

data[].allocations[].invoiceobject or null

The allocated invoice, eager-loaded.

401 Not signed in

Missing, invalid or expired API key.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED. Example API_KEY_MISSING.

403 Not allowed

Scope, tenant, IP allow-list or RBAC check failed.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You don't have permission to access this endpoint. This API key is missing the 'finance:read' scope..

errorsany or null

Null on this status.

codestring

Always empty on this status.

Example .

429 Too many requests

Rate limit exceeded. See Retry-After.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: RATE_LIMITED. Example RATE_LIMITED.

500 Server error

Unable to retrieve payment history

JSON
{
  "success": false,
  "message": "An unexpected error occurred — please try again.",
  "errors": null,
  "code": ""
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example An unexpected error occurred — please try again..

errorsstring or null

Null in production. The exception message only when the application runs with debug on, so nothing is leaked to an integrator.

codestring

Always empty: the server-error response carries no error code.

Example .