Skip to main content

Documentation

Coupon Errors

Error Code

Description

ERROR_COUPON_DISCOUNT_NOT_RECOGNIZED

The request tried to create a coupon, but the discount was set by both percentage and fixed amount. The request was rejected. Corrective action: Set 'percent_off' or set 'amount_off' and 'currency'.

ERROR_COUPON_WAS_USED_OR_OUT_OF_DATE

The request tried to apply a coupon to a customer, order or subscription, but the coupon was applied its maximum number of times or was expired. The request was rejected. Corrective action: Create a new coupon.

ERROR_CREATE_COUPON_ID_ALREADY_USED

The request tried to create a coupon, but the ID provided was already used. The request was rejected. Corrective action: For the 'id' field, use a unique string.

ERROR_DELETE_COUPON

The request tried to delete a coupon, but the operation failed. Corrective action: Determine whether the coupon was already deleted, and why there were multiple requests to delete it.

ERROR_GET_COUPON

The request attempted an operation that requires the ID of a coupon, but the coupon was not found. The request was rejected. Corrective action: Use the ID of a valid coupon.

ERROR_GET_DISCOUNT

The request attempted an operation that requires the ID of a coupon, but the coupon was not found. The request was rejected. Corrective action: Use the ID of a valid coupon.

INVALID_AMOUNT_OFF_AND_CURRENCY

The request tried to create a coupon, but 'amount_off' was set and 'currency' was unset or invalid. The request was rejected. Corrective action: Use the correct 3-letter ISO 4217 code for the currency, in uppercase letters.

INVALID_COUPON_AMOUNT_OFF

The request tried to create a coupon, but the amount off was not a positive number. The request was rejected. Corrective action: Use a positive decimal value for 'percent_off'.

INVALID_COUPON_DURATION

The request tried to create a coupon, but the value for the 'duration' parameter was not recognized. The request was rejected. Corrective action: Set 'duration' to one of the following values: 'forever', 'once', 'repeating'

INVALID_COUPON_LIMIT

The request tried to retrieve a list of coupons, but the 'limit' query parameter was out of range. The request was rejected. Corrective action: Set 'limit' to an integer between 10 and 100.

INVALID_COUPON_PERCENT_OFF

The request tried to create a coupon, but the percent off was less than 1 or greater than 100. The request was rejected. Corrective action: Set 'percent_off' to an integer between 0-100.

INVALID_COUPON_PERCENT_AND_AMOUNT_OFF

The request tried to create a coupon, but the type of discount could not be determined. The request was rejected. Corrective action: Set 'percent_off' or set 'amount_off' and 'currency'.

INVALID_PERCENT_OFF

The request tried to create a coupon, but the percent off was less than 1 or greater than 100. The request was rejected. Corrective action: Use an integer value between 0-100 for 'percent_off'.