Skip to navigation

Errors

Every error from https://api.paid.ai/v1 has a 4xx or 5xx status and the same JSON body:

{
"error": {
"type": "invalid_request_error",
"code": "invalid_version",
"message": "Unknown API version '2020-01-01'.",
"param": "Paid-Version",
"requestId": "req_8f3a2c",
"docUrl": "https://docs.paid.ai/preview/developers/api/errors#invalid_version"
}
}
FieldDescription
typeThe category of error, one of the types below.
codeA stable, machine-readable code. Branch on this, not on message.
messageA human-readable explanation. It may change, so don’t parse it.
paramThe request field or header at fault, when there is one.
requestIdAlso in the Request-Id header. Include it when contacting support.
docUrlThis code’s entry on this page.

New codes may be added at any time, so handle a code you don’t recognise by its type and HTTP status.

Error types

TypeMeaning
invalid_request_errorThe request was malformed or failed validation.
authentication_errorThe API key is missing or invalid.
permission_errorThe key cannot use this endpoint or account.
idempotency_errorThe Idempotency-Key conflicts with another request.
rate_limit_errorToo many requests in too short a time.
api_errorSomething went wrong on Paid’s side.

Error codes

unauthorized

HTTP 401 · authentication_error

The API key is missing, malformed, revoked or expired.

To fix: Send a live API key as Authorization: Bearer <key>. Create a new key if this one was revoked.

session_revoked

HTTP 401 · authentication_error

The session behind this token has been signed out.

To fix: Sign in again, or use an API key instead of a session token.

forbidden

HTTP 403 · permission_error

The credentials are valid but cannot access this account.

To fix: Check the key belongs to the account you are calling, or ask an admin for access.

insufficient_scope

HTTP 403 · permission_error

The API key’s scopes do not cover this endpoint.

To fix: Use a key with the scope the endpoint requires, or add it to this key in Settings > API keys.

user_required

HTTP 403 · permission_error

Only a person signed in to Paid can do this, not an API key: it sends email for the account or acts on its behalf.

To fix: Do it from the Paid dashboard or Ask Paid.

customer_key_forbidden

HTTP 403 · permission_error

A customer-scoped API key called an endpoint it cannot use.

To fix: Call this endpoint with an account API key.

organization_required

HTTP 400 · invalid_request_error

The request did not say which account it is for.

To fix: Use an API key, which identifies its account, rather than a user token without one.

auth_context_error

HTTP 500 · api_error

Paid could not load the account for these credentials.

To fix: Retry with backoff. If it keeps happening, contact support with the requestId.

invalid_version

HTTP 400 · invalid_request_error

The API version is malformed or not a released version.

To fix: Send a version listed by GET /v1/api-version in Paid-Version, or omit the header to use your account’s pinned version.

rollback_window_expired

HTTP 400 · invalid_request_error

The account tried to move its pinned version back after the rollback window closed.

To fix: An upgrade can only be rolled back to the version it replaced, within 72 hours. Upgrade forward instead.

unknown_beta

HTTP 400 · invalid_request_error

Paid-Beta names a beta that does not exist, or is malformed.

To fix: Send name=vN values from GET /v1/betas, separated by commas.

beta_not_enabled

HTTP 403 · permission_error

The account is not enrolled in this private beta.

To fix: Ask Paid to enroll your account, then retry.

beta_header_required

HTTP 400 · invalid_request_error

A beta endpoint or field was used without opting in.

To fix: Send the beta’s header value from GET /v1/betas in Paid-Beta.

invalid_idempotency_key

HTTP 400 · invalid_request_error

Idempotency-Key is empty, longer than 255 characters, or not printable ASCII.

To fix: Send a unique key of 1 to 255 printable ASCII characters, such as a UUID.

idempotency_key_reused

HTTP 409 · idempotency_error

The Idempotency-Key was already used with a different request.

To fix: Use a new key for each distinct request. Reuse a key only to retry the same request.

idempotency_request_in_progress

HTTP 409 · idempotency_error

A request with this Idempotency-Key is still running.

