Coupons are great. Whether they’re underpinning your marketing campaigns, giving your customers a little extra discount at the checkout, or smoothing things out when things go awry, they can be really versatile tools.
Our coupon API provides you with:
- Creation and management of large groups of coupons
- A lot of flexibility in the kind of discounts you can create
- Real time, on-demand coupon creation
vendor_id (int) - Vendor ID (required)
vendor_auth_code (string) - Vendor API Auth Code (required) - Docs: https://paddle.com/docs/api-authentication
coupon_code (string) - Coupon Code. (optional) - Will be randomised if not given.
coupon_prefix (string) - Coupon Prefix. (optional) - Prefix of coupon code to use if generating a batch of coupons. Not valid if coupon_code parameter is specified.
num_coupons (int) - Number of Coupons to generate. (optional) - Number of coupons to generate at once. Not valid if
coupon_code parameter is specified (as that implies a single coupon).
description (string) - Description of the coupon for internal use. (optional)
coupon_type (string) - Either
product_ids (string) - Comma separated list of products e.g.
499531,1234,123546. (required if
product, else optional)
discount_type (string) - Either
discount_amount (decimal) - A currency amount (eg.
flat, or a percentage amount (eg.
currency (string) - Currency of the
discount_amount. (required - if
allowed_uses (int) - Number of times each coupon can be used. (required)
expires (string) - Date the coupon is valid until, in the format
YYYY-MM-DD. Coupon will expire at the start of this date (eg.
YYYY-MM-DD 00:00:00). (optional)
recurring (bool) - Either
1. If the coupon contains subscription products, this indicates if the discount should apply to intervals after the initial purchase. (optional)
minimum_threshold - The minimum threshold (total in cart) that needs to be exceeded for the coupon to work. If blank or
0 then threshold is removed. (optional - unless changing currency when a minimum threshold is already set.)
group (string) - The name of the coupon group this coupon belongs to; groups that do not exist will be created automatically. (optional)
curl -X POST \
-d 'vendor_id=12345' \
-d 'vendor_auth_code=abc1234...' \
-d 'coupon_prefix=TEST-' \
-d 'num_coupons=5' \
-d 'description=Coupons created via the API.' \
-d 'coupon_type=product' \
-d 'product_ids=510509,511520,508649' \
-d 'discount_type=percentage' \
-d 'discount_amount=25' \
-d 'allowed_uses=1' \
-d 'group=My-Test-Group' \