{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"CLI Command Reference","description":"Complete documentation for integrating Cheqi's digital receipt platform","keywords":["cheqi","digital receipts","api","sdk","java","javascript"],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cli-command-reference","__idx":0},"children":["CLI Command Reference"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every command returns the standard ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cli/overview#response-envelope"},"children":["JSON envelope"]},". The CLI can also describe its live command contract:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cheqi schema\ncheqi schema receipt add-product\ncheqi receipts submit-download --help\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"command-groups","__idx":1},"children":["Command groups"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Group"},"children":["Group"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Commands"},"children":["Commands"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Network use"},"children":["Network use"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["match"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reset"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["match"]}," only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Manage a local receipt draft and optionally inspect recipient resolution."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["set"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["add-product"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preview"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["validate"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["finalize"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["finalize"]}," only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Edit, validate, and issue a session receipt."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipts"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["submit"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["submit-download"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Issue a complete receipt document without a session."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["meta"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schema"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["version"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["help"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Discover capabilities and inspect the installed version."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"shared-network-flags","__idx":2},"children":["Shared network flags"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session match"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt finalize"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipts submit"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipts submit-download"]}," accept:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Flag"},"children":["Flag"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--api-key <key>"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--access-token <token>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["one credential"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["environment variables"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--env <sandbox|test|production>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sandbox"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--endpoint <url>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["selected environment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--download-base-url <url>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["selected environment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--timeout <seconds>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["30"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--verbose"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cli/overview#configuration"},"children":["Configuration"]}," for the corresponding environment variables."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"session-commands","__idx":3},"children":["Session commands"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"session-create","__idx":4},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session create"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a local receipt draft."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Flag"},"children":["Flag"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--session <id>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--currency <code>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EUR"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--document-number <value>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["generated"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--issue-date <ISO-8601>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["current time"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--env <name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sandbox"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--endpoint <url>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["selected environment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["one of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--card-par"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--pairing-code"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--payment-account-identifier"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--email"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--payment-type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cheqi session create \\\n  --session order-42 \\\n  --currency EUR \\\n  --document-number INV-001 \\\n  --card-par YOUR_CARD_PAR\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Providing identification details at creation time lets ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt finalize"]}," perform matching and issuance later without a separate ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session match"]}," call."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"session-match","__idx":5},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session match"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Resolve a delivery route for an existing session. This network command requires one identification flag and one credential."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"CHEQI_API_KEY=sk_... cheqi session match \\\n  --session order-42 \\\n  --card-par YOUR_CARD_PAR\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["routeFound"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deliveryRouteType"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["matchId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expiresAt"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recipientCount"]},". It also saves the identification details in the session. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt finalize"]}," resolves the route again before issuance."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"session-status","__idx":6},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session status"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Inspect local session state:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cheqi session status --session order-42\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The result includes match state, product count, totals, update time, and the next suggested command."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"session-reset","__idx":7},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session reset"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Delete the named local session draft:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cheqi session reset --session order-42\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"receipt-commands","__idx":8},"children":["Receipt commands"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"receipt-set","__idx":9},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt set"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Update receipt-level fields with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--document-number"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--currency"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--issue-date"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--note"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cheqi receipt set --session order-42 --document-number INV-002\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"receipt-add-product","__idx":10},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt add-product"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Append a product line. Supply the name positionally or through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--name"]},"."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Flag"},"children":["Flag"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--session <id>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["product name or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--name <value>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--price-incl <number>"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--unit-price <number>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["one price"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--quantity <number>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--vat <number>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--tax-type <value>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VAT"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--unit-code <UN/ECE code>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["C62"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--brand <value>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--sku <value>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cheqi receipt add-product \\\n  --session order-42 \\\n  --name \"Coffee beans\" \\\n  --price-incl 12.10 \\\n  --vat 21 \\\n  --sku SKU-COFFEE-001\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["With ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--price-incl"]},", the CLI derives the net unit price and tax amount. With ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--unit-price"]},", the supplied value is treated as the net price."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"receipt-preview","__idx":11},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt preview"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Return the complete local session, including identification details, receipt values, and calculated totals:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cheqi receipt preview --session order-42\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"receipt-validate","__idx":12},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt validate"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Validate the definitive receipt locally without a network call:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cheqi receipt validate --session order-42\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Success returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["valid: true"]},"; invalid input returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RECEIPT_INVALID"]}," with structured details."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"receipt-finalize","__idx":13},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt finalize"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Resolve the current route, encrypt the definitive receipt locally, and issue it:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"CHEQI_API_KEY=sk_... cheqi receipt finalize --session order-42\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The session must contain identification details and a valid receipt. A prior ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session match"]}," call is optional."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"direct-commands","__idx":14},"children":["Direct commands"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"receipts-submit","__idx":15},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipts submit"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Issue a complete receipt JSON file, or use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--receipt -"]}," to read from standard input:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"CHEQI_API_KEY=sk_... cheqi receipts submit \\\n  --receipt ./receipt.json \\\n  --match-by card_par \\\n  --match-value YOUR_CARD_PAR\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Supported ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--match-by"]}," values are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card_par"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pairing_code"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_account_identifier"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_type"]},". For an anonymous matched fallback, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--match-by payment_type --match-value CASH"]}," (or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CARD_PAYMENT"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DIRECT_DEBIT"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The JSON must be a definitive SDK 2.2.1 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReceiptPayload"]},". Supply ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["issueDate"]},", all totals, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["taxesApplied"]},", and complete product values such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unitCode"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subtotal"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total"]},". The CLI validates and normalizes the payload but does not invent missing merchant values."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"receipts-submit-download","__idx":16},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipts submit-download"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create and upload a client-encrypted download receipt without customer matching:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"CHEQI_API_KEY=sk_... cheqi receipts submit-download \\\n  --receipt ./receipt.json \\\n  --payment-type CASH\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--payment-type"]}," accepts ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CARD_PAYMENT"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CASH"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DIRECT_DEBIT"]}," and defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CASH"]},". The result includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deliveryRouteType: \"DOWNLOAD_FALLBACK\""]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["downloadUrl"]},". The URL fragment carries the decryption key; deliver the complete URL to the customer and do not log it server-side."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"issuance-response","__idx":17},"children":["Issuance response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipt finalize"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipts submit"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receipts submit-download"]}," return the same core fields:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accepted"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deliveryRouteType"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["matchId"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cheqiReceiptId"]}," when applicable"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdAt"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expiresAt"]}," when available"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["downloadUrl"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["downloadId"]}," for a completed download fallback"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["downloadEnvelopeRequired"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["emailReceiptRequired"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"meta-commands","__idx":18},"children":["Meta commands"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cheqi schema"]}," returns all command schemas; add a command path to narrow the result."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cheqi version"]}," returns the installed CLI version."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cheqi help"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--help"]}," return the same machine-readable command descriptions."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"errors","__idx":19},"children":["Errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLI validation errors use stable codes including ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AUTH_REQUIRED"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AUTH_CONFLICT"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COMMAND_NOT_FOUND"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ENV_UNSUPPORTED"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FLAG_INVALID"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FLAG_REQUIRED"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INPUT_INVALID"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RECEIPT_INVALID"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SESSION_INVALID"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SESSION_NOT_FOUND"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Errors from the Cheqi API retain SDK context and can set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["retryable: true"]}," for transient failures. Branch on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.code"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["retryable"]},", not the human-readable message."]}]},"headings":[{"value":"CLI Command Reference","id":"cli-command-reference","depth":1},{"value":"Command groups","id":"command-groups","depth":2},{"value":"Shared network flags","id":"shared-network-flags","depth":2},{"value":"Session commands","id":"session-commands","depth":2},{"value":"session create","id":"session-create","depth":3},{"value":"session match","id":"session-match","depth":3},{"value":"session status","id":"session-status","depth":3},{"value":"session reset","id":"session-reset","depth":3},{"value":"Receipt commands","id":"receipt-commands","depth":2},{"value":"receipt set","id":"receipt-set","depth":3},{"value":"receipt add-product","id":"receipt-add-product","depth":3},{"value":"receipt preview","id":"receipt-preview","depth":3},{"value":"receipt validate","id":"receipt-validate","depth":3},{"value":"receipt finalize","id":"receipt-finalize","depth":3},{"value":"Direct commands","id":"direct-commands","depth":2},{"value":"receipts submit","id":"receipts-submit","depth":3},{"value":"receipts submit-download","id":"receipts-submit-download","depth":3},{"value":"Issuance response","id":"issuance-response","depth":2},{"value":"Meta commands","id":"meta-commands","depth":2},{"value":"Errors","id":"errors","depth":2}],"frontmatter":{"title":"CLI Command Reference","description":"Commands, flags, responses, and error behavior for the Cheqi CLI","seo":{"title":"CLI Command Reference"}},"lastModified":"2026-08-11T23:21:19.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/cli/commands","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}