Error Codes

Complete reference of 40 error codes across 11 categories returned by the Subscriptions Service.

Error response formatjson
{
  "error": {
    "code": "ERR_SUBSCRIPTIONS_SUBSCRIPTION_NOT_FOUND",
    "message": "Subscription with ID abc-123 not found",
    "http": 404
  }
}

Subscription7 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_SUBSCRIPTION_NOT_FOUND404SUBSCRIPTION_NOT_FOUNDSubscription not foundVerify the subscription ID exists for this tenant
ERR_SUBSCRIPTIONS_SUBSCRIPTION_ALREADY_EXISTS409SUBSCRIPTION_ALREADY_EXISTSActive subscription already exists for this actorCheck if actor already has an active subscription
ERR_SUBSCRIPTIONS_SUBSCRIPTION_INVALID_STATE400SUBSCRIPTION_INVALID_STATESubscription is in an invalid state for this operationCheck subscription status before performing the operation
ERR_SUBSCRIPTIONS_SUBSCRIPTION_CANNOT_UPGRADE400SUBSCRIPTION_CANNOT_UPGRADESubscription cannot be upgradedTarget plan must be a higher tier and subscription must be active
ERR_SUBSCRIPTIONS_SUBSCRIPTION_CANNOT_DOWNGRADE400SUBSCRIPTION_CANNOT_DOWNGRADESubscription cannot be downgradedTarget plan must be a lower tier and subscription must be active
ERR_SUBSCRIPTIONS_SUBSCRIPTION_ALREADY_CANCELLED400SUBSCRIPTION_ALREADY_CANCELLEDSubscription is already cancelledCannot cancel a subscription that is already cancelled
ERR_SUBSCRIPTIONS_SUBSCRIPTION_NOT_ACTIVE400SUBSCRIPTION_NOT_ACTIVESubscription is not activeOperation requires an active subscription

Plan3 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_PLAN_NOT_FOUND404PLAN_NOT_FOUNDPlan not foundVerify the plan ID exists
ERR_SUBSCRIPTIONS_PLAN_INACTIVE400PLAN_INACTIVEPlan is not activeCannot subscribe to a deactivated plan
ERR_SUBSCRIPTIONS_PLAN_INVALID_TIER400PLAN_INVALID_TIERInvalid plan tierUse a valid SubscriptionTier value

Quota3 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_QUOTA_NOT_FOUND404QUOTA_NOT_FOUNDQuota not foundVerify quota exists for this subscription/feature
ERR_SUBSCRIPTIONS_QUOTA_EXCEEDED403QUOTA_EXCEEDEDQuota has been exceededUpgrade subscription or wait for quota reset
ERR_SUBSCRIPTIONS_QUOTA_LIMIT_REACHED403QUOTA_LIMIT_REACHEDQuota limit reached (100% utilization)Upgrade subscription tier for higher limits

Invoice3 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_INVOICE_NOT_FOUND404INVOICE_NOT_FOUNDInvoice not foundVerify the invoice ID exists
ERR_SUBSCRIPTIONS_INVOICE_ALREADY_PAID400INVOICE_ALREADY_PAIDInvoice has already been paidCannot pay an invoice that is already in paid status
ERR_SUBSCRIPTIONS_INVOICE_GENERATION_FAILED500INVOICE_GENERATION_FAILEDFailed to generate invoiceInternal error; retry or contact support

Payment3 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_PAYMENT_FAILED402PAYMENT_FAILEDPayment processing failedCheck payment method and retry
ERR_SUBSCRIPTIONS_PAYMENT_METHOD_REQUIRED400PAYMENT_METHOD_REQUIREDPayment method is requiredAdd a payment method before subscribing
ERR_SUBSCRIPTIONS_PAYMENT_INSUFFICIENT_FUNDS402PAYMENT_INSUFFICIENT_FUNDSInsufficient fundsEnsure sufficient balance and retry

