{
"_links": {
"customer_overview": "/api/customers/by-id/105/overview",
"customer_unpaid_invoices": "/api/customers/by-id/105/unpaid-invoices",
"payment_detail": "/api/customers/payments/by-id/4389",
"self": "/api/customers/payments/by-id/4389/invoices-paid"
},
"cache": {
"age_seconds": 0,
"cached_at": "2026-10-07T14:05:10-04:00",
"expires_at": "2026-10-07T18:05:10-04:00",
"force_refreshed": false,
"key_hash": "sha1:9b1f0e6c2d4a8e3f7c5b1a0d9e8f7a6b5c4d3e2f",
"status": "miss",
"ttl_policy": "current_period_4h",
"ttl_remaining_seconds": 14400
},
"items": [
{
"_links": {
"invoice_detail": "/api/customers/invoice-ar/by-id/13117",
"invoice_payment_allocations": "/api/customers/invoice-ar/by-id/13117/payment-allocations"
},
"allocation_date": "2026-08-01",
"amount_applied": 4026.01,
"amount_total": 4026.01,
"discount_applied": 0,
"invoice": {
"amount_invoiced": 4026.01,
"id": 13117,
"invoice_date": "2026-07-15",
"number": "18512",
"type": {
"code": "invoice",
"id": 3,
"label": "Facture"
}
},
"is_current_day": false,
"is_unallocated": false,
"line": {
"line_id": 16850,
"unique_code": "20871"
},
"transaction_type": {
"code": "invoice",
"id": 3,
"label": "Facture"
}
},
{
"_links": {
"invoice_detail": "/api/customers/invoice-ar/by-id/13125",
"invoice_payment_allocations": "/api/customers/invoice-ar/by-id/13125/payment-allocations"
},
"allocation_date": "2026-08-01",
"amount_applied": 3764.93,
"amount_total": 3764.93,
"discount_applied": 0,
"invoice": {
"amount_invoiced": 3764.93,
"id": 13125,
"invoice_date": "2026-07-22",
"number": "18520",
"type": {
"code": "invoice",
"id": 3,
"label": "Facture"
}
},
"is_current_day": false,
"is_unallocated": false,
"line": {
"line_id": 16851,
"unique_code": "20872"
},
"transaction_type": {
"code": "invoice",
"id": 3,
"label": "Facture"
}
},
{
"_links": {},
"allocation_date": "2026-08-01",
"amount_applied": 500,
"amount_total": 500,
"discount_applied": 0,
"is_current_day": false,
"is_unallocated": true,
"line": {
"line_id": 16852,
"unique_code": "20873"
},
"transaction_type": {
"code": "overpayment",
"id": 1,
"label": "Excédent"
}
}
],
"metadata": {
"extracted_at": "2026-10-07T14:05:10-04:00",
"organisation_id": "construction_demo",
"scope": "all_lines_including_unallocated",
"sdk_indexes_used": {
"customer_payment": "get_card",
"customer_payment_line": 2,
"invoice_ar": "get_card"
}
},
"payment": {
"customer": {
"code": "CONSTEX",
"id": 105,
"name": "Construction Exemple inc."
},
"id": 4389,
"is_archived": false,
"number": "6312",
"payment_date": "2026-08-01",
"payment_type": {
"code": "payment",
"id": 1,
"label": "Paiement"
},
"reference": "Chèque 12345"
},
"summary": {
"currency": "CAD",
"first_allocation_date": "2026-08-01",
"invoices_paid_count": 2,
"last_allocation_date": "2026-08-01",
"lines_count": 3,
"total_applied": 7790.94,
"total_discount": 0,
"total_unallocated": 500,
"unallocated_count": 1
}
}