Skip to content
Indiana
Dashboard
Docs
Browse docs / Coupons & Rewards

Coupons & Rewards

Configure discounts, distribute grants, read possession and apply a grant at checkout.

SDK examples target the current API. Check matching SDK versions and HTTP alternatives

API v1Updated

Before you start

Configure and activate a discount Reward and choose its issue channel/rules. A Customer's grant, the Reward definition and a promotion code are different identities.

Coupon and Reward

A Coupon is a percentage- or fixed-discount Reward. Terms, promotion codes, Customer possession and verified redemption are separate facts. Coupons are independent of Offering, Paywall and Funnel.

  • Configure discounts, applicable Products, validity and claim rules under Offers & rewards. Activated terms are locked. The per-Customer limit counts all non-revoked grants, even expired ones; total/code capacity counts reserved, redeemed and unexpired issued grants.
  • Use a code, directed backend grant or saved-group distribution. A distribution batch freezes recipients and processes up to 50 at a time; later group members do not join that batch automatically.

Grant, read and apply at checkout

Retain requestId for grantOffer and redeemCoupon; replay original input after a lost response. A quote reserves a grant, failure/expiry releases it, and verified purchase success redeems it. Display, refresh, button clicks and Funnel completion do not establish redemption.

Related:Stripe checkout·api-grantOffer·api-redeemCoupon

server-and-client/coupon.tsTypeScript
// Trusted backend: current authenticated Customer; offers:grant.await indiana.grantOffer({ customerId: verifiedCustomer.id, couponId, requestId });// Identified browser: offers:resolve.const { offers } = await grow.listOffers();const redeemed = await grow.redeemCoupon({ code: "WELCOME", requestId: codeRequestId });if (!redeemed.offer) throw new Error(redeemed.reason ?? "Coupon unavailable");// Use the held grant's ID, not couponId, in a purchase:const { quote } = await grow.previewAttach({  requestId: purchaseRequestId,  plans: [{ productVersionId: selectedProductId }],  provider: "stripe", currency: "USD", offerId: redeemed.offer.id,});

HTTP operations

Use these operations with your HTTP integration. Each reference includes complete request/response fields and credential requirements; SDK snippets are an alternative when a matching SDK is available.

Operation and permission
OperationHTTPPermission
listOffersGET /api/v1/offersoffers:resolve
redeemRewardPOST /api/v1/rewards/redeemoffers:resolve
grantOfferPOST /api/v1/offers/grantoffers:grant

Operation and permission

  • listOffers

    HTTP
    GET /api/v1/offers
    Permission
    offers:resolve
  • redeemReward

    HTTP
    POST /api/v1/rewards/redeem
    Permission
    offers:resolve
  • grantOffer

    HTTP
    POST /api/v1/offers/grant
    Permission
    offers:grant

Related:listOffers·redeemReward·grantOffer

Check your result

Expected outcome

Read availability and possession; use the actual grant at purchase, release on cancellation/expiry and redeem after payment verification. Previewing an offer does not issue a grant.