Checkout Lifecycle
Checkout Expiration and Deletion
To avoid overloading the database, unfinished and unpaid checkouts are automatically deleted after a specified period from their last modification:
- checkouts without lines after 6 hours,
- anonymous checkouts (neither user nor email is set) with lines after 30 days,
- user checkouts (either user or email is set) with lines after 90 days.
Releasing Funds for Abandoned Checkouts
This flow is only related to the checkouts processed with Saleor App.
The payments for items left in the cart by a customer who did not complete the purchase will be refunded to the customer's account.
Abandoned checkout is the checkout that hasn't been changed in a specific period. The TTL is controlled by the environment variable: CHECKOUT_TTL_BEFORE_RELEASING_FUNDS, a default set to 6 hours.
For any transactionItem with processed funds (authorizedAmount
or chargeAmount
) assigned to abandoned checkout, Saleor will trigger the release action.
The release action is:
- webhook with the event:
TRANSACTION_CANCELATION_REQUESTED
triggered when transactionItem contains authorized funds - webhook with the event:
TRANSACTION_REFUND_REQUESTED
triggered when transactionItem contains charged funds.
Release action is triggered only once. In case of a missing subscription for a release event or failure in processing the action by app. The release action needs to be handled manually.
To fetch paid checkouts, use the below query:
{
checkouts(first: 10, filter: { authorizeStatus: [PARTIAL, FULL] }) {
edges {
node {
totalBalance {
amount
}
}
}
}
}