Reference

Error codes

The error body every ShipRev API returns, each error code with its HTTP status and what to do, and how errors reach you through the Server SDK.

Every endpoint of the Management API and the Public API, and the calls the Server SDK makes, answer an error with the same body. Branch on code, never on message.

The error body

json
{
  "error": {
    "code": "ACTIVE_SUBSCRIPTION_EXISTS",
    "message": "An active subscription already exists for this organization",
    "request_id": "req_...",
    "details": { "subscription_id": "sub_...", "status": "ACTIVE" }
  }
}
FieldMeaning
codeA stable code: one of the codes below, or a generic code named after the HTTP status
messageA readable English sentence for logs; it may change
request_idThe ID of the request; quote it when you contact us
detailsOptional. An object with the facts named in the code's row, or, for VALIDATION_ERROR from request validation, a list of the rules that failed

Some answers carry headers as well: VERIFICATION_RATE_LIMITED comes with Retry-After. Unknown fields in a request body are dropped, not refused.

A failed request validation looks like this:

json
{ "error": { "code": "VALIDATION_ERROR", "message": "Validation failed", "request_id": "req_...", "details": ["email must be an email"] } }

Generic codes

An error without a code of its own carries the name of its HTTP status:

CodeHTTP statusMeaning
BAD_REQUEST400The request cannot be served as sent; the message says why
UNAUTHORIZED401No credential, or a credential that is invalid or expired
FORBIDDEN403The credential is valid but not allowed to do this
NOT_FOUND404No such resource, or not one the credential can see
CONFLICT409The resource is in a state that does not allow this
PAYLOAD_TOO_LARGE413The request body is too large
UNSUPPORTED_MEDIA_TYPE415The request body is not in a supported format
TOO_MANY_REQUESTS429Too many requests; wait and retry
INTERNAL_SERVER_ERROR500An unexpected error; retry, and contact us with the request_id if it persists

Any other status without a name of its own carries HTTP_ERROR.

Error codes

Each code is returned with one HTTP status. Codes are meant to stay stable, and new codes may be added; ShipRev is in beta, and until its first release a code may still be renamed or change meaning. "Returned by" names the API: Management, Public, Server SDK (the calls the Server SDK makes to your region), Hosted sign-in, or Stripe webhooks (answers to Stripe, not to you).

Validation and sessions

CodeHTTP statusReturned byMeaningWhat to do
VALIDATION_ERROR400Management, Public, Server SDK, Hosted sign-inThe request body or a parameter failed validation; details lists each failed rule when it comes from request validation.Fix the request against the endpoint schema and resend; do not retry unchanged.
PROJECT_CONTEXT_REQUIRED400Management, PublicThe session has no current application selected, and this endpoint acts on one application.Select or switch to an application in the session, then retry.
STATE_STORE_UNAVAILABLE503PublicThe short-lived state store behind social sign-in or email verification cannot be reached; nothing was changed.Retry after a short delay with backoff.
UPSTREAM_LEVEL_RESTRICTED403Management, Public, Server SDKShipRev has not confirmed your plan within the validity period, so new writes are refused; details carry level, source and expired.Reads, sign-in and usage reporting keep working; the restriction lifts on ShipRev's next answer. Contact us if it persists.
UPSTREAM_SCOPE_VIOLATION403Server SDKThe credential is scoped to one organization and the request names another.Send requests only for the organization the credential was issued to.
SDK_GATE_UNRESOLVED409Management, Server SDKNo single end-user gate serves the application of this SDK key, so a service token cannot be issued.Contact us with the application ID.

Sign-in, accounts and email verification

