Motivation MoneyMotivation Money
API 参考Payroll Runs

Cancel a payroll run

Cancels the run. Only possible before payout execution begins.

Requires payroll:execute scope. Requires Idempotency-Key header.

Allowed from status: DRAFT, CONFIRMED.

POST
/payroll-runs/{run_id}/cancel
AuthorizationBearer <token>

API key: Authorization: Bearer mpk_live_<key>

In: header

Path Parameters

run_id*string

Payroll run identifier

Header Parameters

Idempotency-Key*string

UUID v4. Required on all write operations. Prevents duplicate execution on retry.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

reason?string

Why the run is being cancelled

Response Body

curl -X POST "https://motivation-money.vercel.app/api/v1/payroll-runs/run_cm5x8k2a3000108l3g8h1j2k4/cancel" \  -H "Idempotency-Key: 7f3c4d2a-8b1e-4f6a-9c2d-1a5b8e3f7d4c" \  -H "Content-Type: application/json" \  -d '{}'
Empty