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

Add more info about possible checkout flows #984

Open
witoszekdev opened this issue Oct 13, 2023 · 0 comments
Open

Add more info about possible checkout flows #984

witoszekdev opened this issue Oct 13, 2023 · 0 comments
Labels

Comments

@witoszekdev
Copy link
Member

witoszekdev commented Oct 13, 2023

Here's a paragraph from our docs:

Payment Apps support two distinct ways of processing checkouts:

  • first payments, then order
  • first order, then payments

Source

We should add more information about how to handle each flows in order to allow our customers to choose better strategy for their business. Customers might also choose to switch between strategies based on their traffic (e.g. enable first order, then payment during intensive sales period or vice versa)

First payment, then order

Benefits:

  • avoids stock allocation for fraudulent orders (e.g. created by bots, malicious actors during promotion period), requires immediate payment
  • customer support isn't spammed by unpaid orders

Info:

  • order can be completed once the transactions fully covers order.total and Payment App returned CHARGE_SUCCESS / AUTHORIZATION_SUCCESS or CHARGE_REQUEST / AUTHORZATION_REUEST
    • The chargedAmount / chargePendingAmount / authorizationAmount / authorizationPendingAmount is taken into consideration
  • requires additional Checkout App that will convert paid checkouts into orders in case customer doesn't make the checkoutComplete mutation (internet loss, etc.)
  • stock issues can be resolved with Stock reservations

Potential problems:

  • what happens when the user doesn't make checkoutComplete mutation due to Internet issues?
  • what happens when the user has paid for the checkout, but stock is no longer available?

Downsides:

  • requires additional app to handle paid checkouts, not converted to an order
  • worse UX: money can be locked for some time, and later you find out that the stock is already gone
  • customer support needs to take care of checkouts that have been paid but couldn't have been converted into an order due to:
    • missing stock
    • partial payment
    • some other problems
  • customer support doesn't have the ability to contact customer and resolve payment issues

First order, then payment

Benefits:

  • every order made by customer is always recorded as an order
  • better UX: you can safely make a payment, not wondering about stock allocation during promotions
  • no need for additional app

Potential problems:

  • Saleor won't automatically cancel orders that have a Transaction attached, which means that in some cases order won't be paid for a longer period of time (e.g. Payment App marks the transaction as failed only after 24h) even if the expiration is shorter
    • In such cases, an additional app might still be required to handle all business logic

Downsides:

  • additional work for customer support
    • more orders visible in dashboard, that might never be completed
    • resolving orders that cannot be shipped: partial payment, transaction not completed
  • potential spamming of orders that lock stock (due to stock allocation)
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