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: Klarna Debit Risk payment status notification group: _**Order created but not captured yet**_ note: Low risk version, no financial risk with payment defaults as goods are only shipped once payment confirmation has been sent Consumer -> Merchant: Pay with Bank Transfer Merchant -> Klarna: Create order Klarna -> Merchant: Notification `payment_status=UNPAID` note ,:``` [escape-left-curley-bracket] "event_type": "non_guaranteed_payment.updated", "event_id": "26d37496-681b-4359-a50b-d82af9a0f5b5", "occurred_at": "2024-02-07T13:23:45.543Z", "payload": [escape-left-curley-bracket] "order_id": "0df498a7-4d9d-4b7c-b1f7-64defb67c22c", "order_amount": 10000, "purchase_currency": "EUR", "created_at": "2024-02-07T13:23:44.000Z", "merchant_id": "K123456", "merchant_reference1": "Reference 1", "merchant_reference2": "Reference 2", "payment_status": "UNPAID", "expected_payments": [ [escape-left-curley-bracket] "payment_amount": 10000, "debtor": [escape-left-curley-bracket] "account_holder_name": "Max Mustermann", "iban": "DE43000000001234567890", "account_number": "000000001234567890", "bank_code": "00000000", "bic": "TESTDE20XXX", "bank_name": "Test Bank" } } ], "payments": [] } } ``` if: Money received Consumer --> Klarna: Send money Klarna -> Merchant: Notification `payment_status=PAID` note ,: ``` [escape-left-curley-bracket] "event_type": "non_guaranteed_payment.updated", "event_id": "36d37496-681b-4359-a50b-d82af9a0f5b5", "occurred_at": "2024-02-08T22:10:21.351Z", "payload": [escape-left-curley-bracket] "order_id": "0df498a7-4d9d-4b7c-b1f7-64defb67c22c", "order_amount": 10000, "purchase_currency": "EUR", "created_at": "2024-02-07T13:23:44.000Z", "merchant_id": "K123456", "merchant_reference1": "Reference 1", "merchant_reference2": "Reference 2", "payment_status": "PAID", "expected_payments": [ [escape-left-curley-bracket] "payment_amount": 10000, "debtor": [escape-left-curley-bracket] "account_holder_name": "Max Mustermann", "iban": "DE43000000001234567890", "account_number": "000000001234567890", "bank_code": "00000000", "bic": "TESTDE20XXX", "bank_name": "Test Bank" } } ], "payments": [ [escape-left-curley-bracket] "payment_amount": 10000, "payment_received_at": "2024-02-08T21:50:18.224Z", "debtor": [escape-left-curley-bracket] "account_holder_name": "Max Mustermann", "iban": "DE43000000001234567890", "account_number": "000000001234567890", "bank_code": "00000000", "bic": "TESTDE20XXX", "bank_name": "Test Bank" } } ] } } ``` Merchant -> Klarna: Capture order Merchant -> Consumer: Ship 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. ``` [escape-left-curley-bracket] "event_type": "non_guaranteed_payment.updated", "event_id": "46d37496-681b-4359-a50b-d82af9a0f5b5", "occurred_at": "2024-02-17T11:28:12.418Z", "payload": [escape-left-curley-bracket] "order_id": "0df498a7-4d9d-4b7c-b1f7-64defb67c22c", "order_amount": 10000, "purchase_currency": "EUR", "created_at": "2024-02-07T13:23:44.000Z", "merchant_id": "K123456", "merchant_reference1": "Reference 1", "merchant_reference2": "Reference 2", "payment_status": "CLOSED", "expected_payments": [ [escape-left-curley-bracket] "payment_amount": 10000, "debtor": [escape-left-curley-bracket] "account_holder_name": "Max Mustermann", "iban": "DE43000000001234567890", "account_number": "000000001234567890", "bank_code": "00000000", "bic": "TESTDE20XXX", "bank_name": "Test Bank" } } ], "payments": [] } } ``` 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 ,: ``` [escape-left-curley-bracket] "event_type": "non_guaranteed_payment.updated", "event_id": "26d37496-681b-4359-a50b-d82af9a0f5b5", "occurred_at": "2024-02-07T13:23:45.543Z", "payload": [escape-left-curley-bracket] "order_id": "0df498a7-4d9d-4b7c-b1f7-64defb67c22c", "order_amount": 10000, "purchase_currency": "EUR", "created_at": "2024-02-07T13:23:44.000Z", "merchant_id": "K123456", "merchant_reference1": "Reference 1", "merchant_reference2": "Reference 2", "payment_status": "UNPAID", "expected_payments": [ [escape-left-curley-bracket] "payment_amount": 10000, "debtor": [escape-left-curley-bracket] "account_holder_name": "Max Mustermann", "iban": "DE43000000001234567890", "account_number": "000000001234567890", "bank_code": "00000000", "bic": "TESTDE20XXX", "bank_name": "Test Bank" } } ], "payments": [] } } ``` Merchant -> Klarna: Capture order Merchant -> Consumer: Ship goods if: Money received Consumer --> Klarna: Send money Klarna -> Merchant: Notification `payment_status=PAID` note ,: ``` [escape-left-curley-bracket] "event_type": "non_guaranteed_payment.updated", "event_id": "36d37496-681b-4359-a50b-d82af9a0f5b5", "occurred_at": "2024-02-08T22:10:21.351Z", "payload": [escape-left-curley-bracket] "order_id": "0df498a7-4d9d-4b7c-b1f7-64defb67c22c", "order_amount": 10000, "purchase_currency": "EUR", "created_at": "2024-02-07T13:23:44.000Z", "merchant_id": "K123456", "merchant_reference1": "Reference 1", "merchant_reference2": "Reference 2", "payment_status": "PAID", "expected_payments": [ [escape-left-curley-bracket] "payment_amount": 10000, "debtor": [escape-left-curley-bracket] "account_holder_name": "Max Mustermann", "iban": "DE43000000001234567890", "account_number": "000000001234567890", "bank_code": "00000000", "bic": "TESTDE20XXX", "bank_name": "Test Bank" } } ], "payments": [ [escape-left-curley-bracket] "payment_amount": 10000, "payment_received_at": "2024-02-08T21:50:18.224Z", "debtor": [escape-left-curley-bracket] "account_holder_name": "Max Mustermann", "iban": "DE43000000001234567890", "account_number": "000000001234567890", "bank_code": "00000000", "bic": "TESTDE20XXX", "bank_name": "Test Bank" } } ] } } ``` 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. ``` [escape-left-curley-bracket] "event_type": "non_guaranteed_payment.updated", "event_id": "46d37496-681b-4359-a50b-d82af9a0f5b5", "occurred_at": "2024-02-17T11:28:12.418Z", "payload": [escape-left-curley-bracket] "order_id": "0df498a7-4d9d-4b7c-b1f7-64defb67c22c", "order_amount": 10000, "purchase_currency": "EUR", "created_at": "2024-02-07T13:23:44.000Z", "merchant_id": "K123456", "merchant_reference1": "Reference 1", "merchant_reference2": "Reference 2", "payment_status": "CLOSED", "expected_payments": [ [escape-left-curley-bracket] "payment_amount": 10000, "debtor": [escape-left-curley-bracket] "account_holder_name": "Max Mustermann", "iban": "DE43000000001234567890", "account_number": "000000001234567890", "bank_code": "00000000", "bic": "TESTDE20XXX", "bank_name": "Test Bank" } } ], "payments": [] } } ``` 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