CodeHTTP statusReturned byMeaningWhat to do
ACCOUNT_LINKING_VERIFICATION_REQUIRED409PublicA social sign-in matched an existing account whose email is not yet verified, so the social identity cannot be linked.Sign in with the account password (and verify the email) first, then link the social provider.
PASSWORD_RESET_TOKEN_INVALID400PublicThe password reset link is invalid, expired or already used.Request a new password reset email and use the new link.
CURRENT_PASSWORD_INVALID400PublicThe current password supplied for a password change is incorrect.Ask the user to re-enter the current password.
EMAIL_VERIFICATION_REQUIRED403PublicThe account must verify its email before it can hold a session; details carry a verification ticket (email, verification_ticket, ticket_expires_in, code_sent) when returned by sign-up or sign-in.Send the user through email verification with the returned ticket, then sign in again.
VERIFICATION_TICKET_INVALID401PublicThe email verification ticket is invalid, expired or no longer matches the account.Sign in again to obtain a fresh verification ticket.
VERIFICATION_CODE_INVALID400PublicThe email verification code is incorrect.Ask the user to re-enter the code; request a new one if needed.
VERIFICATION_CODE_EXPIRED400PublicThe email verification code has expired.Request a new verification code.
VERIFICATION_CODE_ATTEMPTS_EXCEEDED400PublicToo many incorrect codes were entered for this verification code.Request a new verification code.
VERIFICATION_RATE_LIMITED429PublicToo many verification codes were requested; the response has a Retry-After header and details.retry_after in seconds.Wait the indicated number of seconds before requesting another code.
EMAIL_ALREADY_VERIFIED409PublicThe email is already verified, so there is nothing to confirm or resend.Treat verification as done and continue to sign-in.
EMAIL_CHANGE_NOT_ALLOWED403PublicThe email of an account that joined through an invitation cannot be changed.Keep the invited email; contact the organization admin if a different email is needed.
S3_STORAGE_DISABLED501PublicFile storage is not configured in this region, so uploads such as avatars are unavailable.Do not offer the upload.
S3_STORAGE_UNAVAILABLE503PublicThe file storage bucket could not be reached.Retry later with backoff.

Hosted sign-in and OIDC

CodeHTTP statusReturned byMeaningWhat to do
OIDC_ISSUER_INVALID400ManagementThe OIDC issuer host is not a verified brand domain of this end-user gate.Verify the domain on the gate first, or pass a host that is already verified.
RELYING_PARTY_GATE_INVALID409ManagementThe gate cannot hold relying parties: it is not an end-user gate or its OIDC provider is turned off.Use an end-user gate and turn its OIDC provider on first.
RELYING_PARTY_NOT_FOUND404ManagementNo relying party with this client ID exists on the gate.Check the client ID and gate, or list the gate's relying parties.
RELYING_PARTY_PUBLIC_CLIENT409ManagementA public client has no secret, so its secret cannot be rotated.Rotate secrets only for confidential clients.
OIDC_INTERACTION_INVALID400Hosted sign-inThe sign-in interaction is unknown, expired, already answered or not bound to this browser.Restart the authorization from the relying party.
OIDC_LOGIN_REJECTED401Hosted sign-inThe token presented to complete the sign-in is not a valid session token of this gate.Sign the user in again on this gate and submit the new session token.
OIDC_ACCOUNT_UNAVAILABLE403Hosted sign-inThe account cannot sign in: it is disabled, unverified or has no membership.Resolve the account state (verify email, restore access) before retrying; do not loop.
OIDC_STORE_UNAVAILABLE503Hosted sign-inThe OIDC interaction store is temporarily unavailable.Retry after a short delay, restarting the authorization if the interaction expired.
GATE_AMBIGUOUS409ManagementThe application is served by more than one end-user gate, so the target gate is ambiguous.Contact us; the application's gate setup must be resolved.
GATE_RETURN_URL_REQUIRED400Managementdefault_return_url is required while the customer portal is off.Set default_return_url, or keep the portal on.

Products and plans

CodeHTTP statusReturned byMeaningWhat to do
VERSION_IMMUTABLE400ManagementA published plan version cannot be modified.Create a new plan version and edit that draft instead.
VERSION_ALREADY_PUBLISHED400ManagementThe plan version has already been published.Treat it as published; create a new version for further changes.
PLAN_ALREADY_ARCHIVED400ManagementThe plan is already archived.No action needed; treat the archive as done.
PLAN_PRICE_NOT_ZERO400ManagementA plan subscribed without a payment method can only have versions priced 0.Set the price to 0 or turn off the no-card option for the plan.
EXTERNAL_SYNC_FAILED502ManagementSynchronizing the plan price with the payment provider failed.Retry the publish or connection step later; check the payment connection if it persists.

Subscriptions and checkout

