Online payment sequence diagram
From the pay button through the payment gateway and card issuer to approval. The result notification is drawn as an async message.
The diagram
Reading it step by step
- 1. 'Buyer' sends a request to 'Shop server': 'Pay'.
- 2. 'Shop server' sends a request to 'Payment gateway': 'Payment request'.
- 3. 'Payment gateway' sends a request to 'Card issuer': 'Authorisation request'.
- 4. 'Card issuer' replies to 'Payment gateway': 'Authorisation result'.
- 5. 'Payment gateway' replies to 'Shop server': 'Payment done'.
- 6. 'Shop server' notifies 'Buyer': 'Order confirmation'.
Shape by shape
| Shape | Symbol | Connections |
|---|---|---|
| Buyer | Actor | → Shop server(Pay) · ← Shop server |
| Shop server | Participant and lifeline | → Payment gateway(Payment request), Buyer(Order confirmation) · ← Buyer, Payment gateway |
| Payment gateway | Participant and lifeline | → Card issuer(Authorisation request), Shop server(Payment done) · ← Shop server, Card issuer |
| Card issuer | Participant and lifeline | → Payment gateway(Authorisation result) · ← Payment gateway |
Symbols used here
| Symbol | Meaning |
|---|---|
| Participant and lifeline | A box on top and a dashed line below. |
| Actor | A human participant; a stick figure. |
| Synchronous message | A call that waits; solid line, filled head. |
| Reply | The answer; dashed line, open head. |
| Asynchronous message | Sent without waiting; solid line, open head. |
Diagram text
Paste this text into the editor to get the same picture, then change the names to fit your own work.
# Online payment sequence diagram
sequenceDiagram
actor C as Buyer
participant M as Shop server
participant P as Payment gateway
participant K as Card issuer
C->>M: Pay
M->>P: Payment request
P->>K: Authorisation request
K-->>P: Authorisation result
P-->>M: Payment done
M-)C: Order confirmation