bitcoin.pml (1279B)
1 # FROM: https://github.com/w3c/webpayments/tree/gh-pages/PaymentFlows 2 3 @startuml 4 !includeurl https://raw.githubusercontent.com/w3c/webpayments/gh-pages/PaymentFlows/skin.ipml 5 6 Database "Invoice Database" as DB 7 Participant "Payee Website" as Website 8 Database "Bitcoin Network" as Bitcoin 9 Participant "Payer Wallet" as Wallet 10 Actor "Payer (Browser)" as Payer 11 12 title Bitcoin Payment Protocol (BIP70) 13 14 Payer->Website: Request checkout with Bitcoin 15 Website->Website: Generate Bitcoin address 16 Website->DB: Store invoice details 17 Website->Payer: Basket Page with bitcoin: pay link 18 Payer->Payer: Click bitcoin: link 19 Payer->Wallet: Wallet handles bitcoin: URL and extracts invoice URL 20 Wallet->Website: Request invoice 21 Website->DB: Get invoice details 22 Website->Website: Create PaymentDetails (Amount, Memo, Ref#, Pay URL) 23 Website->Website: Create PaymentRequest (Signed PaymentDetails) 24 Website->Wallet: PaymentRequest containing PaymentDetails 25 Wallet->Payer: Confirm payment details? 26 Payer->Wallet: Accept payment 27 Wallet->Wallet: Generate and sign payment 28 Wallet->Website: Signed payment 29 Website->Bitcoin: Submit payment 30 Website->Wallet: Payment ACK 31 Wallet->Payer: Confirm payment is complete 32 loop until payment is confirmed 33 Bitcoin->Website: Latest confirmed transactions 34 end 35 36 37 @enduml