The API for interacting with the token of a checkout.
The base API object provided to `purchase` extension targets.
A stable ID that represents the current checkout. Matches the `token` field in the [WebPixel checkout payload](/docs/api/pixels/customer-events#checkout) and the `checkout_token` field in the [REST Admin API `Order` resource](/docs/api/admin-rest/unstable/resources/order#resource-object).
string
Returns a stable id that represents the current checkout.
A stable id that represents the current checkout. Matches the `token` field in the [WebPixel checkout payload](/docs/api/pixels/customer-events#checkout) and the `checkout_token` field in the [Admin REST API Order resource](/docs/api/admin-rest/unstable/resources/order#resource-object).
export function useCheckoutToken< Target extends RenderExtensionTarget = RenderExtensionTarget, >(): CheckoutToken | undefined { return useSubscription(useApi<Target>().checkoutToken); }
string