Entry .settle
POST /{namespace}/entries/settle
Settle nets a Period’s intercompany Entries between two Companies into one transfer through Stripe and reconciles both sides.
- Noun
- Entry
- Mode
do- Event
Entry.settled
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
period | Period | required | The closed Period whose intercompany pairs settle. |
from | Company | required | The Company that owes the net amount. |
to | Company | required | The Company that receives it. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
transaction | Transaction | required | The one transfer that settles every pair. |
entry | Entry | required | The intercompany Entry, now settled. |
Effects
- Emits
Entry.settled. - Performed by the Treasurer.
- One-way (money): it waits out its delay window, and runs in the
sendanddomodes. - Runs monthly, once both Companies have closed the Period.
- Links every settled pair to the Transaction that settled it.
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. | Entry.settle |
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. |