Skip to content

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

InputTypeRequiredDescription
mandateMandaterequiredThe Mandate the Card spends under.
formstringrequiredWhich kind of Card to issue.
taskTaskFor a singleUse Card: the Task it pays for.
merchantstringFor a merchant Card: the one merchant it may pay.

Outputs

OutputTypeRequiredDescription
cardCardrequiredThe 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, send and do modes.
  • Refuses card-program-pending while the card program of the Startup’s owner of record awaits its grant.
  • A singleUse Card closes after its one charge.
  • Each charge runs the Mandate check in real time and declines on its Limit or a hold spend state.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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-pendingCall 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 grantcard-program-pendingClear what the check names, then call it again.Card.issue

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt 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.