Skip to content
Hoursmith Docs
APIReferenceTeam payouts

Record a completed payment

Record a completed payment. Records a transfer that ALREADY HAPPENED outside Hoursmith; NO money moves. Allocations settle APPROVED bills of one payee in one bill currency. The Idempotency-Key derives the durable operation identity: retrying the same key never records twice, while a new key is a new payment (FULL settlement of an already-settled bill is then rejected with 409). Owner/Admin only (Managers and Members receive 403 before any record lookup); Agency plan (`teamPayouts`, 402 with requiredPlan agency otherwise). Requires the `write` scope. Requires an Idempotency-Key. Money values are exact decimal strings; dates are ISO calendar dates.

POST
/team-payouts/payments

Authorization

BearerAuth
AuthorizationBearer <token>

Personal Access Token. Mint at Settings → API. Token shape: hsk_<env>_<prefix12>_<secret32>.

In: header

Header Parameters

Idempotency-Key*string

Caller-generated UUID/ULID. Same key + same body replays the original response; the key also derives the durable operation identity, so a retried payment, reversal or draft is never applied twice.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/team-payouts/payments" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "payeeId": "79417842-2e1e-4110-a361-89b9f39b36ed",    "currency": "str",    "settlementMode": "FULL",    "paidDate": "2019-08-24",    "allocations": [      {        "billId": "b9de0a53-2363-44cf-9760-a7ddf29fedb4",        "amount": "string"      }    ]  }'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "payeeId": "79417842-2e1e-4110-a361-89b9f39b36ed",    "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",    "currency": "string",    "amount": "string",    "paidDate": "2019-08-24",    "method": "string",    "savedMethodId": "string",    "reference": "string",    "note": "string",    "createdAt": "2019-08-24T14:15:22Z",    "status": "RECORDED",    "reversedAt": "2019-08-24T14:15:22Z",    "reversalReason": "string",    "settlementCurrency": "string",    "settlementAmount": "string",    "exchangeRate": "string",    "settlementMode": "string",    "allocations": [      {        "billId": "b9de0a53-2363-44cf-9760-a7ddf29fedb4",        "number": "string",        "currency": "string",        "amount": "string",        "cashAmount": "string",        "cashCurrency": "string",        "links": {          "app": "string",          "payee": "string",          "project": "string",          "task": "string"        }      }    ],    "links": {      "app": "string",      "payee": "string",      "project": "string",      "task": "string"    },    "bills": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "number": "string",        "currency": "string",        "status": "DRAFT",        "total": "string",        "amountPaid": "string",        "remaining": "string",        "paymentStatus": "UNPAID",        "links": {          "app": "string",          "payee": "string"        }      }    ]  },  "warnings": [    "string"  ]}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
{  "error": {    "code": "unauthenticated",    "message": "string",    "fields": {      "property1": "string",      "property2": "string"    },    "requiredPlan": "studio",    "feature": "string",    "requestId": "string"  }}
Was this page helpful?