TBD54566975 / tbdex

56 stars 25 forks source link

programmatic handling of orderinstructions message #359

Open jiyoontbd opened 1 month ago

jiyoontbd commented 1 month ago
          > hmm, programmatically, how do you envision a wallet app handling order instructions? Present the text from the message to the user? Then what? How does the Wallet know once those instructions have been executed? Do they wait for the PFI to provide an `OrderStatus` or `Close`?

orderinstructions contains payin and payout, with link and/or instruction fields

if there's a payment link that alice needs to navigate to in order to fulfill payin, the payin object of orderinstructions should be populated. once the payment is done, the wallet should detect completion and redirect back to the wallet view where alice is now waiting for PFI to confirm that her payin has been received, and PFI will initiate payout.

cc-ing @ethan-tbd for how didpay accommodated redirect after payin was completed

Originally posted by @jiyoontbd in https://github.com/TBD54566975/tbdex/issues/355#issuecomment-2261005198

ethan-tbd commented 1 month ago

as of today, didpay has only implemented support for the payment link order instructions. this still needs to be documented in the spec clearly, but didpay knows when the payment link has been executed when it sees a finish.html in the url of the payment link