Check a cart before checkout
check_cart_before_checkoutChecks a cart at checkout. Takes the checkout session exactly as a commerce protocol returns it (a UCP checkout or an ACP CheckoutSession) or plain line items, plus what the customer already owns. Returns a decision per line item, safe_to_checkout, an action (proceed, resolve_conditions, do_not_checkout, ask_customer), questions, substitutions, a signed receipt, and a com.tetheredtrust.shopping.compatibility extension object to attach to the checkout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owned | No | What the customer already owns that these items must work with (model numbers, URLs or descriptions; objects may carry config like memory_modules). | |
| checkout | No | The checkout session as your commerce protocol returns it: a UCP checkout (line_items[].item.title) or an ACP CheckoutSession (line_items[].item.id). Or send line_items directly. | |
| products | No | ACP only: map of item id → {title | url | gtin} from your product feed, because ACP line items carry only ids. | |
| line_items | No | Generic cart: [{id, title | url | gtin | sku | text, quantity}]. Used when checkout isn't sent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||