Skip to main content

POST /settlements/run

Endpoint

POST /api/v1/settlements/run

Authentication

HeaderRequired
x-api-keyYes

Optional query parameters

NameTypeDescription
partner_idstringFilter to one partner
client_idstringFilter to one client under partner

Batch eligibility logic

Transactions included must be:

  • status = succeeded
  • settlementStatus = unsettled
  • created before the current day boundary

Batches are grouped by:

  • partnerId
  • clientId
  • currency

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.