POST /settlements/run
Endpoint
POST /api/v1/settlements/run
Authentication
| Header | Required |
|---|---|
x-api-key | Yes |
Optional query parameters
| Name | Type | Description |
|---|---|---|
partner_id | string | Filter to one partner |
client_id | string | Filter to one client under partner |
Batch eligibility logic
Transactions included must be:
status = succeededsettlementStatus = unsettled- created before the current day boundary
Batches are grouped by:
partnerIdclientIdcurrency
Success response
{
"created_batches": 1,
"batches": [
{
"id": "0fbb6b17-8d2d-438e-87e7-2f9f427f5e3f",
"partnerId": "ECHEZONA001",
"clientId": "AIRPEACE001",
"currency": "USD",
"transactionIds": ["CLVTX_1739378102312_420"],
"totalGross": 750,
"totalProcessorFees": 24.75,
"totalPlatformFees": 9,
"totalNet": 716.25,
"status": "pending",
"createdAt": "2026-03-05T15:30:01.100Z"
}
]
}
Notes
- Batch creation and transaction status changes are atomic.
- Transactions in created batches move to
settlementStatus = queued.