Prepare payment
checkout_prepare_paymentQuote the selected cart lines and prepare a short-lived confirmation in one call when the shipping option is unambiguous. The confirmation is bound to the exact selected lines, cart revision, address, selected shipping option, and currency. Server checks the supplied cartRevision and selectedLines against the live cart. If shippingOptionId is omitted and exactly one option is available, it prepares that option; if several are available, it returns the quote and options without preparing payment. After the user selects an option, call this tool again with the same address and selectedLines, the selected shippingOptionId, and the latest cartRevision returned in quote.cartRevision. Review the exact total and shipping option with the user before calling checkout_create_payment_link. This tool creates no order or charge. At payment-link creation, the confirmation is bound to one idempotencyKey: retries must use that same key, and another key is rejected. If the cart changes, payment creation is blocked and checkout must be prepared again.
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": {
"countryCode": "<countryCode>",
"currencyCode": "<currencyCode>",
"languageCode": "<languageCode>",
"addressId": "<addressId>",
"cartRevision": "<cartRevision>",
"selectedLines": "<selectedLines>"
},
"name": "checkout_prepare_payment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addressId | Yes | UUID of the selected shipping address. | |
| promoCode | No | Optional promotional or coupon code. Validity confirmed at quote time. | |
| useCredits | No | Apply available account credits toward the total. | |
| countryCode | Yes | ISO 3166-1 alpha-2 market country code. Choose from market_list output. | |
| cartRevision | Yes | The global cart revision returned by cart_get. | |
| currencyCode | Yes | ISO 4217 alpha-3 market currency code. Choose from market_list output. | |
| languageCode | Yes | Lowercase ISO 639-1 language code. Choose from market_list output. | |
| selectedLines | Yes | The exact cart lines to check out. Copy itemId, configurationId when present, and wholesale from cart_get. Unlisted cart lines stay in the cart. | |
| shippingOptionId | No | Optional shipping option ID. When omitted, the only available option is selected automatically; with multiple options, the tool returns choices and prepares nothing. On that response, use quote.cartRevision when calling again with the selected option. |