Checkout

A shopper pays for their cart by card. The payment provider asks the card issuer, which either wants approval in the shopper's bank app or refuses the card. Approving lands on Order confirmed, declining goes back to Checkout to try another card, and a refused card ends the checkout. Pay later (planned) and Bank transfer (legacy) sit beside the card payment.

10 screens and steps11 arrows0 warnings

What UJN shows here Point at a note to see its part of the drawing

Checkout  CHECKOUTPay by card and approve in the bank app. Pay later is planned.Start From the cartStartFrom the cartCheckout (View) Address and card Route: /checkoutViewCheckoutAddress and card/checkoutAuthorize payment (Action) Asks the card issuerActionAuthorize paymentAsks the card issuerBank app (Handoff, returns) Approve the payment Channel: bank app Timeout: 5 minHandoff, returnsBank appApprove the paymentbank app · 5 minOrder confirmed (View) Route: /orders/:id Trace: req:PAY-04, test:e2e/checkout.spec.ts Id: unique id bd51a9c2824ViewOrder confirmed/orders/:idEnd, success Order paidEnd, successOrder paidPayment provider (System, external) Host: api.pay.exampleSystem, externalPayment providerapi.pay.exampleEnd, failure Card refusedEnd, failureCard refusedPay later (View) Invoice in 30 days Route: /checkout/later Flags: future (planned for a later release)ViewPay laterInvoice in 30 days/checkout/later»Bank transfer (View) IBAN and reference Route: /checkout/transfer Flags: legacy (old but staying)ViewBank transferIBAN and reference/checkout/transferLNo label Navigation from from_cart to CheckoutPay Navigation from Checkout to Authorize payment Payload: {card, amount}Pay{card, amount}approval needed Navigation from Authorize payment to Bank appapproval neededApprove Return, resume from Bank app to Order confirmedApproveDecline Failed return, resume from Bank app to CheckoutDeclineDone Navigation from Order confirmed to paidDoneNo label Navigation, call from Authorize payment to Payment provider Payload: {card, amount}{card, amount}card refused Negative from Authorize payment to refusedcard refusedPay later Navigation from Checkout to Pay later Flags: future (planned for a later release)Pay later»Bank transfer Navigation from Checkout to Bank transferBank transferNo label Return, reply from Payment provider to Authorize payment Payload: {result}{result}
The source (35 lines)
checkout.puml
@startujnrender { arrow_spacing: 24 }journey CHECKOUT "Checkout"description: "Pay by card and approve in the bank app. Pay later is planned."unique_id_friendly: checkout start from_cart { description: "From the cart" }view checkout { title: "Checkout"; description: "Address and card"; route: /checkout }action authorize { title: "Authorize payment"; description: "Asks the card issuer" }handoff bank_app { title: "Bank app"; description: "Approve the payment"; channel: bank app; timeout: 5 min }view confirmed{  title: "Order confirmed"  route: /orders/:id  trace: [req:PAY-04, test:e2e/checkout.spec.ts]  unique_id: bd51a9c2824  ' AUTO GENERATED - DO NOT CHANGE}end paid { type: success; description: "Order paid" }system psp { type: external; title: "Payment provider"; host: api.pay.example }end refused { type: failure; description: "Card refused" }view pay_later { title: "Pay later"; description: "Invoice in 30 days"; route: /checkout/later; flags: [future] }view transfer { title: "Bank transfer"; description: "IBAN and reference"; route: /checkout/transfer; flags: [legacy] } from_cart --> checkoutcheckout --> authorize : [Pay] { payload: [card, amount] }authorize --> bank_app : approval neededbank_app ..> confirmed : [Approve]confirmed -down-> paid : [Done]authorize -up-> psp { payload: [card, amount] }psp ..> authorize { payload: [result] }authorize -down-x-> refused : card refusedbank_app .x.> checkout : [Decline]                 ' back to try another cardcheckout -down-> pay_later : [Pay later] { flags: [future] }checkout -up-> transfer : [Bank transfer]@endujn