# Checkout Enablement

{% hint style="info" %}
Not following these best practices may result in customers having an impacted experience if something goes wrong in XCE or a downstream dependancy.
{% endhint %}

Some partners may wish to prevent the user from continuing through the checkout journey until they have selected an option for XCover protection.

Because XCE is a third party dependency, we do not want to adversely affect the customer checkout journey. To that end, we strongly recommend that partners integrate our widget using the following practices:

* Use `onSet` promise in the set signal layer to wait for a response and control the user experience after.
* If `onSet` promise resolves then we can disable the Checkout Button to wait for users to select an insurance option from the widget.
* If `onSet` promise catches an error then we shouldn't disable the Checkout Button to avoid affecting the user checkout flow.\
  **Note**: Any time the request fails you can expect `onSet` to throw an error so you can catch it and react to it.
* If the `onSet` is never called that means there was an issue loading the script. As long as the Checkout Button is enabled by default this should not cause an issue.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://partner-docs.covergenius.com/xcover-elements/client-integration/checkout-enablement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
