InAppify

Discount code API

Generate a customer-specific single-use discount code through the InAppify REST API.

Define the discount rules in the dashboard before using this endpoint. See create and manage discount codes for identifiers, customer eligibility, and web checkout use.

New codes are personalized and limited to one redemption. Repeating a request for the same discount and customer returns and activates the existing code without resetting its redemption count or previous limits. It does not give an already consumed code a new redemption.

Generate a subscriber discount code
{
  "discount_identifier_key": "welcome_offer",
  "app_user_identifier": "customer_123"
}
The discount identifier is required and limited to 100 characters; the customer identifier is required and limited to 150. Both values are trimmed. The discount must be active and belong to the key's project.
{
  "status": true,
  "data": { "code": "DC-A1B2C3" }
}
Repeating the request for the same discount and customer returns and reactivates the existing code. The generated code is limited to one redemption.