To fix: Wait, then retry with the same key to get the first request’s result.

validation_error

HTTP 400 · invalid_request_error

The request body or parameters failed validation.

To fix: Read message for the field and the problem, then correct the request.

invalid_json

HTTP 400 · invalid_request_error

The request body is not valid JSON.

To fix: Send a JSON body with Content-Type: application/json, and check it parses.

payload_too_large

HTTP 413 · invalid_request_error

The request body exceeds 10 MB.

To fix: Split the request into smaller ones.

resource_missing

HTTP 404 · invalid_request_error

No resource or path matches the request.

To fix: Check the path, the HTTP method and any IDs in the request.

type_mismatch

HTTP 400 · invalid_request_error

A polymorphic field’s type doesn’t match the sub-object sent with it, or more than one sub-object was sent. param names the field.

To fix: Send type and only the sub-object named after it, e.g. { type: "perUnit", perUnit: { … } }.

reference_not_found

HTTP 400 · invalid_request_error

A reference in the body or query string doesn’t name a resource on the account. param names the field, e.g. customer or lines[0].price.

To fix: Check the ID or key in that field. An ID in the URL path that doesn’t resolve is resource_missing instead.

resource_archived

HTTP 400 · invalid_request_error

A resource the request names is archived, so it can’t be used for this. param names the field; it’s empty when the archived resource is the one in the path.

To fix: Use an active resource, or unarchive this one first.

resource_not_active

HTTP 400 · invalid_request_error

A resource the request names isn’t active: it’s still a draft, has ended or was deactivated. param names the field.

To fix: Use an active resource, or activate this one first.

status_conflict

HTTP 409 · invalid_request_error

The action can’t run on the object in the path from its current status, e.g. activating an active order or releasing a captured hold. message names the status and the statuses the action needs.

To fix: Retrieve the object, then use the action its status allows. A retry with the same Idempotency-Key replays the first response instead.

resource_in_use

HTTP 400 · invalid_request_error

The resource can’t be archived or changed this way while other resources still use it. param names the field when there is one.

To fix: Remove the references to it first; message says which.

resource_exists

HTTP 409 · invalid_request_error

A resource with this identifier (an externalId, key or alias) already exists on the account, ignoring letter case. param names the field.

To fix: Use a different identifier, or update the existing resource.

customer_mismatch

HTTP 400 · invalid_request_error

A resource the request names belongs to a different customer than the one the request is for. param names the field.

To fix: Use a resource that belongs to this customer.

internal_error

HTTP 500 · api_error

Something went wrong on Paid’s side.

To fix: Retry with backoff. If it keeps happening, contact support with the requestId.

currency_not_supported

HTTP 400 · invalid_request_error

currency is not enabled on the account.

To fix: Send a currency enabled under Settings > Invoicing, as a lowercase ISO 4217 code.

currency_locked

HTTP 400 · invalid_request_error

The customer has an order, so its currency cannot change.

To fix: Leave currency out of the update. Create a new customer to bill in a different currency.

customer_has_active_orders

HTTP 400 · invalid_request_error

The customer cannot be archived while it has an activating, active or paused order.

To fix: End or cancel the customer’s open orders, then archive it.

parent_livemode_mismatch

HTTP 400 · invalid_request_error

parent names a customer in the other mode: live for a test key, or test for a live key.

To fix: Name a parent in the same mode as the API key, or use a key for the parent’s mode.

parent_has_parent

HTTP 400 · invalid_request_error

Parents are one level deep: the named parent has a parent of its own, or the customer being given a parent has children.

To fix: Name a top-level customer as the parent, or move the customer’s children to another parent or null first.

parent_cycle

HTTP 400 · invalid_request_error

parent names the customer itself, or, for a customer unit, the unit itself or a unit under it.

To fix: Name a different customer as the parent, or send null. For a unit, name a unit outside its own subtree.

has_active_children

HTTP 400 · invalid_request_error

The customer cannot be archived while it is the parent of a customer that is not archived, or the customer unit while it has units under it that are not archived.

