summaryrefslogtreecommitdiff
path: root/articles/ui/figs/bitcoin.pml
blob: 88707cda1aefa4b9674bd909c07e689a862cb5dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# FROM: https://github.com/w3c/webpayments/tree/gh-pages/PaymentFlows

@startuml
!includeurl https://raw.githubusercontent.com/w3c/webpayments/gh-pages/PaymentFlows/skin.ipml

Database "Invoice Database" as DB
Participant "Payee Website" as Website
Database "Bitcoin Network" as Bitcoin
Participant "Payer Wallet" as Wallet
Actor "Payer (Browser)" as Payer

title Bitcoin Payment Protocol (BIP70)

Payer->Website: Request checkout with Bitcoin
Website->Website: Generate Bitcoin address
Website->DB: Store invoice details
Website->Payer: Basket Page with bitcoin: pay link
Payer->Payer: Click bitcoin: link
Payer->Wallet: Wallet handles bitcoin: URL and extracts invoice URL
Wallet->Website: Request invoice
Website->DB: Get invoice details
Website->Website: Create PaymentDetails (Amount, Memo, Ref#, Pay URL)
Website->Website: Create PaymentRequest (Signed PaymentDetails)
Website->Wallet: PaymentRequest containing PaymentDetails
Wallet->Payer: Confirm payment details?
Payer->Wallet: Accept payment
Wallet->Wallet: Generate and sign payment
Wallet->Website: Signed payment
Website->Bitcoin: Submit payment
Website->Wallet: Payment ACK
Wallet->Payer: Confirm payment is complete
loop until payment is confirmed
    Bitcoin->Website: Latest confirmed transactions
end


@enduml