Getting All Payments
GET|POST /api/repayments
Request:
| Field | Required | Type | Description |
|---|---|---|---|
| perPage | ❌ | int | Number of records per page. Default: 10 |
| page | ❌ | int | Page number. Default: 1 |
| filters | ❌ | array | Array of objects for filtering records |
| filters.*.type | ❌ | string | Filter type - and or or. Default: and |
| filters.*.field | ✅ | string | Field for filtering. ('id', 'recurrent', 'paySystem', 'contractId', 'amount', 'client_amount', 'commission', 'orderId', 'fundTransactionId', 'insuranceId', 'status', 'error', 'createdAt', 'updatedAt') |
| filters.*.operator | ❌ | string | Comparison operator (<, <= ,> ,>= ,= ,!= ,like, not like, in, not in). Default: = |
| filters.*.value | ❌ | mixed | Value for comparison |
| sort | ❌ | string | Field for sorting ('id', 'recurrent', 'paySystem', 'contractId', 'amount', 'client_amount', 'commission', 'orderId', 'fundTransactionId', 'insuranceId', 'status', 'error', 'createdAt', 'updatedAt') |
| sortDirection | ❌ | mixed | Sort direction (asc, desc). Default: asc |
Response:
json
{
"status": "ok",
"timestamp": "1685516056000",
"data": [
{
"id": 90,
"recurrent": false,
"paySystem": "tinkoff",
"contractId": 1234,
"amount": 1000,
"client_amount": 1000,
"commission": 0,
"orderId": null,
"fundTransactionId": null,
"insuranceId": 3,
"status": 8,
"statusText": "процесс платежа окончен",
"error": "Повторите попытку позже.(9999) - ",
"createdAt": "2022-04-12T16:45:06+03:00",
"updatedAt": "2022-04-12T16:45:06+03:00"
},
{
"id": 89,
"recurrent": false,
"paySystem": "tinkoff",
"contractId": 12345,
"amount": 1000,
"client_amount": 1000,
"commission": 0,
"orderId": null,
"fundTransactionId": null,
"insuranceId": 3,
"status": 8,
"statusText": "процесс платежа окончен",
"error": "",
"createdAt": "2022-04-12T16:43:43+03:00",
"updatedAt": "2022-04-12T16:43:43+03:00"
}
]
}