Discounts & Codes

Create signed discount code

Creates a signed discount verification code (INSR-XXXXX) valid for 30 minutes. A code that carries a discount costs 1 regular credit from the API key that owns the store (the key that created it); a 0% result is free. A caller using another key is not charged; when the caller is the owner key, the caller's key pays. Stores run through a licensed platform such as Skye Meta are covered by that platform's license. If merchant has Stripe Connect, a coupon is auto-created. The order is fixed: the result is signed first, then the credit is taken and the code is stored together, and a coupon is created only after the code exists. A result that cannot be signed, or a code that cannot be stored, is a 503 in the standard error envelope with no credit used and no code created. A retry after a timeout on the caller's side is a new verification: if the first request completed, it used a credit and created a code, and the retry does both again. A coupon that cannot be created leaves a valid code with stripeCodeCreated false.

post/v1/verify

Request

  • Base URL: https://api.insumermodel.com
  • URL: https://api.insumermodel.com/v1/verify
  • Auth: API key in header X-API-Key

Request body

merchantIdstring required
walletstring

EVM wallet address

solanaWalletstring

Solana wallet address

xrplWalletstring

XRPL wallet address (classic r-address). The base58 checksum is verified; an address that fails it returns 400.

Response

Verification code created

oktrue

Example response

{
  "data": {
    "code": "INSR-A7K3M"
  },
  "meta": {
    "version": "1.0"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.