Purchase Intents
Purchase intents power Pages Buy links. Each one captures the product, the price, the quantity policy, optional expiry, and the usage rule that Pages should enforce before it creates an order. Use them when you want to publish a curated offer from your catalog instead of assembling a cart server-side.
The current Commerce SDKs do not yet expose first-class purchase-intent helpers, so the examples below call the HTTPS API directly in every language.
The purchase intent object
A purchase intent stores the commercial terms behind a Buy link together with the resolved product and price snapshots that Pages needs at checkout time. The object also carries derived lifecycle state such as whether the offer has been used, expired, or manually inactivated.
Properties
- Name
product- Type
- object
- Description
Resolved product snapshot for the offer. The nested object follows the Product shape and also includes
variant_set_idwhen the offer is tied to a variant group.
Create a purchase intent
Create a Buy link configuration that points at a product and a price from your catalog. Commerce stores the offer, normalizes the usage rule, and returns the hydrated purchase intent you can hand off to Pages or your dashboard.
Rules
- Send exactly one of
productorproduct_id. - Send exactly one of
priceorprice_id. quantity.maxmust be greater than or equal toquantity.min.expires_atmust be a future RFC3339 timestamp when provided.usagecan mark the link assingle_useormulti_use, but not both.
Request attributes
Request
curl https://api.zebo.dev/purchase_intents/create -H "Authorization: ******" -H "Content-Type: application/json" -d '{
"product_id": "prod_P9sK3vLm4nQ2xR7tY1wBc8Da",
"price_id": "pr_G6tV2nQ9xM4bR7cD1yKs5LpW",
"quantity": {
"max": 5,
"min": 1
},
"usage": {
"multi_use": true
},
"expires_at": "2026-12-01T09:00:00Z"
}'
{
"purchase_intent": {
"id": "sale_B7tQ2nLm5yR8cV1pKs4Dx9Ha",
"application_id": "app_6RrJ4mQ2vBc8Y1pNs5tW3LxD",
"minimum_quantity": 1,
"maximum_quantity": 5,
"allow_variants": false,
"usage": {
"multi_use": true
},
"expires_at": "2026-12-01T09:00:00Z",
"status": "active",
"created_at": "2026-08-05T12:00:00Z",
"product": {
"id": "prod_P9sK3vLm4nQ2xR7tY1wBc8Da",
"name": "Premium Matcha Tin",
"type": "physical"
},
"price": {
"id": "pr_G6tV2nQ9xM4bR7cD1yKs5LpW",
"active": true,
"nominal": {
"currency": "ghs",
"value": 18500
}
}
}
}
Update a purchase intent
Update the mutable parts of a Buy link after creation. Product selection, price selection, and variant targeting stay fixed, but you can change the quantity bounds, move the expiry time, or reactivate an expired or canceled offer.
Rules
- Send
idto identify the purchase intent you want to update. expires_at: nullclears the expiry time.reactivate: trueclears aninactive_attimestamp and can also clear an already elapsed expiry.- When you send both quantity bounds,
maximum_quantitymust stay greater than or equal tominimum_quantity.
Request attributes
Request
curl https://api.zebo.dev/purchase_intents/update -H "Authorization: ******" -H "Content-Type: application/json" -d '{
"id": "sale_B7tQ2nLm5yR8cV1pKs4Dx9Ha",
"minimum_quantity": 2,
"maximum_quantity": 8,
"reactivate": true
}'
{
"purchase_intent": {
"id": "sale_B7tQ2nLm5yR8cV1pKs4Dx9Ha",
"application_id": "app_6RrJ4mQ2vBc8Y1pNs5tW3LxD",
"minimum_quantity": 2,
"maximum_quantity": 8,
"allow_variants": false,
"usage": {
"multi_use": true
},
"expires_at": "2026-12-01T09:00:00Z",
"status": "active",
"created_at": "2026-08-05T12:00:00Z",
"updated_at": "2026-08-05T12:18:00Z",
"product": {
"id": "prod_P9sK3vLm4nQ2xR7tY1wBc8Da",
"name": "Premium Matcha Tin",
"type": "physical"
},
"price": {
"id": "pr_G6tV2nQ9xM4bR7cD1yKs5LpW",
"active": true,
"nominal": {
"currency": "ghs",
"value": 18500
}
}
}
}
Cancel a purchase intent
Cancel a Buy link so Pages stops creating new orders from it. Cancellation is merchant-driven and distinct from expiry: the offer is still visible in your records, but it becomes immediately unavailable to new shoppers.
Required attributes
Request
curl https://api.zebo.dev/purchase_intents/cancel -H "Authorization: ******" -H "Content-Type: application/json" -d '{
"id": "sale_B7tQ2nLm5yR8cV1pKs4Dx9Ha"
}'
{
"purchase_intent": {
"id": "sale_B7tQ2nLm5yR8cV1pKs4Dx9Ha",
"application_id": "app_6RrJ4mQ2vBc8Y1pNs5tW3LxD",
"minimum_quantity": 2,
"maximum_quantity": 8,
"allow_variants": false,
"usage": {
"multi_use": true
},
"expires_at": "2026-12-01T09:00:00Z",
"inactive_at": "2026-08-05T12:26:00Z",
"status": "inactive",
"created_at": "2026-08-05T12:00:00Z",
"updated_at": "2026-08-05T12:26:00Z"
}
}
Lookup a purchase intent
Retrieve a Buy link by its opaque ID. Public Pages flows can call this endpoint without knowing the owning application_id, and authenticated dashboard callers receive the same hydrated object with merchant context, product details, and recent activity.
Required attributes
Request
curl https://api.zebo.dev/purchase_intents/lookup -H "Content-Type: application/json" -d '{
"id": "sale_B7tQ2nLm5yR8cV1pKs4Dx9Ha"
}'
{
"purchase_intent": {
"id": "sale_B7tQ2nLm5yR8cV1pKs4Dx9Ha",
"application_id": "app_6RrJ4mQ2vBc8Y1pNs5tW3LxD",
"merchant": {
"app_id": "app_6RrJ4mQ2vBc8Y1pNs5tW3LxD",
"app_name": "Tea House",
"organization_id": "org_3Qn7Lp5cY2vR8tMd1Ks4BxWa",
"organization_name": "Tea House Ltd"
},
"minimum_quantity": 1,
"maximum_quantity": 5,
"allow_variants": true,
"usage": {
"multi_use": true
},
"status": "active",
"created_at": "2026-08-05T12:00:00Z",
"product": {
"id": "prod_P9sK3vLm4nQ2xR7tY1wBc8Da",
"variant_set_id": "pg_1Ms9Qv4rLc7tY2pNd6Bx8HwK",
"name": "Premium Matcha Tin",
"type": "physical"
},
"price": {
"id": "pr_G6tV2nQ9xM4bR7cD1yKs5LpW",
"active": true,
"nominal": {
"currency": "ghs",
"value": 18500
}
},
"activity": {
"recent": [
{
"id": "saleevt_9Mv2Qx6rLp1cY7tBd4Ks8HnW",
"purchase_intent_id": "sale_B7tQ2nLm5yR8cV1pKs4Dx9Ha",
"type": "viewed",
"source": "pages_buy",
"created_at": "2026-08-05T12:05:00Z"
}
]
}
}
}
Page purchase intents
List the purchase intents owned by the authenticated application. Use this for dashboard views, back-office search, and Buy link audits.
Required attributes
Request
curl https://api.zebo.dev/purchase_intents/page -H "Authorization: ******" -H "Content-Type: application/json" -d '{
"page_number": 1,
"page_size": 20
}'
{
"page": {
"number": 1,
"size": 20,
"purchase_intents": [
{
"id": "sale_B7tQ2nLm5yR8cV1pKs4Dx9Ha",
"application_id": "app_6RrJ4mQ2vBc8Y1pNs5tW3LxD",
"minimum_quantity": 1,
"maximum_quantity": 5,
"allow_variants": false,
"usage": {
"multi_use": true
},
"status": "active",
"created_at": "2026-08-05T12:00:00Z"
},
{
"id": "sale_M4nQ7xVc2pLs8YtR1kDb5HwA",
"application_id": "app_6RrJ4mQ2vBc8Y1pNs5tW3LxD",
"minimum_quantity": 1,
"maximum_quantity": 1,
"allow_variants": false,
"usage": {
"single_use": true,
"order": {
"id": "or_9tW2xBc5pLm8Qn1Rr4Ks7YdV",
"created_at": "2026-08-05T12:42:00Z"
}
},
"status": "used",
"created_at": "2026-08-04T17:20:00Z"
}
]
}
}
Related resources
- Create a product - Build the catalog item a Buy link points at.
- Create a price - Store the catalog price a Buy link should reuse.
- Accept payment with Zebo Checkout - Put the hosted checkout experience in front of customers.
- Create an order - Compare direct order creation with Buy-link-driven order creation.