CodeHTTP statusReturned byMeaningWhat to do
INSUFFICIENT_ROLE403PublicOnly an owner or admin of the organization can change its billing.Ask an owner or admin of the organization to perform the action.
ACTIVE_SUBSCRIPTION_EXISTS409Management, PublicThe organization already holds an active or past-due subscription; details carry subscription_id and status.Change the plan of the existing subscription instead of creating a new one.
CHECKOUT_PENDING_CONFIRMATION409PublicA previous checkout for the organization was paid and is awaiting confirmation; details name the pending subscription.Wait for confirmation and read the subscription again instead of starting a new checkout.
CHECKOUT_IN_PROGRESS409Management, PublicAnother checkout for the organization is in progress; details name the pending subscription.Complete or let the open checkout expire, then retry.
PLAN_VERSION_NOT_FOUND404Management, PublicThe plan version does not exist in this application.Check the plan_version_id against the published catalog.
PLAN_NOT_PUBLISHED400Management, PublicThe plan version is not published, or has no payment provider price yet.Publish the plan version (with a payment connection in place) before subscribing to it.
PLAN_NOT_NO_CARD400PublicThis plan version cannot be subscribed without a payment method.Use checkout with a payment method for this plan.
PLAN_ACCOUNT_LIMIT_REACHED409Public, Stripe webhooksThe account already holds a subscription to this plan in another organization; details may carry organization_id.Use the existing subscription, or choose another plan.
SUBSCRIPTION_NOT_FOUND404Management, PublicNo matching subscription was found (or no active one to change or cancel).Check the subscription ID or the organization's current subscription.
SUBSCRIPTION_NOT_ACTIVE409Management, PublicThe subscription is not active (past due, canceled, or canceled at the payment provider); details carry subscription_id and status.Read the subscription status; settle or create a subscription as appropriate.
SUBSCRIPTION_PROVIDER_MANAGED409ManagementThe subscription is managed by the payment provider and cannot be ended here; details carry subscription_id and origin.Cancel it through the payment provider flow instead.
PLAN_UNCHANGED409Management, PublicThe subscription is already on the requested plan version.No action needed.
PLAN_CHANGE_NOT_ALLOWED400Management, PublicThis plan change is not supported (for example a different product or currency, an add-on plan, or the provider refused it).Choose a compatible target plan version, or cancel and subscribe anew.
PLAN_CHANGE_CONFLICT409Management, PublicThe subscription changed while the plan change was being made.Read the subscription again and retry the change.
NO_ACTIVE_SUBSCRIPTIONNoneNoneReserved: the organization has no active subscription. No endpoint returns it today.No action needed.
INVALID_RETURN_URL400Publicreturn_url must be an https address on a verified brand domain of the gate.Pass a return_url on a verified brand domain.
BUYER_CUSTOMER_NOT_FOUND409PublicThe organization has no payment provider customer yet, so there is no billing portal or invoice history.Complete a paid checkout first.
CUSTOMER_EXISTS409ManagementA customer with this email already exists; details carry account_id.Use the existing customer.

Payment connection and webhooks

CodeHTTP statusReturned byMeaningWhat to do
PAYMENT_PROVIDER_UNAVAILABLE503Management, Public, Stripe webhooksThe payment provider could not be reached or did not complete the call.Retry later with backoff.
PAYMENT_PROVIDER_NOT_CONFIGURED503Management, PublicThe application has no active payment connection.Configure a payment connection for the application, then retry.
PAYMENT_CONNECTION_NOT_FOUND404ManagementThe application has no payment connection.Configure a payment connection first.
PAYMENT_CONNECTION_UNAVAILABLE410Stripe webhooksThe payment connection addressed by the webhook does not exist or is disabled.Payment provider side: remove or update the webhook endpoint.
PAYMENT_CONNECT_NOT_CONFIGURED409ManagementConnect with Stripe is not available in this region.Connect with your own Stripe keys instead.
PAYMENT_CONNECT_HOST_UNSUPPORTED409ManagementStripe Connect authorization can only be started on the configured console host.Open the payment settings on the host named in the message and start again.
PAYMENT_CONNECT_REVOKED409ManagementThe Stripe account was disconnected while the authorization was completing.Start the Stripe Connect authorization again.
PAYMENT_CONNECT_STATE_INVALID400ManagementThe Stripe Connect authorization state is invalid, expired or already used.Start the Stripe Connect authorization again.
PAYMENT_CONNECT_MODE_MISMATCH400ManagementThe Stripe account was connected in a different mode, live or test, than the region runs Connect with Stripe in.Connect the account again in the mode the page names.
PAYMENT_CONNECT_EXCHANGE_FAILED502ManagementStripe did not accept the authorization code.Start the Stripe Connect authorization again.
PAYMENT_CONNECT_REVOKE_FAILED502ManagementPayment collection was stopped, but Stripe did not confirm the disconnection.Call disconnect again to retry.
WEBHOOK_CONFIG_UNREADABLE400Stripe webhooksThe payment connection configuration could not be read to verify the webhook.Payment provider side: redelivery will fail until the connection is reconfigured; contact us if it persists.
WEBHOOK_SIGNATURE_INVALID400Stripe webhooksThe webhook signature is missing or invalid.Payment provider side: check the webhook signing secret.
RECHARGE_RECEIPT_SCOPE_MISMATCH422Stripe webhooksA payment receipt delivered by the payment provider names an organization or application outside this payment connection.Payment provider side: nothing is recorded; contact us if it persists.

