PayRun .approve
POST /{namespace}/pay-runs/{payRun}/approve
Approve accepts a prepared Pay Run within the approver’s Mandate, books its cost, and schedules payment to land on the pay date.
- Noun
- Pay Run
- Mode
do- Event
PayRun.approved
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
payRun | Pay Run | required | The prepared Pay Run. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
payRun | Pay Run | required | The approved Pay Run, scheduled for its pay date. |
Effects
- Emits
PayRun.approved. - Performed by the Payroll Specialist.
- One-way (money): it waits out its delay window, and runs in the
sendanddomodes. - Above the Payroll Specialist’s Limit, waits for an Approval from the Founder.
- Schedules
PayRun.payearly enough for the money to land on the pay date.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | PayRun.approve |
When it waits
| Gate | Default |
|---|---|
| Decision class | Medium: one-way, bounded (money) |
| Delay window | 1 business hour, in which a watcher can pause, redirect or cancel it; then it runs. |
| Limit | The spend Limit of the Permission or Mandate it runs under. |
| Over the Limit | It waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |