API reference › Finance › Payment statements

Retrieve a specific payment statement

GET /v1/finance/payment-statements/{payment_statement}

Scope
finance:read
Roles
admin, scheduler

Fetches detailed information about a specific payment statement including line items and provider details.

Parameters

Path parameters

NameTypeDescription
payment_statement requiredstring

Payment statement ID

Example PS-ABC123.

Query parameters

NameTypeDescription
for_duplicateboolean

If true, automatically zero amounts if the payment statement is paid (for duplication purposes)

Example false.

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

Example request

Shell
curl "https://api.fetchfido.ai/v1/finance/payment-statements/{payment_statement}" \
  -H "Authorization: Bearer $FIDO_API_KEY" \
  -H "X-Tenant-ID: $FIDO_TENANT_ID"

Try it

Responses

200 Payment statement retrieved successfully

Payment statement retrieved successfully

JSON
{
  "success": true,
  "message": "Payment statement retrieved successfully.",
  "data": {
    "id": 1,
    "paymentStatementNumber": "PS-20250101-0001",
    "provider": {
      "id": "SP-12345",
      "name": "John Doe"
    },
    "status": "sent",
    "issueDate": "2025-01-01",
    "dueDate": "2025-01-15",
    "total": 150,
    "lineItems": [
      {
        "id": 1,
        "name": "Reimbursement",
        "amount": 150,
        "type": "reimbursement"
      }
    ],
    "currency": {
      "code": "USD",
      "symbol": "$",
      "label": "US Dollar"
    },
    "line_items": [
      {
        "id": 0,
        "amount": 0,
        "name": "string",
        "description": "string",
        "type": {
          "id": 1,
          "label": "Example"
        }
      }
    ],
    "summary": {},
    "payment_terms": {
      "id": 1,
      "label": "Example"
    },
    "issue_date": "2025-01-15",
    "due_date": "2025-01-30",
    "expiry_date": "string",
    "is_expired": true,
    "paid_at": "2025-01-20 14:05:00",
    "updatedAt": "string",
    "correctedAt": "string",
    "notes": "string",
    "internalNotes": "string",
    "is_published": true,
    "actions": [
      "string"
    ],
    "documents": {},
    "refunds": [
      {}
    ],
    "billable_entities": [
      {}
    ],
    "billable_entities_billing": [
      {
        "id": "ASG-YZXCIT",
        "billing_mode": "bill",
        "bill_service": true,
        "bill_expenses": true,
        "bill_admin_fee": true,
        "adminFeeBreakdown": {
          "feeSource": "calculated",
          "clients": [
            null
          ],
          "providers": [
            null
          ]
        }
      }
    ],
    "attempts": [
      {}
    ],
    "customFields": {},
    "payment_rollup": {},
    "approvalStatus": "string",
    "approvedBy": {},
    "approvedAt": "string",
    "approvalDeadlineAt": "string",
    "requiresApproval": true,
    "rejectionReason": "string",
    "terminal_reason_code": "string",
    "terminal_reason": "string",
    "paymentSection": {},
    "reversed_from_paid_at": "string",
    "reverse_reason_code": {
      "id": 1,
      "label": "Example"
    },
    "reverse_reason": "string",
    "reverse_payment_handling": {
      "id": 1,
      "label": "Example"
    },
    "fieldIsLocked": {},
    "canOverrideLocks": true,
    "overrideLocksApplied": true,
    "promptResendOnSave": true,
    "overpaymentGuard": true,
    "hasOverpayment": true,
    "overpaymentAmount": 0,
    "is_corrected": true
  }
}
Response fields (85)

3 top-level fields; 1 hold nested fields, listed below.

FieldTypeDescription
successboolean

Example true.

messagestring

Example Payment statement retrieved successfully..

dataobject (82 nested)

Fields every finance document detail shares. Each document type adds its own party and summary fields on top. Some keys appear only for some types or roles, as noted; portal callers (client, consumer, provider) never see internalNotes.

Nested fields

data 82 fields
FieldTypeDescription
data.idinteger

Example 1.

data.paymentStatementNumberstring

Example PS-20250101-0001.

data.providerobject
data.provider.idstring

Example SP-12345.

data.provider.namestring

Example John Doe.

data.statusstring

Example sent.

data.issueDatestring (date)

Example 2025-01-01.

data.dueDatestring (date)

Example 2025-01-15.

data.totalnumber (float)

Example 150.

data.lineItemsarray of object
data.lineItems[].idinteger

Example 1.