Trial4 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_TRIAL_NOT_FOUND404TRIAL_NOT_FOUNDTrial not foundVerify the trial ID exists
ERR_SUBSCRIPTIONS_TRIAL_ALREADY_EXISTS409TRIAL_ALREADY_EXISTSTrial already exists for this actorActor already has an active trial
ERR_SUBSCRIPTIONS_TRIAL_EXPIRED400TRIAL_EXPIREDTrial has expiredTrial period has ended; subscribe to continue
ERR_SUBSCRIPTIONS_TRIAL_CANNOT_EXTEND400TRIAL_CANNOT_EXTENDTrial cannot be extendedTrial is at max duration or extension not allowed

Student/Startup Program4 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_STUDENT_ENROLLMENT_NOT_FOUND404STUDENT_ENROLLMENT_NOT_FOUNDStudent enrollment not foundVerify enrollment exists
ERR_SUBSCRIPTIONS_STUDENT_ENROLLMENT_ALREADY_EXISTS409STUDENT_ENROLLMENT_ALREADY_EXISTSStudent enrollment already existsActor is already enrolled in student program
ERR_SUBSCRIPTIONS_STARTUP_APPLICATION_NOT_FOUND404STARTUP_APPLICATION_NOT_FOUNDStartup application not foundVerify the application ID exists
ERR_SUBSCRIPTIONS_STARTUP_APPLICATION_ALREADY_EXISTS409STARTUP_APPLICATION_ALREADY_EXISTSStartup application already existsApplication was already submitted

Discount6 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_DISCOUNT_NOT_FOUND404DISCOUNT_NOT_FOUNDDiscount not foundVerify the discount ID exists
ERR_SUBSCRIPTIONS_DISCOUNT_CODE_ALREADY_EXISTS409DISCOUNT_CODE_ALREADY_EXISTSDiscount code already existsUse a different discount code
ERR_SUBSCRIPTIONS_DISCOUNT_EXPIRED400DISCOUNT_EXPIREDDiscount has expiredDiscount is past its validUntil date
ERR_SUBSCRIPTIONS_DISCOUNT_MAX_USES_REACHED400DISCOUNT_MAX_USES_REACHEDDiscount max uses reachedDiscount has been used the maximum number of times
ERR_SUBSCRIPTIONS_DISCOUNT_NOT_APPLICABLE400DISCOUNT_NOT_APPLICABLEDiscount not applicable to this planCheck applicablePlans for this discount
ERR_SUBSCRIPTIONS_DISCOUNT_INVALID_CODE400DISCOUNT_INVALID_CODEInvalid discount codeCode does not exist or is inactive

Referral3 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_REFERRAL_NOT_FOUND404REFERRAL_NOT_FOUNDReferral not foundReferral code lookup failed
ERR_SUBSCRIPTIONS_REFERRAL_CODE_INVALID400REFERRAL_CODE_INVALIDReferral code is invalidCheck code format and existence
ERR_SUBSCRIPTIONS_REFERRAL_ALREADY_USED400REFERRAL_ALREADY_USEDReferral code has already been usedCode was already redeemed

Validation3 errors

CodeHTTPNameDescriptionResolution
ERR_SUBSCRIPTIONS_INVALID_ACTOR_TYPE400INVALID_ACTOR_TYPEInvalid actor typeActor type must be "user" or "team"
ERR_SUBSCRIPTIONS_INVALID_BILLING_CYCLE400INVALID_BILLING_CYCLEInvalid billing cycleBilling cycle must be "monthly" or "annually"
ERR_SUBSCRIPTIONS_INVALID_TENANT_ID400INVALID_TENANT_IDInvalid tenant IDTenant ID must be a valid UUID

Authentication / Authorization4 errors

CodeHTTPNameDescriptionResolution
Unauthorized401UNAUTHORIZEDMissing or invalid JWT tokenProvide a valid JWT Bearer token
Internal API key not configured401INTERNAL_KEY_NOT_CONFIGUREDINTERNAL_API_KEY env var not set (fail-closed)Configure the INTERNAL_API_KEY environment variable
Invalid internal API key401INVALID_INTERNAL_KEYWrong x-internal-api-key header valueUse the correct internal API key
Forbidden resource403FORBIDDENInsufficient role for this endpointRequest required role from admin