The generateCartUrl API lets you, as a developer, build a multi-product checkout experience where buyers can purchase multiple products — courses, communities, digital downloads, and more — in a single transaction, processed through Thinkific's Performance Checkout.
The guide walks through how to set up a multi-item checkout experience using the generateCartUrl API.
Applies to:
- Plan: Plus
- Requires: TCommerce: Powered by Thinkific Payments
How Multi-Item Checkout Works
By default, Thinkific's built-in checkout allows users to purchase products only one at a time. However, with the generateCartUrl API, you can build the experience that would allow your learners to purchase multiple products at the same time.
Here's how it works:
- You build a cart experience on your custom storefront where buyers select products.
- When a buyer is ready to check out, you call the
generateCartUrlGraphQL mutation with a list of products, quantities, optional pricing, and an optional coupon code. - Thinkific returns a single checkout URL, which you redirect the buyer to.
- The buyer completes one payment through Thinkific's Performance Checkout.
- Once payment is confirmed, Thinkific automatically enrolls the buyer in every product purchased and fires order webhook events.
To reconcile purchases with your own systems, attach a custom reference ID to the cart when generating the URL — it is included in Thinkific webhook payloads when the order completes. If multiple seats were purchased for a product, the transaction is treated as a Group Order.
Getting Started
Before implementing, you'll need an active API Access Token or OAuth 2.0 application and familiarity with Thinkific's GraphQL API. The key mutation is generateCartUrl — the full schema, required parameters, and example payloads are in the developer documentation.
- Authorization
- GraphQL API Introduction
-
Apollo Explorer — interactive schema explorer for Thinkific GraphQL API (including the
generateCartUrlAPI) and query builder
Tracking Orders
Multi-item cart transactions fire the same webhook events as standard orders. Subscribe to these topics to sync purchase activity with your own systems.
To track orders, you can optionally attach your own reference ID to each cart, which is included in Thinkific webhook events (order.created and order_transaction.succeeded) when the order completes. This makes it straightforward to reconcile purchases with records in your own systems.
Learn more here: Webhooks Documentation.
Important Considerations
- Subscription and payment plan products are not supported. Carts built using
generateCartUrlcan only include products with a free or one-time purchase price. - Order bumps cannot be included in carts generated using
generateCartUrl. - This is an API-first solution that requires a custom storefront. A native multi-product checkout for pages hosted on Thinkific is not yet available.
- API Key authentication is not supported for the GraphQL API. Use an API Access Token or OAuth 2.0. See: Authorization.
- When multiple seats are purchased for a product, the order is treated as a Group Order — the buyer can distribute seats via invite link or enroll recipients directly. Learn more: Group Orders.
Frequently Asked Questions
Can I define prices in the API instead of pre-configuring them in Thinkific?
Yes. When calling generateCartUrl, you can either reference prices already set up in your Thinkific admin or define prices directly through the API. This gives you flexibility to build pricing experiences on your custom pages without being constrained by what is pre-configured in Thinkific.
What happens if the coupon code I apply isn't valid for the cart contents?
The code is silently ignored and checkout proceeds normally. No error is returned and the buyer is not notified. Validate coupon applicability in your own system before applying it to the cart URL if you need to surface errors to buyers earlier in the flow.
Related Articles
- Prerequisites: Authorization
- Prerequisites: GraphQL API Introduction
- Related: Webhooks Documentation
- Related: Group Orders
- Learn more: Apollo Explorer