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: Brite - Play order: Customer, Brite Client, Merchant, Brite _: **1. Display Brite's Assets** (Brite and bank logos) note: Go to [swimlanes for Brite's Assets](https://swimlanes.io/u/TfVopPMotO) _: **2. Merchant authorisation** note: Go to [swimlanes for Merchant Authorisation](https://swimlanes.io/u/knxhtrUHAW) _: **3. Create an Instant Payment session** Merchant -> Brite: Create deposit call `POST /session.create_deposit` ...: {fas-spinner} Render the Brite client and let the customer complete the payment steps. Brite -> Merchant: Notification to `callback[session_state=2].url` Merchant --> Brite: `HTTP 200` note_: Notification about a change in session state with `session_id` Merchant -> Brite: `POST /session.get` with `session_id` from the notification Brite --> Merchant: Response with session details note_: The merchant should store the `customer_id` from this notification, as this is the customer that is meant to authenticate and complete the payment. _: **4. Fetch KYC data** Merchant -> Brite: `POST /kyc.create` with `customer_id` Brite --> Merchant: HTTP 200 Merchant -> Brite: `POST /kyc.get` Brite --> Merchant: HTTP 200 _: **5. Session approval** Merchant -> Merchant: Verify customer note_: **Verficiation of customer** Verify if the customer is eligable to continue the session. You can check the data returned by Brite as part of the kyc.get response. For instance, `firstname` and `lastname`, `dob` or `address.country_id`. if: If you APPROVE the session Merchant -> Brite: `POST /session.approve` ...: {fas-spinner} Customer completes the payment if: Notification with `session_state: 12` (`STATE_COMPLETED`) // Handle the notification Brite -> Merchant: Notification `POST /callback?kyc=true&order_id=ORD-12345-ABC` Merchant --> Brite: Confirm the notification with `HTTP 200` Merchant -> Brite: Fetch session details with `session_id` Brite --> Merchant: Response with session details Merchant -> Merchant: Create customer profile end else: Merchant REJECTS session Merchant -> Brite: `POST /session.reject` note_: If you reject the session, it will immediately display a general message to the customer that they can’t continue the session. The customer has only the option to close the Brite client. Brite --> Merchant: Notification to `callback[session_state=10].url` end