ai-diagrams · Debit card lifecycleV1 · State machine
■ State machine

Debit card lifecycle

Card states at the issuer, from request to cancellation. Each change generates an event and is recorded in the cartao table. Happy path: Requested, In production, In transit, Awaiting activation, Active.
state
Requested
state
In production
state
In transit
state
Awaiting activation
state
Active
state
Blocked
final
Canceled
final
Lost in transit
manufacturer confirms order
registration review
declined
manufacturer confirms
dispatch
/ records tracking number
postal service confirms
delivery
returned or idle for 30
days
/ opens new order
customer activates
[4 digits + correct PIN]
incorrect PIN
[3 attempts]
customer blocks in app
customer unblocks in app
cancellation or expiry
cancellation or expiry
States
Requested The customer requested the card in the app. No physical card exists yet.
In production The order was sent to the card manufacturer; the number and cryptogram already exist.
In transit The manufacturer handed the card to the postal service with a tracking number.
Awaiting activation The card reached the customer but cannot accept purchases.
Active Accepts purchases.
Blocked The customer blocked the card in the app. It returns to Active when unblocked.
Canceled Cannot return to a previous state. The number is not reused.
Lost in transit The postal service returned or lost the shipment. This is terminal; the manufacturer issues a new card with a new number.
Notation
initial state
state
final state: no outgoing transitions
event [guard] / actionthe transition occurs on the event, if the guard holds, and executes the action
An incorrect PIN during activation does not change the state; only the third failed attempt moves the card to Blocked.
Out of scope: virtual cards, replacements for damage and credit cards.
ai-diagramsState machine · 2026-11