26 July 2026 · Checkout
Checkout API Shopify: what developers need to know
The Shopify checkout API is a set of developer tools that let you build and manage checkout experiences outside the standard Shopify checkout flow. It is used for custom storefronts, headless commerce, and apps that need to create or manipulate checkouts programmatically.
Short answer: the checkout API is powerful but not a way to bypass Shopify's secure payment processing. It is best for headless storefronts, custom carts, and B2B flows. For subscriptions, the API can create checkouts, but recurring billing still needs a backend engine like Checkivo on Stripe. Related: Checkout extensions Shopify and Shopify Plus custom checkout.
What the Shopify checkout API is
Shopify provides several APIs related to checkout. The most relevant are the Storefront API, the Admin API, and the Checkout API itself. These allow developers to create carts, apply discounts, set shipping rates, and redirect customers to a secure checkout or payment completion step.
The Storefront API is used for headless storefronts. It lets you build a custom frontend while still using Shopify's backend for products, inventory, and checkout. The Admin API is used for back-office operations, such as creating draft orders or managing checkouts.
These APIs are REST or GraphQL based and require authentication and appropriate permissions.
Types of checkout APIs
Shopify's checkout-related APIs include:
Storefront API. For building custom storefronts and carts that connect to Shopify checkout.
Checkout API. For creating and managing web checkouts, often used with the Storefront API.
Admin API. For managing orders, draft orders, and checkout data from the back end.
Shopify Functions. Server-side logic for discounts, delivery, and payments at checkout.
Each API has a specific role. Using the right one for the right task is critical for performance and security.
When to use the checkout API
The checkout API is useful when:
You are building a headless storefront with a custom frontend.
You need to create checkouts from a mobile app or kiosk.
You are building a B2B portal with custom pricing and checkout flow.
You want to pre-fill checkout data from another system.
You are integrating Shopify with a custom POS or sales tool.
For most standard Shopify stores, the built-in checkout is sufficient and more secure than a custom API-based checkout.
What the checkout API cannot do
The checkout API does not let you bypass Shopify's payment processing. You cannot collect credit card details directly through the API unless you use a certified payment integration. The actual payment step is still handled by Shopify or a supported payment provider.
You also cannot use the checkout API to remove required checkout fields, change core tax logic, or skip compliance steps. Shopify's checkout rules apply regardless of how the checkout is created.
Headless checkout with the API
Headless commerce means the frontend and backend are separate. The checkout API lets a custom frontend send cart data to Shopify and receive a checkout URL or token. The customer then completes payment through Shopify's secure checkout.
This approach is common for brands that want a highly customized website experience while still relying on Shopify's reliable backend. It requires developers, hosting, and ongoing maintenance.
Draft orders and the API
The Admin API can create draft orders, which are useful for custom quotes, B2B sales, and phone orders. A draft order can be sent to the customer as an invoice, and they complete payment through Shopify checkout.
Draft orders are often easier than building a full custom checkout. They give you control over pricing and line items while keeping payment within Shopify's secure environment.
Checkout API and subscriptions
The checkout API can create orders that include subscription lines, but the recurring billing logic must be handled by a subscription engine. Shopify's native subscriptions and subscription apps provide this backend.
Checkivo provides a Stripe-based subscription engine that works alongside Shopify. The checkout API can create the initial order, and Checkivo manages renewals, dunning, and plan changes.
Security and compliance
Building with the checkout API requires attention to security. You must handle API tokens carefully, validate customer input, and never expose sensitive credentials. Any custom checkout must comply with PCI standards and local consumer protection laws.
If you are not experienced with payment security, use Shopify's hosted checkout rather than building your own. The risk of handling payment data incorrectly is high.
Common checkout API mistakes
Developers often assume the checkout API gives them full control over the payment experience. It does not. Payment processing still requires Shopify or a certified payment provider. Trying to collect card data directly creates compliance risks.
Another mistake is using the wrong API for the job. The Storefront API is for customer-facing storefronts. The Admin API is for back-office tasks. Using the Admin API for frontend checkout can create performance and security issues.
A third mistake is not handling API rate limits and errors. Checkout is a high-stakes flow. If the API fails, the customer cannot buy. Build retry logic and clear error handling.
Checkout API implementation checklist
Before building with the checkout API:
Confirm the API supports your use case.
Choose the right API: Storefront, Admin, or Checkout.
Secure API keys and never expose them in client code.
Plan payment handling through Shopify or a certified provider.
Handle rate limits, errors, and retries.
Test the full checkout flow on real transactions.
Key takeaways
The Shopify checkout API is powerful for custom storefronts and headless commerce, but it does not replace Shopify's secure payment processing. For subscriptions, use the API to create checkouts and Checkivo to manage recurring billing.
Examples of checkout API use
Here are three real-world examples of when developers use the checkout API:
Custom mobile app. A fashion brand has a mobile app built with React Native. The app uses the Storefront API to display products and the checkout API to create a cart. The customer is redirected to Shopify's secure checkout to complete payment.
B2B portal. A wholesale business has a portal where customers see custom pricing. The portal uses the Admin API to create draft orders with negotiated prices. Customers receive an invoice and pay through Shopify checkout.
Pop-up store. A merchant uses a kiosk at events. The kiosk uses the Storefront API to create checkouts for in-person purchases. Inventory and orders sync back to Shopify in real time.
These examples show that the checkout API is a backend tool, not a customer-facing checkout replacement.
When not to use the checkout API
Avoid the checkout API if you are running a standard Shopify store with a theme. The built-in checkout is more secure, compliant, and easier to maintain. Use the API only when you genuinely need a custom frontend or integration.
Also avoid the API if you do not have a developer who understands payment security. Handling checkout incorrectly can create serious compliance and financial risks.
Frequently asked questions
What is the Shopify checkout API?
It is a set of APIs that let developers create and manage checkout experiences programmatically, often for headless or custom storefronts.
Can I use the checkout API to build a custom checkout?
Yes, but payment processing still goes through Shopify or a supported provider. You cannot bypass Shopify's secure payment frame.
Do I need Shopify Plus for the checkout API?
Some advanced features require Plus. Basic Storefront and Admin API usage is available on most plans.
Is the checkout API the same as Shopify Payments?
No. The checkout API creates the checkout. Shopify Payments is the payment processor.
Can I use the checkout API for subscriptions?
Yes for the initial checkout, but recurring billing needs a subscription engine.
What is the Storefront API used for?
It is used to build custom storefronts that connect to Shopify's backend for products, carts, and checkout.
Can I collect credit cards through the checkout API?
No, unless you are using a certified payment integration and meet PCI compliance requirements.
What are draft orders?
Draft orders are custom orders created through the Admin API, often used for quotes, B2B, and phone orders.
How does Checkivo work with the checkout API?
Checkivo can handle the subscription backend while the checkout API creates the initial order or checkout.
Should I use the checkout API for a standard Shopify store?
Usually not. The standard Shopify checkout is more secure and easier to maintain for most merchants.
Can I use the checkout API with any Shopify plan?
Basic API access is available on most plans. Advanced features may require Plus.
Is the checkout API free?
API usage is included in your Shopify plan, but custom development has its own cost.
Can the checkout API create orders without payment?
It can create draft orders and checkouts, but completed orders require payment.
Do I need a developer for the checkout API?
Yes, for most custom implementations. Some apps handle the complexity for you.