To fix: Give each child a new parent (or null, for a customer), or archive the children, then archive this one.

tax_provider_not_connected

HTTP 400 · invalid_request_error

Tax cannot be enabled while no tax provider is connected.

To fix: Connect Avalara or Kintsugi in the dashboard, then enable tax.

mixed_tax_codes

HTTP 400 · invalid_request_error

A prepaid commit taxed at purchase is scoped to products with different tax codes, so its invoice has no single code.

To fix: Set prepaid.taxBehavior to consumption, or create one commit per tax code by narrowing each scope to products that share one.

tax_provider_unavailable

HTTP 502 · api_error

The tax provider could not be reached, so the tax code could not be checked against its catalog.

To fix: Retry with backoff. Nothing was changed.

immutable_field

HTTP 400 · invalid_request_error

An update tried to change a field that can’t change after creation, such as a rate, a key or a reference.

To fix: Leave the field out of the update. param names it; the resource’s reference page says how to change it, usually by creating a replacement.

currency_mismatch

HTTP 400 · invalid_request_error

An amount or reference isn’t in the currency the request needs, such as an order’s currency.

To fix: Use a price, rate card, commit or plan that offers the order’s currency, or change the order’s currency while it’s a draft.

limit_exceeded

HTTP 400 · invalid_request_error

The request has more items than the resource allows, such as rates, adjustments, filters or outcomes.

To fix: Stay within the limit message names, or split the configuration.

forfeit_confirmation_required

HTTP 400 · invalid_request_error

Ending this would forfeit a remaining balance, and forfeitRemaining wasn’t true.

To fix: Send forfeitRemaining: true to confirm the balance is given up.

external_id_scopes_meter

HTTP 400 · invalid_request_error

The product’s externalId can’t change while a meter is scoped to it, because the meter matches on that ID.

To fix: Remove the meter’s scope on the product, or keep the current externalId.

percent_of_base_missing

HTTP 400 · invalid_request_error

A percent-of line names prices in of.lines that aren’t on the order.

To fix: Add the base prices to the order, or change the percent-of price’s base.

outcome_not_allowed

HTTP 400 · invalid_request_error

usage.outcome was sent for an events meter, which has no outcomes.

To fix: Leave usage.outcome out, or price a workflow or single-event meter.

meter_not_priceable

HTTP 400 · invalid_request_error

The meter can’t be priced on its own: it has groupBy, or uses a dashboard-only feature.

To fix: Price grouped meters with a rate card, or price a meter without groupBy.

price_in_active_plan

HTTP 400 · invalid_request_error

The price can’t be archived while an active plan lists it.

To fix: Update or archive the plan so it no longer lists the price, then archive the price.

ambiguous_match

HTTP 400 · invalid_request_error

Two rates match the same dimension values with equal specificity, so rating couldn’t choose between them.

To fix: Make one rate more specific, or remove one. param names a rate at fault.

meter_already_priced

HTTP 400 · invalid_request_error

One measure would be priced by both a price and a rate card on the same order.

To fix: Price each measure on an order through either a price or a rate card, not both.

no_common_currency

HTTP 400 · invalid_request_error

The plan’s lines share no currency.

To fix: Use prices and rate cards that offer at least one currency in common.

default_requires_upgrade_path

HTTP 400 · invalid_request_error

default: true was sent on a plan with no upgradePath.

To fix: Set upgradePath, or leave default out.

plan_legacy

HTTP 400 · invalid_request_error

The plan was converted from v2 without v1 prices, so it can’t be used on a v1 order.

To fix: Rebuild the plan on v1 prices, or use v2 for it.

upgrade_path_position_taken

HTTP 409 · invalid_request_error

Another plan already has this position in the upgrade-path group.

To fix: Choose a free position, or move the other plan first.

quantity_not_allowed

HTTP 400 · invalid_request_error

A line has a quantity, but its price has no unit (a usage price or flat fee).

To fix: Leave quantity out for that line.

quantity_out_of_range

HTTP 400 · invalid_request_error

A quantity is outside the price’s or line’s quantityLimits.

