> For the complete documentation index, see [llms.txt](https://docs.limio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.limio.com/api/checkout-baskets-api/renew-subscription.md). Agents can also search and read this documentation through its [MCP server](https://docs.limio.com/~gitbook/mcp).

# Renew Subscription

Create checkout baskets to renew an existing subscription. The basket is pre-populated with the subscription's renewal context.

## Create checkout basket to renew subscription

> Create a checkout basket for renewing an existing subscription. Looks up the subscription by its external reference, verifies the supplied customer details against it, and creates a basket pre-populated with the renewal context.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Renew Subscription","description":"Create checkout baskets to renew an existing subscription. The basket is pre-populated with the subscription's renewal context."}],"servers":[{"url":"https://{tenant}/api","description":"Limio environment API","variables":{"tenant":{"default":"your-environment.prod.limio.com","description":"Your Limio environment hostname, e.g. `acme.prod.limio.com` or `acme-sandbox.prod.limio.com`."}}}],"security":[{"bearerAuth":["admin"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.\n\nObtain a token via the OAuth flow described in [Authentication](https://docs.limio.com/api/authentication).\n\nPass the token in the `Authorization` header: `Bearer <token>`"}},"responses":{"401ApplicationResponse":{"description":"Unauthorized: the request lacks valid authentication credentials. Verify your Bearer token or API key is correct and has not expired.","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","description":"The unique identifier of the request"},"code":{"type":"string"},"message":{"type":"string"}}}}}},"502Response":{"description":"Bad Gateway — an upstream service returned an unexpected response. This typically indicates an issue with the request payload (e.g. invalid field values, missing required fields) or a transient infrastructure error. Retry the request, and if the issue persists, verify the request body matches the expected schema.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error description."}}}}}}}},"paths":{"/admin/checkout/initiate/renew":{"post":{"operationId":"admin_initiateRenewCheckout","summary":"Create checkout basket to renew subscription","tags":["Renew Subscription"],"description":"Create a checkout basket for renewing an existing subscription. Looks up the subscription by its external reference, verifies the supplied customer details against it, and creates a basket pre-populated with the renewal context.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subscriptionReference","verify"],"properties":{"subscriptionReference":{"type":"string","description":"The external reference of the subscription to renew. The lookup is by reference only; Limio subscription IDs are not accepted."},"external_id":{"type":"string","maxLength":128,"pattern":"^[0-9a-zA-Z-_]+$","description":"External order reference."},"verify":{"type":"object","description":"Customer details to verify against the subscription. Must not be empty. Supply `customerDetails`, `address`, or both. Every `customerDetails` field you supply must match the subscription's stored customer record; an `address` matches when any one of the subscription's addresses matches (case-insensitive).","properties":{"customerDetails":{"type":"object","properties":{"hashedEmail":{"type":"string","description":"SHA-256 hash (lowercase hex) of the customer's email address. A plain email address is not accepted; compute the hash before sending."},"firstName":{"type":"string"},"lastName":{"type":"string"}}},"address":{"type":"object","properties":{"postalCode":{"type":"string"}}}}}}}}}},"responses":{"200":{"description":"Renewal checkout basket created successfully.","content":{"application/json":{"schema":{"type":"object","required":["id","order"],"properties":{"id":{"type":"string","description":"The unique ID of the created renewal basket."},"segments":{"description":"Customer segments applicable to the renewal. When a Salesforce contact is found for the subscription this is a JSON-encoded string containing an array of SHA-1 hashed segment paths; when no contact is found it is an empty array.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"order":{"type":"object","description":"The pre-populated renewal order details.","properties":{"external_id":{"type":"string"},"order_type":{"type":"string"},"subId":{"type":"string"},"subRef":{"type":"string"},"customerDetails":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"}}},"country":{"type":"string"},"renewalDetails":{"type":"object","description":"Details of the subscription being renewed.","properties":{"subscription":{"type":"object"},"attributes":{"type":"object"}}},"tracking":{"type":"object"},"hideEmailField":{"type":"boolean"},"hidePriceField":{"type":"boolean"}}}}}}}},"401":{"$ref":"#/components/responses/401ApplicationResponse"},"500":{"description":"Application error. Returned when the subscription cannot be found for the supplied reference, or when verification of the supplied customer details fails.","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","description":"The unique identifier of the request"},"code":{"type":"string"},"message":{"type":"string"}}}}}},"502":{"$ref":"#/components/responses/502Response"}}}}}}
```

## Queue a checkout basket for a subscription to sync and renew or change

> Queue a checkout for a subscription that a later job fills. Use it when the\
> basket cannot be built in one request, for example when the subscription is\
> only in Zuora and Limio must sync it first. The request returns at once with\
> a \`queueLink\`. A job then syncs the subscription and fills the basket, while\
> the customer waits on the waiting page.\
> \
> \`jobParameters.order\` names the use case. A renewal names its \`variant\`.\
> An offer change names no variant: it changes the offer from the effective\
> date. Send only the fields of the use case. Limio derives the items, the price\
> and the customer from the synced subscription.\
> \
> \| Use case | \`order\_type\` | \`variant\` | Other fields |\
> \| --- | --- | --- | --- |\
> \| Renew on the same offer | \`renew\_subscription\` | \`standard\` | none |\
> \| Renew onto another offer | \`renew\_subscription\` | \`switch\` | \`orderItems\` |\
> \| Change offer | \`change\_offer\` | none | \`orderItems\`, \`effectiveDate\` |\
> \
> The \`queueLink\` is a relative path to the assisted login. Open it on the\
> shop domain of the customer, not on the admin host. The login signs the\
> customer in as the basket owner and sends them to the waiting page, which\
> polls the job and goes to checkout when the basket is ready.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Renew Subscription","description":"Create checkout baskets to renew an existing subscription. The basket is pre-populated with the subscription's renewal context."}],"servers":[{"url":"https://{tenant}/api","description":"Limio environment API","variables":{"tenant":{"default":"your-environment.prod.limio.com","description":"Your Limio environment hostname, e.g. `acme.prod.limio.com` or `acme-sandbox.prod.limio.com`."}}}],"security":[{"bearerAuth":["admin"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.\n\nObtain a token via the OAuth flow described in [Authentication](https://docs.limio.com/api/authentication).\n\nPass the token in the `Authorization` header: `Bearer <token>`"}},"responses":{"401ApplicationResponse":{"description":"Unauthorized: the request lacks valid authentication credentials. Verify your Bearer token or API key is correct and has not expired.","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","description":"The unique identifier of the request"},"code":{"type":"string"},"message":{"type":"string"}}}}}},"502Response":{"description":"Bad Gateway — an upstream service returned an unexpected response. This typically indicates an issue with the request payload (e.g. invalid field values, missing required fields) or a transient infrastructure error. Retry the request, and if the issue persists, verify the request body matches the expected schema.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error description."}}}}}}}},"paths":{"/admin/checkout/queue":{"post":{"operationId":"admin_queueCheckout","summary":"Queue a checkout basket for a subscription to sync and renew or change","tags":["Renew Subscription"],"description":"Queue a checkout for a subscription that a later job fills. Use it when the\nbasket cannot be built in one request, for example when the subscription is\nonly in Zuora and Limio must sync it first. The request returns at once with\na `queueLink`. A job then syncs the subscription and fills the basket, while\nthe customer waits on the waiting page.\n\n`jobParameters.order` names the use case. A renewal names its `variant`.\nAn offer change names no variant: it changes the offer from the effective\ndate. Send only the fields of the use case. Limio derives the items, the price\nand the customer from the synced subscription.\n\n| Use case | `order_type` | `variant` | Other fields |\n| --- | --- | --- | --- |\n| Renew on the same offer | `renew_subscription` | `standard` | none |\n| Renew onto another offer | `renew_subscription` | `switch` | `orderItems` |\n| Change offer | `change_offer` | none | `orderItems`, `effectiveDate` |\n\nThe `queueLink` is a relative path to the assisted login. Open it on the\nshop domain of the customer, not on the admin host. The login signs the\ncustomer in as the basket owner and sends them to the waiting page, which\npolls the job and goes to checkout when the basket is ready.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jobType","journey","jobParameters"],"properties":{"jobType":{"type":"string","description":"The job that fills the basket.","enum":["synced_subscription_checkout"]},"journey":{"type":"object","description":"The pages of the customer's path, each a path on this shop that starts with `/`. The queue call fails when a page does not exist.","required":["checkout","waiting"],"properties":{"checkout":{"type":"string","description":"The checkout page the customer reaches when the basket is ready."},"waiting":{"type":"string","description":"The page the customer waits on while the job runs."}}},"jobParameters":{"type":"object","description":"The parameters of the job. The shape depends on `jobType`. The fields below are for `synced_subscription_checkout`.","required":["recordToSync","owner","order"],"properties":{"recordToSync":{"type":"object","description":"The subscription to sync.","required":["service","id","type"],"properties":{"service":{"type":"string","enum":["zuora"]},"id":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9_-]+$","description":"The reference of the subscription in the external service."},"type":{"type":"string","enum":["subscription"]}}},"owner":{"type":"object","description":"The external identity that owns the record. The record must belong to it, and the synced subscription lands under the Limio owner it resolves to.","required":["service","id"],"properties":{"service":{"type":"string","enum":["zuora"]},"id":{"type":"string","maxLength":64,"description":"The Zuora account number the subscription belongs to."},"type":{"type":"string","description":"The type of the owner identity.","enum":["account"]}}},"paymentTypes":{"type":"array","description":"The payment types the renewal offers. The job gives them to each cart item whose offer names none, as an offer that the sync builds from a Zuora rate plan does. An offer that names its own keeps them.","minItems":1,"uniqueItems":true,"items":{"type":"string","maxLength":64}},"order":{"type":"object","description":"The use case, and only the fields it takes. A field that the use case does not take returns 400.","required":["order_type"],"additionalProperties":false,"properties":{"order_type":{"type":"string","enum":["renew_subscription","change_offer"]},"variant":{"type":"string","description":"Required for `renew_subscription`, not allowed for `change_offer`. `standard` renews on the same offer. `switch` renews onto the offer in `orderItems`. Saved on the order.","enum":["standard","switch"]},"orderItems":{"type":"array","description":"The offer to change to, for `switch` and for `change_offer`: one order item that names an offer. Limio loads and prices the offer. The id is the one the published catalog index returns.","minItems":1,"maxItems":1,"items":{"type":"object","required":["offer"],"properties":{"offer":{"type":"object","required":["id","version"],"properties":{"id":{"type":"string","maxLength":256},"version":{"type":"string","maxLength":64}}},"priceOverrides":{"type":"array","description":"Price overrides for the offer's charges, as on any Limio order item. Not supported yet: a request with them returns 422 `use_case_not_supported`.","minItems":1,"items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","maxLength":128,"description":"The name of the charge in the offer's price."},"value":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"}}}}}}},"effectiveDate":{"type":"string","format":"date","description":"The date the offer change takes effect, as YYYY-MM-DD, for `change_offer`. A date before today in UTC returns 422 `effective_date_outside_term`. The job fails with that code for a date on or after the term end."},"customFields":{"type":"object","description":"Fields the order carries to the billing system."}}}}}}}}}},"responses":{"200":{"description":"The checkout is queued.","content":{"application/json":{"schema":{"type":"object","required":["queueLink"],"properties":{"queueLink":{"type":"string","description":"The relative path to open on the shop domain of the customer. It signs the customer in and sends them to the waiting page."}}}}}},"400":{"description":"The request is not valid. Returned when a `journey` page does not exist on this shop, or when `jobType` or `jobParameters` fail validation.","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/401ApplicationResponse"},"404":{"description":"An offer in `orderItems` does not exist. Limio creates no basket.","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"A field is not supported yet, or the effective date is before today. Limio creates no basket.","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}}},"502":{"$ref":"#/components/responses/502Response"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.limio.com/api/checkout-baskets-api/renew-subscription.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
