ls_create_checkout
Generate a checkout URL for a product variant so customers can complete a purchase. Customize pricing, prefill customer data, and apply discounts to streamline the checkout process.
Instructions
Create a new checkout URL for a product variant. Returns a URL where the customer can complete their purchase. Supports custom pricing, prefilled customer data, and checkout customization.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"storeId": "<storeId>",
"variantId": "<variantId>"
},
"name": "ls_create_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Prefill customer name | |
| No | Prefill customer email | ||
| storeId | Yes | The store ID | |
| expiresAt | No | Checkout expiry date (ISO 8601 format) | |
| taxNumber | No | Prefill tax/VAT number | |
| variantId | Yes | The variant ID for the product being purchased | |
| customData | No | Custom data object to attach to the order | |
| customPrice | No | Custom price in cents (overrides the variant price) | |
| discountCode | No | Pre-apply a discount code | |
| enabledVariants | No | Array of variant IDs to show on the checkout (for products with multiple variants) | |
| billingAddressZip | No | Prefill billing ZIP/postal code | |
| billingAddressCountry | No | Prefill billing country (ISO 3166-1 alpha-2) |