Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ivorpad/mercadona-cli/llms.txt

Use this file to discover all available pages before exploring further.

mercadona checkout submit places a real order on your Mercadona account. This is irreversible and spends real money. The command requires both --yes (explicit consent) and — when a spending cap is configured — verifies the order total against that cap before placing the order.
IRREVERSIBLE. Places a real paid order. Cannot be undone from the CLI. Use only after reviewing the checkout total, delivery address, and delivery slot. Always set --max and require explicit human confirmation of --yes before running this command.

Synopsis

mercadona checkout submit --checkout <id> --yes [--max <eur>] [flags]

Flags

FlagRequiredDescription
--checkout <id>Checkout ID (from checkout create)
--yesExplicit consent — required to place the order
--max <eur>RecommendedRefuse if order total exceeds this amount
--jsonEmit raw order confirmation JSON

How the Spending Guard Works

The budget check on checkout submit is the final and strictest guard:
  • With --max set: the CLI fetches the current checkout total via GET /api/customers/<id>/checkouts/<id>/ before submitting. If total > cap, it refuses without placing the order.
  • Fails closed: if the total cannot be read (API error, network failure), the CLI refuses rather than proceeding blind. This is intentional — when in doubt, don’t spend.
  • Without --max: prints a warning and submits unconditionally. The warning reads: ⚠ no spending limit set — submitting without a budget guard.
The --max value can also be set via the MERCADONA_MAX_EUR environment variable or [limits].max_eur in ~/.mercadona/config.toml. Precedence: --max flag > MERCADONA_MAX_EUR env > config.

Example

# Safe submit with spending cap
mercadona checkout submit --checkout <id> --max 90 --yes

# Output when budget is OK
# budget ok: order total 87.40€ ≤ 90.00€ limit

# Output when budget is exceeded
# error: BUDGET EXCEEDED: submit order total 95.20€ is over the 90.00€ limit — refusing

Full Checkout Workflow

The complete sequence from authentication to a placed order:
mercadona import-har --file session.har           # auth
mercadona cart set-many -f basket.txt --max 80    # fill cart
mercadona checkout create --json --max 80         # → checkout id + address
mercadona checkout slots --address <addr> --json  # → available slots
mercadona checkout set-delivery --checkout <chk> --address <addr> --slot <slot> --max 90
mercadona checkout submit --checkout <chk> --max 90 --yes  # PLACES THE ORDER
Never add --yes automatically in scripts or agent workflows. Always require an explicit human confirmation step before this command runs. A budget cap (--max) is a safety net, not a substitute for human review of the address, slot, and item list before submitting.

Build docs developers (and LLMs) love