Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout flow #677

Closed
6 tasks done
raducristianpopa opened this issue Aug 31, 2023 · 0 comments
Closed
6 tasks done

Checkout flow #677

raducristianpopa opened this issue Aug 31, 2023 · 0 comments
Labels
type: story Main story with multiple subtasks

Comments

@raducristianpopa
Copy link
Member

raducristianpopa commented Aug 31, 2023

Frontend

Backend

Shared

Flow example:

sequenceDiagram
    Commerce FE ->>+ Commerce BE: Pay with Open Payments
    Commerce BE ->> Testnet Rafiki Auth: OP Client: Grant Request for IP
    Testnet Rafiki Auth ->> Commerce BE: Returns: <br /> - accessToken
    Commerce BE ->> Testnet Rafiki Backend: Create IP with accessToken
    Commerce BE ->> Testnet Rafiki Auth: Grant Request for Quote
    Testnet Rafiki Auth ->> Commerce BE: Returns: <br/> - accessToken <br /> - continueToken <br /> - continueId
    Commerce BE ->> Testnet Rafiki Backend: Create Quote with accessToken
    Testnet Rafiki Backend ->> Commerce BE: Returns: <br /> - quoteId <br /> - sendAmount <br /> - receiveAmount
    Commerce BE ->> Testnet Rafiki Backend: Grant Request for OP with: <br /> - sendAmount and receiveAmount <br /> - interaction (this should point to https://rafiki.money/interaction)
    Testnet Rafiki Backend ->> Commerce BE: Returns the interact URL
    Commerce BE ->>- Commerce FE: Give the interact URL to the client
    Commerce FE ->> Wallet FE: Redirect to wallet FE to accept or reject
    Wallet FE ->> Commerce FE: Redirect and add the `interactRef` (query param?)
    Commerce FE ->>+ Commerce BE: Send the interactRef
    Commerce BE ->> Testnet Rafiki Auth: Continuation request with the given interactRef
    Testnet Rafiki Auth ->> Commerce BE: Returns accessToken
    Commerce BE ->> Testnet Rafiki Backend: Create OP (quoteId is needed)
    Testnet Rafiki Backend ->> Commerce BE: Returns OP details
    Commerce BE ->>- Commerce FE: Redirect to success page

Loading
@raducristianpopa raducristianpopa added the type: story Main story with multiple subtasks label Aug 31, 2023
@raducristianpopa raducristianpopa added this to the September Milestones milestone Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: story Main story with multiple subtasks
Projects
Status: Done
Development

No branches or pull requests

1 participant