To fix: Send a quantity within quantityLimits.

quantity_limits_wider_than_price

HTTP 400 · invalid_request_error

A line’s quantityLimits are wider than its price’s.

To fix: Keep the line’s limits within the price’s quantityLimits.

interval_mismatch

HTTP 400 · invalid_request_error

A recurring price’s interval neither divides the order’s billing cycle evenly nor is a whole multiple of it.

To fix: Use a price whose interval fits the billing cycle, or change the cycle.

line_not_on_order

HTTP 400 · invalid_request_error

An amendment change names a line from another order.

To fix: Name an ordl_ line of this order.

no_material_changes

HTTP 400 · invalid_request_error

The amendment’s changes leave the order as it is.

To fix: Send at least one change that alters the order.

usage_billing_behind

HTTP 400 · invalid_request_error

Usage for a past period hasn’t been billed yet, so the usage line can’t be replaced now.

To fix: Retry once the period’s usage has been billed.

seats_exceed_quantity

HTTP 400 · invalid_request_error

The new quantity is below the line’s active seats.

To fix: Deactivate seats first, then lower the quantity.

order_ambiguous

HTTP 409 · invalid_request_error

Several orders share this externalId, so it can’t name one of them.

To fix: Name the order by its ord_ ID.

order_version_mismatch

HTTP 409 · invalid_request_error

The order changed since the expectedVersion sent.

To fix: Retrieve the order, check its changes, then preview again with its current version.

preview_stale

HTTP 409 · invalid_request_error

The order changed after the amendment was previewed.

To fix: Preview the amendment again and apply the new previewToken.

billing_unavailable

HTTP 503 · api_error

Billing couldn’t be reached to preview or apply the change. Nothing changed.

To fix: Retry with backoff.

commit_conflict

HTTP 409 · invalid_request_error

The invoiced minimum overlaps another on the order in both time and scope.

To fix: Change the dates or scope, or archive the other commit.

duplicate_outcome_key

HTTP 400 · invalid_request_error

Two outcomes, or an outcome and catchAll, share a key.

To fix: Give every outcome and the catch-all a distinct key.

single_event_field_not_allowed

HTTP 400 · invalid_request_error

A single-event meter sent a field only workflows or event aggregation use, such as identifier, close or aggregation.

To fix: Remove the field named in param.

alias_unit_conflict

HTTP 400 · invalid_request_error

customer is an alias of one unit and customerUnit names a unit outside its subtree.

To fix: Name a unit under the alias’s unit, or leave customerUnit out.

workflow_unit_conflict

HTTP 400 · invalid_request_error

The event names a different customer unit from the open workflow it joins.

To fix: Send every event of a workflow with the same customer unit.

incompatible_unit

HTTP 400 · invalid_request_error

A strict meter reads a Quantity whose unit can’t be converted to the meter’s unit.

To fix: Send the Quantity in a unit compatible with the meter’s.

unknown_provider

HTTP 400 · invalid_request_error

Paid’s model catalog doesn’t know the inference provider.

To fix: Send a provider Paid prices, or an amount for the line.

unknown_model

HTTP 400 · invalid_request_error

Paid’s model catalog doesn’t know the model.

To fix: Send a model Paid prices, or an amount for the line.

range_too_large

HTTP 400 · invalid_request_error

The range is longer than granularity allows.

To fix: Shorten the range, or use a coarser granularity.

misaligned_range

HTTP 400 · invalid_request_error

startsAt or endsAt doesn’t fall on a bucket boundary in timezone.

To fix: Send boundaries that line up with granularity in timezone.

depth_exceeded

HTTP 400 · invalid_request_error

The unit, or a moved subtree, would go below 16 levels.

To fix: Keep the tree within 16 levels, including the root.

root_unit_immovable

HTTP 400 · invalid_request_error

An update tried to move the customer’s root unit.

To fix: Move the units under the root instead.

root_unit_always_billable

HTTP 400 · invalid_request_error

A create or update tried to make the root unit non-billable.

To fix: Mark units under the root non-billable, or give the customer no order.

