Validate Coupon
Verifies whether a specific coupon code is valid. This method is useful for validating coupon codes that are entered by a customer.
If you have more than one product family and if the coupon you are validating does not belong to the first product family in your site, you need to specify the product family, either in the URL or as a query string param. This can be done by supplying the id or the handle in the handle:my-family format.
Supplying the product_family_handle in the URL:
https://<subdomain>.chargify.com/product_families/handle:<product_family_handle>/coupons/validate.<format>?code=<coupon_code>Supplying the product_family_id as a query parameter:
https://<subdomain>.chargify.com/coupons/validate.<format>?code=<coupon_code>&product_family_id=<id>Authorization
BasicAuth The username is a Maxio Chargify API key. The password is x.
In: header
Query Parameters
The code of the coupon
The Advanced Billing id of the product family to which the coupon belongs
Response Body
application/json
application/json
curl -X GET "https://example.com/coupons/validate.json?code=string"{ "coupon": { "id": 66, "name": "Foo Bar", "code": "YEPPER9993", "description": "my cool coupon", "amount_in_cents": 10000, "product_family_id": 4, "created_at": "2017-11-07T14:51:52-05:00", "updated_at": "2017-11-07T15:14:24-05:00", "start_date": "2017-11-07T14:51:52-05:00", "end_date": null, "percentage": null, "recurring": false, "duration_period_count": null, "duration_interval": null, "duration_interval_unit": null, "allow_negative_balance": false, "archived_at": null, "conversion_limit": null, "stackable": true, "compounding_strategy": "full-price" }}List Coupon Usages GET
Lists coupon usage details, one entry per product.
Create / Update Currency Prices PUT
Creates and/or updates currency prices for an existing coupon. Multiple prices can be created or updated in a single request but each of the currencies must be defined on the site level already and the coupon must be an amount-based coupon, not percentage. Currency pricing for coupons must mirror the setup of the primary coupon pricing - if the primary coupon is percentage based, you will not be able to define pricing in non-primary currencies.