curl -X POST \
'https://api.appcharge.com/coupons/coupon' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-d '{
"name": "summer26",
"discountPercentage": 10,
"maxRedemptionsPerCustomer": 2,
"allowedPlayers": ["player123", "player456", "player789"],
"supportedOfferExternalIds": ["bundle1", "rollingoffer3"],
"expiredBy": "2025-04-02T06:54:51.670Z",
"startsAt": "2025-02-02T06:54:51.670Z"
}'
{
"name": "summer26",
"active": true,
"discountPercentage": 10,
"maxRedemptionsPerCustomer": 2,
"expiredBy": "2025-04-02T06:54:51.670Z",
"startsAt": "2025-02-02T06:54:51.670Z",
"supportedOfferExternalIds": ["bundle1", "rollingoffer3"],
"firstTimePurchase": false,
"allowedPlayers": ["player123", "player456", "player789"]
}
{
"error": "Invalid coupon name. Use only English letters and numbers."
}
{
"error": "Missing required field: discountPercentage."
}
{
"error": "startsAt must be in the future."
}
{
"error": "expiredBy must be after startsAt."
}
{
"error": "discountPercentage must be between 1 and 99."
}
{
"error": "Coupon name 'summer26' is already in use"
}
{
"error": "Unexpected error. Please contact support."
}
Coupons
Create Coupon
Creates a coupon.
POST
/
coupons
/
coupon
curl -X POST \
'https://api.appcharge.com/coupons/coupon' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-d '{
"name": "summer26",
"discountPercentage": 10,
"maxRedemptionsPerCustomer": 2,
"allowedPlayers": ["player123", "player456", "player789"],
"supportedOfferExternalIds": ["bundle1", "rollingoffer3"],
"expiredBy": "2025-04-02T06:54:51.670Z",
"startsAt": "2025-02-02T06:54:51.670Z"
}'
{
"name": "summer26",
"active": true,
"discountPercentage": 10,
"maxRedemptionsPerCustomer": 2,
"expiredBy": "2025-04-02T06:54:51.670Z",
"startsAt": "2025-02-02T06:54:51.670Z",
"supportedOfferExternalIds": ["bundle1", "rollingoffer3"],
"firstTimePurchase": false,
"allowedPlayers": ["player123", "player456", "player789"]
}
{
"error": "Invalid coupon name. Use only English letters and numbers."
}
{
"error": "Missing required field: discountPercentage."
}
{
"error": "startsAt must be in the future."
}
{
"error": "expiredBy must be after startsAt."
}
{
"error": "discountPercentage must be between 1 and 99."
}
{
"error": "Coupon name 'summer26' is already in use"
}
{
"error": "Unexpected error. Please contact support."
}
curl -X POST \
'https://api.appcharge.com/coupons/coupon' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-d '{
"name": "summer26",
"discountPercentage": 10,
"maxRedemptionsPerCustomer": 2,
"allowedPlayers": ["player123", "player456", "player789"],
"supportedOfferExternalIds": ["bundle1", "rollingoffer3"],
"expiredBy": "2025-04-02T06:54:51.670Z",
"startsAt": "2025-02-02T06:54:51.670Z"
}'
{
"name": "summer26",
"active": true,
"discountPercentage": 10,
"maxRedemptionsPerCustomer": 2,
"expiredBy": "2025-04-02T06:54:51.670Z",
"startsAt": "2025-02-02T06:54:51.670Z",
"supportedOfferExternalIds": ["bundle1", "rollingoffer3"],
"firstTimePurchase": false,
"allowedPlayers": ["player123", "player456", "player789"]
}
{
"error": "Invalid coupon name. Use only English letters and numbers."
}
{
"error": "Missing required field: discountPercentage."
}
{
"error": "startsAt must be in the future."
}
{
"error": "expiredBy must be after startsAt."
}
{
"error": "discountPercentage must be between 1 and 99."
}
{
"error": "Coupon name 'summer26' is already in use"
}
{
"error": "Unexpected error. Please contact support."
}
Authorizations
Body
application/json
List of offer IDs which this coupon applies. Empty array means all offers are supported.
Note: This represents both the offer.sku value in the Create Checkout Session API, and the publisherOfferId in the Offers V2 API.
Example:
["bundle1", "rollingoffer3"]
Response
Coupon created successfully.
Was this page helpful?
