@startujn render { 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 --> checkout checkout --> authorize : [Pay] { payload: [card, amount] } authorize --> bank_app : approval needed bank_app ..> confirmed : [Approve] confirmed -down-> paid : [Done] authorize -up-> psp { payload: [card, amount] } psp ..> authorize { payload: [result] } authorize -down-x-> refused : card refused bank_app .x.> checkout : [Decline] ' back to try another card checkout -down-> pay_later : [Pay later] { flags: [future] } checkout -up-> transfer : [Bank transfer] @endujn