This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.
An order created for a subscription holds the items and prices of one billing cycle. The subscription contract holds the terms future cycles are charged with, including changes made after checkout. For example, a fulfillment app may want to show the items and quantities the buyer will receive next.
To retrieve the subscription terms behind a recurring order:
Call Get Order to retrieve the order.
In the order's lineItems, find the line items that have subscriptionInfo. Save subscriptionInfo.id.
Call Get Subscription Contract and specify the saved subscriptionInfo.id as subscriptionContractId.
Read the current terms from the subscription contract's lineItems, subscriptionSettings, and recipientInfo.
Optionally, to retrieve the other orders created from the same subscription contract, call Search Orders with a filter on lineItems.subscriptionInfo.id. For example:
A buyer can check out with several subscription items at once. The checkout creates a subscription contract for each group of items that are billed together, so 1 order can hold line items from several subscription contracts. For example, a fulfillment app may want to set up a recurring shipment for each subscription the buyer bought.
To retrieve the subscriptions created at checkout:
Call Get Order to retrieve the checkout order.
In the order's lineItems, save each distinct subscriptionInfo.id. Line items with the same subscriptionInfo.id belong to the same subscription contract.
Call Query Subscription Contracts with a filter on id that holds the saved IDs, and cursorPaging.limit set to 100. For example:
While pagingMetadata.hasNext is true, call Query Subscription Contracts again with cursorPaging.cursor set to pagingMetadata.cursors.next.
For each subscription contract you retrieved, set up the recurring shipment with the billing schedule in subscriptionSettings and the items in lineItems.
A support agent helping a buyer needs to see every subscription the buyer has and what each one includes. For example, a customer support app may want to show the agent each subscription's items, billing schedule, and price.
To list all subscriptions of a buyer:
Get the buyer's contact ID. For example, call Get Order with one of the buyer's orders, and save buyerInfo.contactId.
Call Query Subscription Contracts with a filter on buyerInfo.contactId, and cursorPaging.limit set to 100. For example:
The results also include subscriptions that ended, because a subscription contract isn't deleted when its subscription ends.
While pagingMetadata.hasNext is true, call Query Subscription Contracts again with cursorPaging.cursor set to pagingMetadata.cursors.next.
Show the agent each subscription contract's subscriptionTitle, lineItems, subscriptionSettings, and priceSummary.
Optionally, to show the orders of a subscription, call Search Orders with a filter on lineItems.subscriptionInfo.id set to the subscription contract's id.
An external system, such as an ERP or a fulfillment service, may keep its own copy of each subscription contract. The copies must stay current as buyers check out and as changes from draft subscription contracts are committed. Start listening to events before you import, so changes made during the import aren't missed.
To listen for changes:
revision in the event is higher than your copy's, save the subscription contract from the event.changes, which holds the line items, discounts, and additional fees that were added, changed, or removed, and reason.To import the existing subscription contracts:
cursorPaging.limit set to 100. Save each subscription contract in your system, unless an event already saved a copy with the same or a higher revision.pagingMetadata.hasNext is true, call Query Subscription Contracts again with cursorPaging.cursor set to pagingMetadata.cursors.next, and save the results the same way.Last updated: 21 October 2026