Usage and wallets

CodeHTTP statusReturned byMeaningWhat to do
OCCUPANCY_LIMIT_REACHED409PublicThe allowance of this entitlement is fully occupied.Release an existing occupancy or upgrade the plan, then retry.
OCCUPANCY_NOT_RESERVED409PublicThe occupancy is no longer reserved (it expired or was released).Reserve a new occupancy and confirm it before it expires.
INSUFFICIENT_CREDITS400ManagementThe wallet adjustment would leave a negative balance.Use a smaller debit.
INSUFFICIENT_BALANCENoneNoneReserved. No endpoint returns it today.No action needed.

Export, import and provisioning

CodeHTTP statusReturned byMeaningWhat to do
PROJECT_NOT_FOUND404ManagementThe application does not exist or is not accessible to the caller.Check the application ID.
BUNDLE_INVALID400ManagementThe import bundle is malformed, or a writing import lacks confirm equal to the application ID.Fix the bundle, or pass confirm (or use dry_run=true to check only).
BUNDLE_TOO_LARGE413ManagementThe import bundle exceeds the size limit.Reduce the bundle size below the limit stated in the message.
BUNDLE_INCONSISTENT422ManagementThe bundle is internally inconsistent or does not match the written state; nothing was written.Export a fresh bundle and import it again.
IMPORT_IN_PROGRESS409ManagementAn import into this application is already running.Wait for the running import to finish, then retry.
GATE_SHAPE_UNSUPPORTED409ManagementExport and import support only applications with their own end-user gate.Contact us.
ID_CONFLICT409ManagementAn identifier or unique value in the bundle is already used outside this application.Import into the application the bundle came from, or remove the conflicting record.
IDEMPOTENCY_KEY_REUSED409ManagementThe Idempotency-Key was already used with a different provisioning request.Use a new Idempotency-Key for a different request, or resend the original request unchanged.
PROVISIONING_CANCELLED409ManagementThe provisioning request bound to this Idempotency-Key was cancelled.Start again with a new Idempotency-Key.
TENANT_SLUG_TAKEN409ManagementThe requested tenant slug is already in use.Choose a different slug.

Errors in the Server SDK

The Server SDK turns HTTP answers into errors as follows; the Server SDK reference lists every error it throws.

HTTP answerWhat you see
401 on any callThe client renews its service token once and sends the call again; only a second 401 reaches you
Another error from reserve(), confirm() or release()An Error with a numeric status and the error body in its message. A reservation the allowance cannot cover is a 400, a capability the plan does not grant a 404, a reservation already confirmed or released a 409
An error while sending buffered usageNothing is thrown: the events go to the backlog and to on_flush_failure, and are sent again
A usage event the region refusesNothing is thrown: the event goes to on_rejected with its reason, and is not sent again
A timeoutAn Error naming the timeout, set by presets.connect_timeout_ms

Session tokens are verified locally, so verifyToken() makes no request: its failures are TokenRejectedError or Error, and your service answers them with a 401. The capability guard answers a refusal with a 403.

© 2026 ShipRev