Check a discount (free)
insumer_check_discountCalculate a wallet's merchant discount from on-chain balances and return tier and discount percentage per token, not raw balance amounts.
Instructions
Calculate discount for a wallet at a merchant. Checks on-chain balances and returns tier and discount percentage per token, never raw balance amounts. Free: does not consume credits. Takes an EVM, Solana or XRPL wallet. An rpc_failure error (503) means a read did not complete: retry, and never treat it as not eligible. The check carries no proof of wallet control, so totalDiscount is what an unproven wallet gets; walletTerms gives the store's terms, and discountIfProven (when present) is what signing would get.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | No | EVM wallet address (0x...) | |
| merchant | Yes | Merchant ID | |
| xrplWallet | No | XRPL wallet address (r-address) | |
| 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 |