Simulate a checkout
checkout_simulateSimulate a customer checkout via Shopware's Store API to see calculated prices, discounts, shipping, taxes and cart errors, and learn why a code or an order fails.
Instructions
See the checkout the way a customer does: puts products (and promotion codes) into a throwaway cart of a sales channel through Shopware's own Store API, as a guest shipping to a country or as a given customer with their group, prices and rules, and returns what Shopware calculates: prices per item next to the listing price, discounts, shipping, taxes, total, which payment and shipping methods the customer is offered, which are hidden and by which rule, and every cart error with a plain explanation (country not assigned, code expired, product not visible, stock). Nothing is ordered and the cart is deleted afterwards; as a customer, extensions that react to saved carts (abandoned-cart mailers) see it like any other cart of that customer. Use it for 'why can't this customer order?', 'why does this code not work?' or 'what does shipping to Switzerland cost?'. Returns { salesChannel, as, canOrder, items[], promotions[], shipping, totals, problems[], paymentMethods, shippingMethods }.
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": {
"items": "<items>"
},
"name": "checkout_simulate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Products and quantities for the cart | |
| country | No | Shipping country of a guest, as ISO code | |
| salesChannel | No | Sales channel id or name; default: the first active storefront | |
| paymentMethod | No | Payment method name to select | |
| customerNumber | No | Simulate as this customer: group, prices, rules and default addresses | |
| promotionCodes | No | Promotion codes to redeem | |
| shippingMethod | No | Shipping method name to select |