data.lineItems[].namestring

Example Reimbursement.

data.lineItems[].amountnumber (float)

Example 150.

data.lineItems[].typestring

Example reimbursement.

data.currencyobject
data.currency.codestring

Example USD.

data.currency.symbolstring

Example $.

data.currency.labelstring

Example US Dollar.

data.line_itemsarray of object
data.line_items[].idinteger
data.line_items[].amountnumber
data.line_items[].namestring or null
data.line_items[].descriptionstring or null
data.line_items[].typeobject
data.line_items[].type.idinteger or string

Example 1.

data.line_items[].type.labelstring or null

Example Example.

data.summaryobject

Totals for display: services and expense charges, tax, discount, payments applied, total and balance due. Admin and scheduler callers get the internal breakdown as well.

data.payment_termsobject
data.payment_terms.idinteger or string

Example 1.

data.payment_terms.labelstring or null

Example Example.

data.issue_datestring or null

Example 2025-01-15.

data.due_datestring or null

Null on an organization summary invoice.

Example 2025-01-30.

data.expiry_datestring or null

Pro formas and payment statements only.

data.is_expiredboolean or null

Pro formas only.

data.paid_atstring or null

Example 2025-01-20 14:05:00.

data.updatedAtstring or null

In the organization's date and time format.

data.correctedAtstring or null
data.notesstring or null
data.internalNotesstring or null

Staff only.

data.is_publishedboolean
data.actionsarray of string

Actions the caller may take on this document now, such as send, mark_paid, void, download or send_message.

data.documentsobject or null

Attached files.

data.refundsarray of object

Invoices only.

data.billable_entitiesarray of object or null

Linked assignments and shifts, with is_deleted when the work item was removed.

data.billable_entities_billingarray of object
data.billable_entities_billing[].idstring

A work item listed in billable_entities.

Example ASG-YZXCIT.

data.billable_entities_billing[].billing_modestring or null

One of: bill, reference. Example bill.

data.billable_entities_billing[].bill_serviceboolean or null
data.billable_entities_billing[].bill_expensesboolean or null

Example true.

data.billable_entities_billing[].bill_admin_feeboolean or null

Example true.

data.billable_entities_billing[].adminFeeBreakdownobject or null
data.billable_entities_billing[].adminFeeBreakdown.feeSourcestring or null

One of: calculated, manual.

data.billable_entities_billing[].adminFeeBreakdown.clientsarray of object or null
data.billable_entities_billing[].adminFeeBreakdown.providersarray of object or null
data.attemptsarray of object

Delivery and payment attempts on the document.

data.customFieldsobject or null
data.payment_rollupobject or null

Pro formas and payment statements: Unpaid, Partially Paid or Paid, with the amounts behind it.

data.approvalStatusstring or null

Invoices and pro formas, staff only.

data.approvedByobject or null

Invoices and pro formas, staff only.

data.approvedAtstring or null
data.approvalDeadlineAtstring or null
data.requiresApprovalboolean or null
data.rejectionReasonstring or null

Rejected pro formas only.

data.terminal_reason_codestring or null

Why a canceled or void document ended.

data.terminal_reasonstring or null
data.paymentSectionobject or null

Present when the caller can pay or record a payment.

data.reversed_from_paid_atstring or null

Invoices only.

data.reverse_reason_codeobject

Invoices only.

data.reverse_reason_code.idinteger or string

Example 1.

data.reverse_reason_code.labelstring or null

Example Example.

data.reverse_reasonstring or null

Invoices only.

data.reverse_payment_handlingobject

Invoices only.

data.reverse_payment_handling.idinteger or string

Example 1.

data.reverse_payment_handling.labelstring or null

Example Example.

data.fieldIsLockedobject

Per field: {disabled, reason, sensitive}. Drives which fields an edit may change.

data.canOverrideLocksboolean
data.overrideLocksAppliedboolean

True when the request sent override_locks=true and the caller may override.

data.promptResendOnSaveboolean

A save should ask whether to resend the document.

data.overpaymentGuardboolean
data.hasOverpaymentboolean
data.overpaymentAmountnumber or null
data.is_correctedboolean
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 .

404 Not found

Payment statement not found

JSON
{
  "success": false,
  "message": "Payment statement not found."
}
Response fields (2)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Payment statement not found..

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

Internal Server Error

JSON
{
  "success": false,
  "message": "An unexpected error occurred."
}
Response fields (2)
FieldTypeDescription
successboolean

Example false.

messagestring

Example An unexpected error occurred..