Diagram Desk

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

Shop serverPayment gatewayCard issuerPayPayment requestAuthorisation requestAuthorisation resultPayment doneOrder confirmationBuyer
Sequence diagram · 4 shapes

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

ShapeSymbolConnections
BuyerActor→ Shop server(Pay) · ← Shop server
Shop serverParticipant and lifeline→ Payment gateway(Payment request), Buyer(Order confirmation) · ← Buyer, Payment gateway
Payment gatewayParticipant and lifeline→ Card issuer(Authorisation request), Shop server(Payment done) · ← Shop server, Card issuer
Card issuerParticipant and lifeline→ Payment gateway(Authorisation result) · ← Payment gateway

Symbols used here

SymbolMeaning
Participant and lifelineA box on top and a dashed line below.
ActorA human participant; a stick figure.
Synchronous messageA call that waits; solid line, filled head.
ReplyThe answer; dashed line, open head.
Asynchronous messageSent without waiting; solid line, open head.

All sequence diagram symbols and how to draw

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

More sequence diagram examples

All SeewolLabs tools