iotoms Docs

Record a commission payout

POST
/api/v1/commission/settlements/{id}/payouts

Records commission paid out of an approved settlement by CASH or BANK. Omit allocations to pay every line's outstanding amount in full, or name lines and amounts for a partial payout. Each line paid moves to PARTIALLY_PAID or PAID, and the payout is posted to the ledger against Commission Payable.

How to use it

  1. Approve the run first with Approve a commission settlement run; payouts on a draft are rejected.
  2. For a partial payout, take line IDs from Get a commission settlement run and send allocations with amounts no higher than each line's outstanding.
  3. Send payMode CASH or BANK, plus optional paidOn, reference and notes. Omit allocations to pay everyone in full.
  4. Paid lines move to PARTIALLY_PAID or PAID, and the payment is booked against Commission Payable on the next posting run.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Request Body

application/json
  1. body
allocations?array<>|

Optional. Lines and amounts to pay. Omit to pay every line's full outstanding amount.

payMode*string

CASH or BANK. Decides which account the payment is booked against. Defaults to CASH.

paidOn?|

Date of payment (YYYY-MM-DD). Defaults to today.

Formatdate
reference?|

Optional payment reference, such as a bank transfer or voucher number.

notes?|

Optional free-text notes.

Response Body

OK

*/*
  1. response
status*string

Outcome of the request: SUCCESS when it worked; errors return an error status with the reason in message.

message*string

Short human-readable message describing the outcome.

data?

The payout that was recorded.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/commission/settlements/497f6eca-6276-4993-bfeb-53cbbbba6f08/payouts' \  -H 'X-TenantID: your-tenant-code' \  -H 'Content-Type: application/json' \  -d '{  "payMode": "string"}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "settlementId": "b4887549-5aec-4adc-bf32-5fb69ede72ea",    "amount": 0,    "payMode": "string",    "paidOn": "2019-08-24",    "reference": "string",    "notes": "string",    "allocations": [      {        "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",        "userRef": "string",        "amount": 0      }    ],    "createdAt": "2019-08-24T14:15:22Z",    "createdBy": "string"  }}