Skip to content

Commit

Permalink
Extend automatic checkout completion with info that the checkout will…
Browse files Browse the repository at this point in the history
… not be completed if any validation error occurs (saleor#1375)

* Extend automatic checkout completion with info that the checkout will not be completed if any validation error occures

* Apply code review suggestions
  • Loading branch information
IKarbowiak authored Oct 29, 2024
1 parent 3ef868c commit 0be723f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/developer/payments/transactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,22 @@ Query variables:
}
```

:::warning
If any issues occur during checkout validation, the checkout will not be completed.
The checkout does not pass the validation when:
- contains unavailable items:
- one of the checkout line has missing product or variant channel listing or the price is not set;
- one of the product is not available for purchase;
- one of the product is set as not visible to the customers;
- billing address is not set;
- attached voucher is not applicable;
- attached gift card is not valid;
- shipping method is invalid;
- channel is inactive.

You can view the specific issues using the `Checkout.problems` query. For more details, please refer to the [Checkout Problems page](/developer/checkout/problems).
:::

:::danger
**Once this setting is enabled, you should verify if your connected services, including storefront, can handle this flow.**

Expand Down
8 changes: 8 additions & 0 deletions docs/upgrade-guides/core/3-19-to-3-20.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ If automatic checkout completion is not enabled in a `Channel`, storefront shoul
```
:::

:::tip
The checkout may not be automatically completed due to issues that arise during validation.

You can identify any existing problems using the `Checkout.problems` query.
For more information, refer to the [Checkout Problems page](/developer/checkout/problems).

:::

:::tip
To determine if `Checkout` was completed you can also rely on response from `transactionInitialize` or `transactionProcess` mutations by checking the `TransactionEvent` object returned in the mutation response.

Expand Down

0 comments on commit 0be723f

Please sign in to comment.