Target APIs
When you build a checkout UI extension, Shopify automatically provides you with specific APIs based on where your extension runs within checkout. This ensures extensions receive exactly the data and functionality they need for their particular use case, while maintaining security and performance.
Your target determines which APIs you receive because different locations in checkout require different capabilities.
Anchor to Checkout APIsCheckout APIs
Checkout APIs provide access to checkout-specific data and functionality for extensions running in the checkout flow. These APIs let you interact with addresses, cart lines, costs, delivery options, discounts, and payment information to build custom checkout experiences.
| Name | Description |
|---|---|
| Addresses API | Access and manage shipping and billing addresses during checkout. |
| Attributes API | Read and modify custom cart and checkout attributes using |
| Buyer Identity API | Retrieve buyer identity information, including customer details, email, phone, and purchasing company data. |
| Buyer Journey API | Control checkout flow progression, block buyer progress with validation errors, and subscribe to step changes and completion events. |
| Cart Instructions API | Check checkout capabilities before making changes, such as whether discount codes, attributes, or cart lines can be updated. |
| Cart Lines API | Read and modify cart line items, including adding, removing, and updating products and quantities using |
| Checkout Token API | Access the unique token for the current checkout session. |
| Cost API | Retrieve checkout cost breakdowns, including subtotals, taxes, shipping, and total amounts. |
| Customer Privacy API | Read customer privacy consent settings for marketing, analytics, and third-party sale opt-in preferences. |
| Delivery API | Access delivery groups, shipping options, pickup points, and pickup location data. |
| Discounts API | Read applied discounts and manage discount codes using |
| Gift Cards API | Retrieve applied gift card information and apply gift card changes during checkout. |
| Localized Fields API | Read localized field values for the checkout. |
| Note API | Read and modify the note or special instructions attached to a checkout. |
| Order API | Access order confirmation details on the Thank you page, including order name, ID, and status. |
| Payments API | Read available and selected payment options during checkout. |
Anchor to Platform APIsPlatform APIs
Platform APIs provide cross-cutting functionality available to all checkout UI extensions regardless of their target. These APIs let you localize content, track analytics, authenticate requests to your backend, access merchant settings, and query the Storefront API.
| Name | Description |
|---|---|
| Analytics API | Publish analytics events to web pixels and submit visitor information to the shop backend. |
| Extension API | Access extension metadata, including the extension's handle, capabilities, and editor settings. |
| Localization API | Localize your extension with translation utilities, currency formatting, and buyer language, country, and timezone context. |
| Metafields API | Read app metafields on any target, and write metafield changes on |
| Session Token API | Retrieve signed JWT session tokens for authenticating requests to your app's backend server. |
| Settings API | Access merchant-configured settings defined in your extension's configuration file. |
| Shop API | Access shop information like the store name and domain. |
| Storage API | Persist key-value data locally within the buyer's browser for your extension. |
| Storefront API | Query the Storefront API for product, collection, and metaobject data. |