Coupons
Create coupon
Create a discount code customers can enter at checkout.
POST/v1/coupons
Parameters
| Parameter | Description |
|---|---|
| codestringrequired | At most 64 characters. |
| discount_typeenumrequired | One of percent, fixed_cents. |
| discount_valueintegerrequired | Minimum 1. |
| applies_to_price_idsarray of string | nulloptional | No description in the spec. |
| durationenumoptional | One of once, forever, repeating. Defaults to "once". |
| duration_in_monthsinteger | nulloptional | Between 1 and 120. |
| max_redemptionsinteger | nulloptional | Minimum 1. |
| min_amount_centsinteger | nulloptional | Minimum 0. |
| redeem_byinteger | nulloptional | Minimum 0. |
Returns
Returns a CouponResponse object.
Errors
| Status | Cause |
|---|---|
| 401 | Missing or invalid API key. |
| 403 | Key is missing the coupons:write scope. |
| 422 | Validation Error |
| 429 | Rate limited. Back off and retry. |
Other coupons operations
- List coupons GET /v1/coupons
- Get coupon GET /v1/coupons/{coupon_id}
- Update coupon POST /v1/coupons/{coupon_id}
- Validate coupon POST /v1/coupons/validate
BillKit