Sequence diagram ยท checkout
Checkout request path
What happens after a shopper presses Pay: the card is authorized, the result is saved, and the receipt email goes out after the reply, so a slow mail queue never holds up checkout.
Checkout request path
Sequence diagram of a checkout: browser, API, payments service, card processor, database and email worker, with an approved branch, a card-declined branch, and an async receipt email.
ALT
[card approved]
[card declined]
POST /CHECKOUT
CHARGE ORDER
AUTHORIZE
APPROVED
SAVE PAYMENT
CHARGED
QUEUE RECEIPT
200 CONFIRMED
DECLINED
SAVE DECLINE
CARD_DECLINED
402 DECLINED
WEB
Browser
checkout page
API
API
POST /checkout
SVC
Payments
payments-svc
EXT
Card processor
third party
DB
Database
Postgres
WORKER
Email worker
queue consumer
LEGEND
HTTP call
internal call
return
async, no wait
happy-path reply
busy handling a request
ALT
one branch or the other runs