List Invoice Payments
GET /api/v1/invoices/{invoice_id}/payments
Retrieve all payments applied to a specific invoice. Supports Ransack for filtering.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invoice_id |
integer | Yes | The unique ID of the invoice. |
Ransack Parameters
e.g., q[amount_gteq]=100, q[reference_cont]=Payment, q[channel_eq]=cash, q[paid_at_lteq]=2025-10-21.
Request Example
GET /api/v1/invoices/123/payments?q[channel_eq]=cash HTTP/1.1
Host: koteshen.com
Authorization: Bearer {access_token}
Content-Type: application/json
Accept: application/json
Response
Status Codes:
200 OK- Success.401 Unauthorized- Invalid or missing token.404 Not Found- Invoice not found.422 Unprocessable Entity- Invalid Ransack query.
Success Response (200)
{ "data": [ { "id": 101, "invoice_id": 123, "amount": "340.00", "reference": "Payment 343", "channel": "cash", "paid_at": "2025-10-13T00:00:00.000Z", "created_at": "2025-10-13T00:00:00.000Z" } ] }