has_active_cap

HTTP 400 · invalid_request_error

The unit can’t be archived while it has an active spend cap.

To fix: End the spend cap, then archive the unit.

has_active_seat

HTTP 400 · invalid_request_error

The unit can’t be archived while it holds an active seat, or the customer is billed per seat, so its units can’t be created, changed or archived.

To fix: Deactivate or reassign the seat, then archive the unit. A customer billed per seat can’t use units.

alias_held_by_draft_customer

HTTP 400 · invalid_request_error

The alias value is a draft customer’s external ID: usage sent under it before the alias existed made that draft.

To fix: Use a different value, or name the draft customer by its cus_ ID and give it the details it lacks instead.

alias_system_managed

HTTP 400 · invalid_request_error

The alias was made by Paid, when a customer’s externalId changed or from a SalesBricks buyer, so it can’t be updated, archived, unarchived or deleted. It has systemManaged: true.

To fix: Leave it as it is; Paid keeps it so usage sent under the old ID still lands on the customer.

draft_has_billing

HTTP 400 · invalid_request_error

The draft customer to merge has credit grants, pending spends or other billing postings.

To fix: Resolve the draft’s billing first; it can’t be merged.

price_not_on_order

HTTP 400 · invalid_request_error

price isn’t on the order.

To fix: Name a seat price the order has a line for.

price_not_seat_based

HTTP 400 · invalid_request_error

price isn’t a recurring price with seats.

To fix: Name a recurring price with recurring.seats.

customer_unit_not_billable

HTTP 400 · invalid_request_error

The customer unit has effectiveBillable: false, so it can’t hold a seat.

To fix: Name a billable unit.

seat_limit_reached

HTTP 400 · invalid_request_error

The seat line is full: a purchased line has quantity active seats, or an assigned line reached quantityLimits.maximum.

To fix: Deactivate a seat, or raise the quantity with an amendment.

unit_already_has_seat

HTTP 400 · invalid_request_error

The unit already holds an active seat for this product.

To fix: Reassign or deactivate the existing seat.

refill_rollover_conflict

HTTP 400 · invalid_request_error

The grant sets both refill and rollover.

To fix: Send one of refill or rollover.

credit_currency_key_reserved

HTTP 400 · invalid_request_error

The credit currency key is an ISO 4217 currency code.

To fix: Choose a key that isn’t a currency code.

insufficient_credits

HTTP 409 · invalid_request_error

The customer’s spendable balance in the credit currency doesn’t cover the hold. Nothing was reserved.

To fix: Hold less, or wait until credits are granted or other holds settle. message states the spendable balance.

price_not_one_time

HTTP 400 · invalid_request_error

The auto top-up’s price isn’t a one-time price.

To fix: Name a one-time price that grants credits in the credit currency.

price_grants_mismatch

HTTP 400 · invalid_request_error

The auto top-up’s price doesn’t grant the rule’s credit currency.

To fix: Name a one-time price with a grants entry in the credit currency.

payment_method_required

HTTP 400 · invalid_request_error

collection: "chargeAutomatically" was set, but there is no card to charge: the customer has no payment method on file, or the one named (or the default) is a bank transfer account.

To fix: Use sendInvoice, or add a card first.

auto_top_up_conflict

HTTP 409 · invalid_request_error

The customer already has an enabled auto top-up for this credit currency.

To fix: Update or disable the existing rule.

invalid_request

HTTP 400 · invalid_request_error

The request was rejected.

To fix: Read message for the reason, then correct the request.

not_found

HTTP 404 · invalid_request_error

The requested resource does not exist.

To fix: Check the IDs in the request.

conflict

HTTP 409 · invalid_request_error

The request conflicts with the resource’s current state.

To fix: Fetch the resource again, then retry.

rate_limited

HTTP 429 · rate_limit_error

Too many requests in too short a time.

To fix: Wait for the Retry-After seconds, then retry.

api_error

HTTP 500 · api_error

An unexpected error.

To fix: Retry with backoff. If it keeps happening, contact support with the requestId.