Documentation menu

Store-Native Discount Code Minting

MailInApp supports dynamic Store-Native Discount Code Minting for connected Shopify and WooCommerce stores.

Rather than forcing buyers through a third-party checkout or generic public coupons, MailInApp automatically mints single-use, customer-restricted discount codes directly on your store at send time.


How It Works

When a campaign or journey includes a discount offer:

  1. Dynamic Customer Resolution:
    • Shopify: Resolves the recipient's customer GraphQL ID (gid://shopify/Customer/...) via Admin GraphQL before generating the discount node.
    • WooCommerce: Restricts the generated coupon to the recipient's exact email address using WooCommerce REST API.
  2. Single-Use & Secure:
    • Codes carry random cryptographic suffixes (e.g. MIA-7F3A91B2).
    • Every code is restricted to a single use (usage_limit: 1) and tied exclusively to the recipient's email address, preventing coupon leakage on deal sites.
  3. Store Checkout Pre-Application:
    • Generated links automatically apply the minted coupon code at store checkout (/cart/?coupon=MIA-... or /discount/MIA-...).

Supported Offer Types

  • Percentage Off: e.g., 15% or 20% sitewide or collection discount.
  • Fixed Amount Off: e.g., $10 or $25 off total cart value.
  • Expiry Windows: Codes carry an auto-computed expiration date (e.g., 7 or 14 days from send time) so urgency is enforced on the merchant's store.
  • Account Cooldowns: Built-in account cooldown markers prevent over-couponing the same contact across multiple schedules or projects.

Setup & API Integration

  • Shopify: Requires connected store credentials with write_discounts scope (handled during OAuth connection).
  • WooCommerce: Requires connected store REST API consumer key and secret with read/write permissions.