Creates subcodes for an existing coupon.
Coupon Subcodes allow you to create a set of unique codes that allow you to expand the use of one coupon.
For example:
Master Coupon Code:
Coupon Subcodes:
Coupon subcodes can be administered in the Admin Interface or via the API.
When creating a coupon subcode, you must specify a coupon to attach it to using the coupon_id. Valid coupon subcodes are all capital letters, contain only letters and numbers, and do not have any spaces. Lowercase letters will be capitalized before the subcode is created.
Full documentation on how to create coupon subcodes in the Advanced Billing UI can be located here.
Additionally, for documentation on how to apply a coupon to a Subscription within the Advanced Billing UI, see our documentation here.
This request allows you to create specific subcodes underneath an existing coupon code.
Note: If you are using any of the allowed special characters ("%", "@", "+", "-", "_", and "."), you must encode them for use in the URL.
% to %25@ to %40+ to %2B- to %2D_ to %5F. to %2ESo, if the coupon subcode is 20%OFF, the URL to delete this coupon subcode would be: https://<subdomain>.chargify.com/coupons/567/codes/20%25OFF.<format>.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
The Advanced Billing id of the coupon
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
curl -X POST \ --url 'https://subdomain.chargify.com/coupons/1/codes.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "codes": [ "BALTIMOREFALL", "ORLANDOFALL", "DETROITFALL" ]}'