# Checkout Token The API for interacting with the token of a checkout. ## StandardApi The base API object provided to `purchase` extension targets. ### Docs_Standard_CheckoutTokenApi ### checkoutToken value: `StatefulRemoteSubscribable` A stable ID that represents the current checkout. Matches the `token` field in the [WebPixel checkout payload](https://shopify.dev/docs/api/pixels/customer-events#checkout) and the `checkout_token` field in the [REST Admin API `Order` resource](https://shopify.dev/docs/api/admin-rest/unstable/resources/order#resource-object). ## Related - [Targets](https://shopify.dev/docs/api/checkout-ui-extensions/targets) - [Components](https://shopify.dev/docs/api/checkout-ui-extensions/components) - [Configuration](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) - [Tutorials](/apps/checkout) ## useCheckoutToken Returns a stable id that represents the current checkout. ### UseCheckoutTokenGeneratedType A stable id that represents the current checkout. Matches the `token` field in the [WebPixel checkout payload](https://shopify.dev/docs/api/pixels/customer-events#checkout) and the `checkout_token` field in the [Admin REST API Order resource](https://shopify.dev/docs/api/admin-rest/unstable/resources/order#resource-object). #### Returns: CheckoutToken | undefined export function useCheckoutToken< Target extends RenderExtensionTarget = RenderExtensionTarget, >(): CheckoutToken | undefined { return useSubscription(useApi().checkoutToken); } ## Related - [Targets](https://shopify.dev/docs/api/checkout-ui-extensions/targets) - [Components](https://shopify.dev/docs/api/checkout-ui-extensions/components) - [Configuration](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) - [Tutorials](/apps/checkout)