Validate a discount code
insumer_validate_codeValidate INSR-XXXXX discount codes during ACP/UCP checkout: confirm validity, discount percent, and expiry. Returns status, reason, and walletProven without requiring auth or credits.
Instructions
Validate an INSR-XXXXX discount code. For merchant backends during ACP/UCP checkout to confirm code validity, discount percent, and expiry. Returns valid/invalid status with reason, and walletProven (whether the code went to a caller that proved control of the wallet). No authentication required, no credits consumed. Does not expose wallet or token data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Discount code in INSR-XXXXX format |
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 |