Subscription Errors
Error Code | Description |
---|---|
ERROR_CANCEL_SUBSCRIPTION | The request tried to cancel a subscription, but the subscription was not found. The request was rejected. Corrective action: Determine whether the subscription was previously canceled, and check all input parameters. |
ERROR_CANCELED_SUBSCRIPTION | The request tried to update a subscription, but the subscription was canceled. The request was rejected. Corrective action: None. Determine why an attempt was made to update a canceled subscription. |
ERROR_DAYS_UNTIL_DUE_BILLING_INCORRECT | The request tried to create or update a subscription, but the 'days_until_due' body parameter was set and 'billing' was not set to 'send_invoice'. The request was rejected. Corrective action: Set 'billing' to 'send_invoice'. |
ERROR_DEFINING_SUBSCRIPTION_TRIAL_PERIOD | The request tried to define a trial period for a subscription, but the trial period was already defined in the plan. The request was rejected. Corrective action: Set 'trial_from_plan' to false and define either 'trial_end' or 'trial_period_days'. |
ERROR_DELETE_SUBSCRIPTION_DISCOUNT | The request tried to delete a discount from a subscription, but the operation failed. Corrective action: Determine whether the discount was already deleted, and why there were multiple requests to delete it. |
ERROR_DELETE_SUBSCRIPTION_ITEM | The request tried to delete a subscription item from a subscription, but the operation failed. Corrective action: Determine whether the subscription item was already deleted, and why there were multiple requests to delete it. |
ERROR_GET_PLANS | The request tried to create a subscription, but the plan was not found. The request was rejected. Corrective action: In each object in the ‘subscription_items’ array, set 'plan' to the ID of a valid plan. |
ERROR_GET_SUBSCRIPTION | The request attempted an operation that requires a subscription, but the subscription was not found. The request was rejected. Corrective action: Use the ID of an active subscription. |
ERROR_GET_SUBSCRIPTION_LIST | The request tried to retrieve a list of subscriptions, but there was an error in the query syntax. The request was rejected. Corrective action: Use the correct names of all query parameters. |
ERROR_HOSTED_PAGE_TRIAL_FROM_PLAN_WAS_DEFINED_WITHOUT_PLAN_PERIOD_DAYS | The request tried to define trial_from_plan for a subscription, but the trial period was not defined in the plan. The request was rejected. Corrective action: Either set 'trial_from_plan' to false or define 'trial_period_days' to a valid number in the plan creation. |
ERROR_INVALID_TAX_PERCENT_INPUT | The request tried to create or update a subscription, but the 'days_until_due' body parameter was set and 'billing' was not set to 'send_invoice'. The request was rejected. Corrective action: Set 'billing' to 'send_invoice'. |
ERROR_PAYMENT_METHOD_DOES_NOT_SUPPORT_SUBSCRIPTIONS | The request attempted an action that requires a payment method that supports subscriptions. The payment method selected does not support this action. The request was rejected. Corrective action: For 'payment_method', use a payment method that supports subscriptions. |
ERROR_PAYMENT_METHOD_TYPE_CURRENCY_DOES_NOT_MATCH_PLAN | The request tried to set a payment method for a subscription, but the payment method does not support the currency in the plan for a subscription item. The request was rejected. Corrective action: Choose a payment method that supports the currency of the subscription item. |
ERROR_PLAN_INTERVAL_DOES_NOT_MATCH | The request tried to add a subscription item based on a plan, but the billing interval for the plan did not match the interval of all the subscription items in the subscription. The request was rejected. Corrective action: Add only plans that have the same 'interval' and 'interval_count' as the subscription items in the subscription. |
ERROR_SET_TRIAL_TO_UNPAID_SUBSCRIPTION | The request tried to add a free trial to an existing subscription, but full payment was not received for the previous billing period. The request was rejected. Corrective action: Add the free trial after the previous billing period is fully paid. |
ERROR_SUBSCRIPTION_BILLING_CYCLE_ANCHOR_IN_FUTURE | The request tried to create a subscription, but the billing cycle anchor was set too far in the future. The request was rejected. Corrective action: To create a subscription, set the 'billing_cycle_anchor' body parameter to a Unix timestamp within the current billing cycle or the first cycle after the free trial period. |
ERROR_SUBSCRIPTION_BILLING_CYCLE_ANCHOR_INCORRECT | The request tried to create or update a subscription, but the billing cycle anchor was not recognized. The request was rejected. Corrective action: To create a subscription, set the 'billing_cycle_anchor' body parameter to a Unix timestamp. To update a subscription, set 'billing_cycle_anchor' to 'now' or 'unchanged'. |
ERROR_SUBSCRIPTION_BILLING_CYCLE_ANCHOR_NOT_UPDATED | The request tried to update a free trial period for a subscription, but the billing cycle anchor was not updated correctly. The request was rejected. Corrective action: Leave 'billing_cycle_anchor' blank, which resets it to the end of the new trial period. |
ERROR_SUBSCRIPTION_BILLING_CYCLE_ANCHOR_NOT_VALID | The request tried to create or update a subscription, but the date of the billing cycle anchor was set during the free trial period. The request was rejected. Corrective action: Set 'billing_cycle_anchor' with the same Unix timestamp as 'trial_end', or any time later than that. |
ERROR_SUBSCRIPTION_BILLING_CYCLE_ANCHOR_WITHIN_TRIAL | The request tried to create a subscription, but the date of the billing cycle anchor was set during the free trial period. The request was rejected. Corrective action: Set 'billing_cycle_anchor' with the same Unix timestamp as 'trial_end', or any time later than that. |
ERROR_SUBSCRIPTION_BILLING_INCORRECT | The request attempted an operation that requires the 'billing' body parameter, but it was not set to a valid value. The request was rejected. Corrective action: Set 'billing' to 'pay_automatically'. |
ERROR_SUBSCRIPTION_COUPON_CURRENCY | The request tried to add a coupon to a subscription, but the currency in the coupon did not match the currency of the plans in the subscription items. The request was rejected. Corrective action: Add a coupon that has the same currency as the plans in the subscription items. |
ERROR_SUBSCRIPTION_DUPLICATE_PLANS | The request attempted an operation on a subscription that would result in duplicate plans. The request was rejected. Corrective action: In the 'subscription_items' array, ensure that each plan ID is used one time, and set 'quantity' as required. |
ERROR_SUBSCRIPTION_NOT_FOUND | The request attempted an operation that requires a subscription ID, but the value was missing or was not recognized. The request was rejected. Corrective action: Provide a valid subscription ID. |
ERROR_SUBSCRIPTION_TRIAL_END_AND_TRIAL_PERIOD_SET | The request tried to create or update a subscription, but both 'trial_end' and 'trial_period_days' were set. The request was rejected. Corrective action: Set 'trial_end' or 'trial_period_days', but not both. |
ERROR_SUBSCRIPTION_TRIAL_END_NOT_VALID | The request tried to create or update a subscription, but the value of the 'trial_end' body parameter was not recognized. The request was rejected. Corrective action: Use a valid Unix timestamp for the 'trial_end' parameter. The maximum trial period length is 2 years. If there is no free trial, do not set this parameter. |
ERROR_SUBSCRIPTION_TRIAL_PERIOD_ALREADY_DEFINED | The request tried to define a trial period for a subscription, but the trial period was already defined in the plan. The request was rejected. Corrective action: Set 'trial_from_plan' to false and define either 'trial_end' or 'trial_period_days'. |
ERROR_SUBSCRIPTION_TRIAL_PERIOD_DAYS_NOT_VALID | The request tried to create or update a subscription, but the value of the 'trial_period_days' body parameter was not recognized. The request was rejected. Corrective action: Set 'trial_period_days' to an integer between 1 and 710. If there is no free trial, do not set this parameter. |
ERROR_SUBSCRIPTION_TRIAL_PERIOD_NOT_VALID | The request tried to update the trial period of a subscription, but the end of the new trial period is before the current date. The request was rejected. Corrective action: Set 'trial_period_days' such that the last day of the trial period is after the current day. |
ERROR_TAX_PERCENTAGE_NOT_VALID | The request attempted an operation that requires a tax percentage, but the value was not valid. The request was rejected. Corrective action: Set 'tax_percent' to zero or a positive decimal number. |
ERROR_TRIAL_END_TRIAL_FROM_PLAN_TOGETHER | The request tried to create or update a subscription, but the 'trial_end' and 'trial_from_plan' body parameters were both set. The request was rejected. Corrective action: To set a trial period, set 'trial_end' or 'trial_from_plan', but not both. |
ERROR_TRIAL_PERIOD_DAYS_MISMATCH | The request tried to add or update the list of subscription items in a subscription, but the plans in the subscription items did not all have the same value for 'trial_period_days'. The request was rejected. Corrective action: Update the plans so that they all have the same value for 'trial_period_days', or set 'trial_from_plan' in the subscription to 'false'. |
ERROR_UPDATE_SUBSCRIPTION_CUSTOMER_MISMATCH | The request tried to update a subscription with a new payment method, but the payment method does not belong to the customer. The request was rejected. Corrective action: For 'payment_method', use the ID of a payment method belonging to the customer specified for the subscription. |
ERROR_UPDATE_SUBSCRIPTION_PAYMENT_PENDING | The request tried to add a new payment method to a subscription, but the last payment on the subscription is still pending. The request was rejected. Corrective action: Complete or cancel the earlier payment, then resubmit the request. |
ERROR_UPDATE_SUBSCRIPTION_STATUS_NOT_UPDATABLE | The request tried to update a free trial period for a subscription, but the subscription status was not 'active' or 'trialing'. The request was rejected. Corrective action: Create a new subscription with a new trial period. |
INVALID_BILLING | The request tried to create a subscription or invoice, but the value of the 'billing' body parameter was not recognized. The request was rejected. Corrective action: Set 'billing' to 'pay_automatically'. |
INVALID_STATUS | The request tried to retrieve a list of subscriptions, but the 'status' query parameter was not recognized. The request was rejected. Corrective action: Set 'status' to one of the following values: 'trialing', 'active', 'past_due', 'unpaid', 'canceled', 'all' |
INVALID_SUBSCRIPTION_ID | The request tried to process a subscription or subscription item, but the subscription was not found. The request was rejected. Corrective action: Use the ID of a valid subscription. |
INVALID_SUBSCRIPTION_ITEM_QUANTITY | The request tried to create a subscription or a usage record, but the quantity for a subscription item was not valid or 'usage_type' in the relevant plan was set to 'metered'. The request was rejected. Corrective action: Use a positive integer for 'quantity' or create a new subscription item with a plan that has 'usage_type' set to 'metered'. |
INVALID_SUBSCRIPTION_ITEMS | The request tried to create or update a subscription, but the subscription items could not be identified. The request was rejected. Corrective action: Set the 'subscription_items' body parameter to be an object or an array of not more than 20 objects. |