Contractors

contractorOps.payouts.prepare

Prepare a payout from approved hours for a pay period (periodId), or a milestone payout for a contractor (contractorId with hoursIds or amountMinor). Amounts use exact minor units: approved minutes × hourly rate, days × day rate, or fixed and monthly rules, plus GST/HST only at a rate finance confirmed (salesTaxStatus shows when the contractor's declared tax isn't confirmed yet). Hours can never be included in two active payouts.

POST/api/v1/accounting/contractorOps.payouts.prepare

Permissions

accounting:readaccounting:write

Who can call it

admin, finance

Retries

Idempotency key required

MCP

accounting_contractor_ops_payouts_prepare

Fields

  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–200 characters

  • periodIdstring (ID)

    The ID of a contractor pay period.

  • contractorIdstring (ID)

    The ID of a contractor, from contractors.list.

  • hoursIdsarray of strings (ID)

    A list of record IDs.

    at most 500 items

  • amountMinorstring

    An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50.

    Matches ^\d{1,15}$

  • currencystring

    Three-letter currency code, such as CAD or USD.

  • descriptionstring

    A short description.

    at most 500 characters

  • includeEarlierUnpaidboolean

    Also include earlier unpaid.

    Default true

  • applyTaxboolean

    Default true

  • submitForApprovalboolean

    Default true

Example

curl https://app.getoatmilk.com/api/v1/accounting/contractorOps.payouts.prepare \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "periodId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a"
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/contractorOps.payouts.prepare
curl https://app.getoatmilk.com/api/v1/accounting/contractorOps.payouts.prepare \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "periodId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a"
}'

More in Contractors.