Create a discount code
insumer_verifyCreate a signed discount code (INSR-XXXXX, 30-minute expiry) for a wallet at a merchant. Returns tier and discount percentage, never raw balance amounts.
Instructions
Create a signed discount code (INSR-XXXXX, 30-minute expiry) for a wallet at a merchant. Returns tier and discount percentage, never raw balance amounts. 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). If the merchant has Stripe Connect, a coupon is auto-created. Takes an EVM, Solana or XRPL wallet. An rpc_failure error (503) means a read did not complete and no code was issued: 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 |
|---|---|---|---|
| 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 |