Skip to content

Card

A Card is a payment credential a Startup issues to one Worker under one Mandate, with controls compiled from that Mandate.

Properties

PropertyTypeRequiredDescription
formstringrequiredsingleUse pays one Task and closes; merchant pays one merchant until the Mandate ends; physical is for a Human only.
statusstringrequiredFollows its Mandate: frozen while the Mandate is paused, closed once it is revoked or a single-use Card has paid.
merchantsstring[]The merchants or merchant categories it may pay, compiled from the Mandate.
limitLimitrequiredThe amount per charge and per period; every interval is set, so the rail’s default never decides.
taskTaskFor a singleUse Card: the Task it pays for, which also holds the receipt.
last4stringThe last four digits; the full number never leaves the rail.

Object

JSON
{
  "$id": "https://api.sb/quietcopy.com/cards/card_1",
  "$type": "Card",
  "form": "singleUse",
  "status": "active",
  "merchants": [
    "advertising"
  ],
  "limit": "limit_1",
  "task": "task_1",
  "last4": "4242"
}

Relationships

  • A Card is carried by one Worker: a Worker carries the Cards issued for its Mandates; the cardholder on the rail is always the Company. carriedBy, inverse carries.
  • A Card is funded by one Mandate: a Mandate funds the Cards that spend under it; pausing it freezes them and revoking it closes them. fundedBy, inverse funds.

Lifecycle

Card lifecycle: active, frozen, closed (ends)active → frozen: on Mandate.pausedactive → closed: on Mandate.revokedactive → closed: on Mandate.spentfrozen → active: on Mandate.resumedfrozen → closed: on Mandate.revokedactivefrozenclosed
StateMeaningMoves to
active (first)It pays the merchants its Mandate allows, within its Limit.frozen on Mandate.paused when the Mandate is this Card’s; closed on Mandate.revoked when the Mandate is this Card’s; closed on Mandate.spent when this Card is single-use and paid its Task
frozenIts Mandate is paused, so every charge is declined.active on Mandate.resumed when the Mandate is this Card’s; closed on Mandate.revoked when the Mandate is this Card’s
closedIts Mandate is revoked or its single use is spent; the record and its charges stay.None: it ends here.

Verbs

  1. getReturns one Card by id.
    GET /{namespace}/cards/{id}readNo Event
  2. listReturns Cards, newest first, one page at a time.
    GET /{namespace}/cardsreadNo Event
  3. issueIssue creates a Card under a Mandate once the Mandate check passes, with explicit limits on every interval.
    POST /{namespace}/cards/issuedoCard.issued

A Card is kept forever and never edited: it has no update or delete.

Permissions

Which Access level may call each Verb. One-way Verbs wait their delay window.

Operationowneradminmemberviewer
Card.getYesYesYesYes
Card.listYesYesYesYes
Card.issueYesYesYesNo

Stripe

Issuing Card (issuing.card). The source of truth is db.sb, and Stripe holds a copy written from it.

PropertyStripe fieldSource of truth
statusstatusdb.sb
limitspending_controls.spending_limits[]db.sb
merchantsspending_controls.allowed_categoriesdb.sb
last4last4Stripe

Call it

Text
Issue the latest card with a mandate.

Example

The Marketing Lead Agent at a sleep-tracking app holds two Cards under one Mandate. One is a merchant Card for its ad network at $2,000 a month; the other is a singleUse Card for a $450 design tool. Pausing the Mandate freezes both at once.