Create sequence diagrams with simple online tool

Swimlanes.io is a free webapp for making sequence diagrams. You simply edit the text on the left and the diagram is updated in real time. You can download your sequence diagrams as images or distribute with a link.

Title: Pay now standalone payment status notification group: _**Order created but not captured yet**_ note: Low risk version, no financial risk with payment defaults as goods are only send once payment confirmation has been sent Consumer -> Merchant: Pay with Bank Transfer Merchant -> Klarna: Create order Klarna -> Merchant: Notification `payment_status=UNPAID` note: ``` payment_status: UNPAID expected_payments[0]: { payment_amount: 10000 debtor: { iban: DE12345678901234 account_holder_name: Max Mustermann } } payments[]: {} // empty ``` if: Money received Consumer --> Klarna: Send money Klarna -> Merchant: Notification `payment_status=PAID` note: ``` payment_status: PAID expected_payments[0]: { payment_amount: 10000 debtor: { iban: DE12345678901234 account_holder_name: Max Mustermann } } payments[0]: { payment_amount: X EUR debtor: { iban: DE12345678901234 account_holder_name: Max Mustermann } } ``` Merchant -> Klarna: Capture order Merchant -> Consumer: Send goods end if: Payment default ...: {fas-spinner} Wait some days Klarna -> Merchant: Notification `payment_status=CLOSED` note: Payment status is set to CLOSED after a few days without any settlement. CLOSED means that Klarna will not process payments for this order anymore. If Klarna still receives money after this notification, it will be automatically refunded to the consumer's bank account. ``` payment_status: CLOSED expected_payments[0]: { payment_amount: 10000 debtor: { iban: DE12345678901234 account_holder_name: Max Mustermann } } payments[]: {} // empty ``` Klarna -> Klarna: Cancel order note: Klarna internally cancels the order. This operation is similar to a [Order.Cancel](https://docs.klarna.com/api/ordermanagement/#operation/cancelOrder) via the Order Management API. end end group: _**Order created and captured**_ Consumer -> Merchant: Pay with Bank Transfer Merchant -> Klarna: Create order Klarna -> Merchant: Notification `payment_status=UNPAID` note: ``` payment_status: UNPAID expected_payments[0]: { payment_amount: 10000 debtor: { iban: DE12345678901234 account_holder_name: Max Mustermann } } payments[]: {} // empty ``` Merchant -> Klarna: Capture order Merchant -> Consumer: Send goods if: Money received Consumer --> Klarna: Send money Klarna -> Merchant: Notification `payment_status=PAID` note: ``` payment_status: PAID expected_payments[0]: { payment_amount: 10000 debtor: { iban: DE12345678901234 account_holder_name: Max Mustermann } } payments[0]: { payment_amount: 10000 debtor: { iban: DE12345678901234 account_holder_name: Max Mustermann } } ``` end if: Payment default ...: {fas-spinner} Wait some days Klarna -> Merchant: Notification `payment status=CLOSED` note: ``` payment_status=CLOSED expected_payments[0]: { payment_amount: 10000 debtor: { iban: DE12345678901234 account_holder_name: Max Mustermann } } payments[]: {} // empty ``` Klarna -> Klarna: Chargeback order note: The order chargeback is technically handled as an internal refund, similar to [Order.Refund](https://docs.klarna.com/api/ordermanagement/#operation/refundOrder) via the Order Management API. When the order is only partially captured, the remaining authorization will be released, similar to [Order.releaseRemainingAuthorization](https://docs.klarna.com/api/ordermanagement/#operation/releaseRemainingAuthorization). end end