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

Describe when checkoutComplete mutation might fail and how to deal with that #990

Open
witoszekdev opened this issue Oct 18, 2023 · 0 comments
Labels

Comments

@witoszekdev
Copy link
Member

Our customers have issue with checkoutComplete mutation that causes them to have Checkouts with payments that have not been converted to an Order because the checkoutComplete mutation has failed for some reason.

Saleor docs should describe when the mutation can fail and how to mitigate the issue in the storefront implementation

Example cases:

  • Customer has not returned from a redirect: internet issue / closed tab
    • Mitigation: storefront should complete the order immediately after transactionInitialize or transactionProcess succeeds
    • Customer support must manually look through a list of checkouts with chargeStatus
query {
  checkouts(filter: {chargeStatus: [PARTIAL, FULL, OVERCHARGED]}) {
    # ...
  }
}

Note
Dashboard must implement firstly this issue: saleor/saleor-dashboard#4279

  • Customer might want to implement a custom app that will automatically convert a Checkout to an Order based on CHECOUT_FULLY_PAID async webhook

Note
Even if the checkout was already cnverted to an order the checkoutComplete mutation on storefront will return the id of newly created order

  • Customer has clicked "Pay" multiple times and the Checkout has multiple transactions
    • Solution: storefront should check if the order is already paid before running transactionInitialize mutation
  • The item is no longer available, stock has run out
    • Solution: the store should use stock reservations
    • If stock reservation has run out, there should be a process to refund the customer (either manually on the checkouts list page or an app that does that automatically)
@korycins korycins removed their assignment Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants