Card .issue
POST /{namespace}/cards/issue
Issue creates a Card under a Mandate once the Mandate check passes, with explicit limits on every interval.
- Noun
- Card
- Mode
do- Event
Card.issued
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
mandate | Mandate | required | The Mandate the Card spends under. |
form | string | required | Which kind of Card to issue. |
task | Task | For a singleUse Card: the Task it pays for. | |
merchant | string | For a merchant Card: the one merchant it may pay. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
card | Card | required | The active Card, with its last four digits and limits. |
Effects
- Emits
Card.issued. - Performed by the Treasurer.
- Two-way: it runs at once, in the
try,sendanddomodes. - Refuses
card-program-pendingwhile the card program of the Startup’s owner of record awaits its grant. - A
singleUseCard closes after its one charge. - Each charge runs the Mandate check in real time and declines on its Limit or a
holdspend state.
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. | Card.issue |
| The card program of the Startup’s owner of record awaits its grant, so no Card can be issued. | card-program-pending | Call again once the program is granted; nothing on the Startup’s side changes. | Card.issue |
card-program-pending while the card program of the Startup’s owner of record awaits its grant | card-program-pending | Clear what the check names, then call it again. | Card.issue |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission 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. |