Discount in ACP format
insumer_acp_discountCheck token-holder discount eligibility in OpenAI/Stripe Agentic Commerce Protocol (ACP) format. Returns coupon objects, applied/rejected arrays, and per-item allocations compatible with ACP checkout flows.
Instructions
Check token-holder discount eligibility in OpenAI/Stripe Agentic Commerce Protocol (ACP) format. Returns coupon objects, applied/rejected arrays, and per-item allocations compatible with ACP checkout flows. The on-chain check is the same one behind INSR discount codes, wrapped in ACP format. A code that carries a discount costs one credit from the API key that owns the store; a 0% result is free. A caller using another key is not charged, and stores on a licensed platform are covered by its license. Paid discount codes requested with a key other than the store's owner are subject to an hourly limit (429; the message says when to try again). Takes an EVM, Solana or XRPL wallet. An rpc_failure error (503) means a read did not complete and nothing was signed: retry, and never treat it as a no. Optional walletProof proves you control the EVM wallet: the response then says walletProven true, and the full discount its holdings earn applies, without the store's daily limit for unproven wallets. Without it the store's terms for unproven wallets apply, and discountIfProven shows what a proof would get.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | Optional line items for per-item cent-amount allocations | |
| wallet | No | EVM wallet address (0x...) | |
| merchantId | Yes | Merchant ID | |
| xrplWallet | No | XRPL wallet address (r-address) | |
| walletProof | No | Optional proof that you control 'wallet' (EVM only; send it without solanaWallet or xrplWallet). Sign this EIP-4361 message with the wallet, within 5 minutes, with a nonce you never reused: api.insumermodel.com wants you to sign in with your Ethereum account: <wallet> Prove wallet for a discount. URI: https://api.insumermodel.com/v1/merchants/<merchantId> Version: 1 Chain ID: 1 Nonce: <8+ random letters or digits> Issued At: <ISO 8601 time now> A proven wallet gets the full discount its holdings earn (under the store's tiers and cap), without the daily limit for unproven wallets. Without it, the store's terms for unproven wallets apply (see walletTerms on the merchant). A proof that fails returns 401 and uses no credit. Smart-contract wallets are not accepted yet. | |
| solanaWallet | No | Solana wallet address (base58) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | true when the API call succeeded | |
| data | No | The endpoint's payload: a signed attestation, trust profile, discount, merchant or token records | |
| keys | No | JWKS entries (insumer_jwks) | |
| meta | No | Response metadata such as version and timestamp | |
| error | No | Error details when ok is false | |
| items | No | The result when the endpoint returns a JSON array | |
| message | No | A plain-text result (insumer_setup), or a message from the API |