post_payout_accounts_by_orgid_payouts
Calls POST /api/payout-accounts/{orgId}/payouts as the signed-in person · REST reference
Pay out the organization's balance now
The clinic's "pay out today": the same settlement POST /api/finance/payouts/run makes — the balance drained into a PAYOUT Transaction and the approved vouchers marked PAID, atomically in the DAL, then the Stripe transfer to the organization's connected account — asked for by the organization itself. The EFT account's state is read from Stripe first, so a setup finished moments ago pays. A SKIPPED RUN IS A 200: no balance, or an EFT account that does not pay out yet, answers paid: false with skippedReason and retains the funds. Needs execute:UpdateOrgCommand in this organization, or platform staff; the organization must be a SERVICE_PROVIDER. The money only ever goes to the organization's own connected account. While a payout clawback being collected pauses the organization's payouts, credit it holds is first set off against the clawback. The run then decides on what is left: no balance — none held, or the offset took all of it — is the 200 skip above (No balance to pay out), since the run reads the balance before the pause; only credit left over after the offsets is answered 409 PAYOUTS_PAUSED, in the Terms' words, by pauseReason.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
orgIdpath | string (uuid) | required |
Example call
A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "post_payout_accounts_by_orgid_payouts",
"arguments": {
"orgId": "11111111-1111-4111-8111-111111111111"
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
The run's outcome — settled OR skipped. Check paid.
{
"amount": 1,
"currency": "string",
"event": {
"aggregateId": "string",
"eventType": "string"
},
"newBalance": 1,
"orgId": "11111111-1111-4111-8111-111111111111",
"paid": true,
"checkoutId": "11111111-1111-4111-8111-111111111111",
"skippedReason": "string",
"stripeDestination": "string",
"stripeTransferError": "string",
"stripeTransferId": "string",
"transactionId": "11111111-1111-4111-8111-111111111111",
"vouchersPaid": 1
}Fields
| Field | Type | Description |
|---|---|---|
amount | integer | Amount settled in CENTS. 0 when skipped. |
checkoutId | string (uuid) | null | |
currency | string | |
event | object | |
event.aggregateId | string | |
event.eventType | string | |
newBalance | integer | The organization's balance after the run, in CENTS. |
orgId | string (uuid) | |
paid | boolean | |
skippedReason | string | null | |
stripeDestination | string | |
stripeTransferError | string | Present when the transfer FAILED after the ledger settled — the ledger says PAID and the money has not moved. It surfaces in the platform's reconcile. |
stripeTransferId | string | |
transactionId | string (uuid) | null | |
vouchersPaid | integer |
When it fails
A failed call returns isError: true with the API's message as text. A change the person declines, or lets time out, also comes back this way and nothing changes.
400The request was malformed or failed a guard.
403Not platform staff and not holding
execute:UpdateOrgCommandin the organization, or the organization is not a service provider.409A payout clawback pauses the organization's payouts and credit is left on its balance after any offset (
code: PAYOUTS_PAUSED); with no balance left the run is the 200 skip instead. The sentence says which way (pauseReason): one being collected had the credit set off against it, and payouts resume once it is recovered; one closed without all of its amount sets nothing off, and payouts resume when Pawsitive Future resumes them.
What the model is shown
This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.
{
"name": "post_payout_accounts_by_orgid_payouts",
"description": "POST /api/payout-accounts/{orgId}/payouts — The clinic's \"pay out today\": the same settlement `POST /api/finance/payouts/run` makes — the balance drained into a PAYOUT Transaction and the approved vouchers marked PAID, atomically in the DAL, then the Stripe transfer to the organization's connected account — asked for by the organization itself. The EFT account's state is read from Stripe first, so a setup finished moments ago pays. A SKIPPED RUN IS A 200: no balance, or an EFT account that does not pay out yet, answers `paid: false` with `skippedReason` and retains the funds. Needs `execute:UpdateOrgCommand` in this organization, or platform staff; the organization must be a SERVICE_PROVIDER. The money only ever goes to the organization's own connected account. While a payout clawback being collected pauses the organization's payouts, credit it holds is first set off against the clawback. The run then decides on what is left: no balance — none held, or the offset took all of it — is the 200 skip above (`No balance to pay out`), since the run reads the balance before the pause; only credit left over after the offsets is answered 409 `PAYOUTS_PAUSED`, in the Terms' words, by `pauseReason`.\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
"inputSchema": {
"type": "object",
"properties": {
"orgId": {
"type": "string"
}
},
"required": [
"orgId"
]
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": false
}
}