Errors

Errors

Every error code API v1 answers with, what causes it and what to do.

An error is answered with Content-Type: application/problem+json and a body like this:

{
  "type": "https://docs.fungies.io/api/errors/KEY_INVALID",
  "title": "The API key is missing, malformed, unknown, revoked or expired",
  "status": 401,
  "code": "KEY_INVALID",
  "requestId": "req_01M6QZZQ39PEPXW3GKC68MRHTT",
  "retryable": false
}
  • code is what to branch on. It never changes for an error; title may be reworded.
  • type links the error's page below.
  • retryable says whether the same request can succeed later. Retry a write with the same Idempotency-Key.
  • requestId identifies the request. Quote it when you contact support.
  • detail, when present, says more about this occurrence. errors lists each field that failed, as { "path", "code" }.
CodeStatusTitleRetryable
BODY_INVALID400The body is not one JSON object this route takesno
BODY_NOT_JSON415A write takes an application/json bodyno
BODY_TOO_LARGE413The body is larger than 256 KiBno
CATALOGUE_NOT_WRITABLE409This workspace’s catalogue cannot be written through the API yetno
CATALOGUE_WRITE_REFUSED409The catalogue refused this writeno
CHARGE_BELOW_MINIMUM400The charge is below the payment provider’s minimum for its currencyno
CHARGE_CAP_EXCEEDED422The charge is above its cap: ten times the cycle amountno
CHARGE_LINES_UNPRICED422A line names an offer not priced in the subscription’s currencyno
CHARGE_NOT_FOUND404No such charge in this workspace and modeno
CHARGE_NOT_SERVED422This subscription cannot be charged through the API yetno
CHARGE_QUOTA_EXCEEDED429The subscription took its charges for the last 24 hours; retry after the stated delayyes
CHARGE_SCHEDULE_AMOUNT_SOURCE_NOT_SERVED422Only offer_lines is charged through the API yetno
CHARGE_SCHEDULE_INSTRUMENT_NOT_SERVED422Only subscription_current is charged yetno
CHARGE_SCHEDULE_NOT_FOUND404No such charge schedule in this workspace and modeno
CHARGE_SCHEDULE_TRANSITION_REFUSED409The schedule’s status does not lead thereno
CHARGES_NOT_ENABLED403Charges through the API are not enabled for this workspace yetno
CURSOR_INVALID400The cursor is not one this list issuedno
CUSTOMER_NOT_FOUND404No such customer in this workspace and modeno
DISCOUNT_ARCHIVED409The discount is archivedno
DISCOUNT_CODE_BY_TYPE400A code discount names a code; a sale names noneno
DISCOUNT_CODE_TAKEN409Another live discount in this mode has this codeno
DISCOUNT_CURRENCY_ABSENT409The stored discount has no currency; send oneno
DISCOUNT_CURRENCY_MISMATCH409The currency is not the one this workspace prices its offers inno
DISCOUNT_NOT_FOUND404No such discount in this workspace and modeno
DISCOUNT_OFFER_UNKNOWN400An offer id is not a live offer in this modeno
DISCOUNT_TIMEZONE_INVALID400timezone is not an IANA time zoneno
DISCOUNT_VALUE_NOT_REPRESENTABLE400A percentage is whole, 1 to 100; a fixed value is at least 1no
DISCOUNT_WINDOW_INVALID400validUntil is after validFromno
FEATURE_NOT_ENABLED403This feature is not enabled for this workspaceno
FIELD_UNKNOWN400The body names a field this route does not takeno
IDEMPOTENCY_IN_PROGRESS409A request with this Idempotency-Key is still in progressyes
IDEMPOTENCY_KEY_INVALID400The Idempotency-Key is not 1 to 255 printable charactersno
IDEMPOTENCY_KEY_REQUIRED400This write needs an Idempotency-Key headerno
IDEMPOTENCY_KEY_REUSED409This Idempotency-Key was used with another requestno
INTERNAL500The request failed on our sideyes
KEY_IN_URL400An API key may only be sent in the Authorization headerno
KEY_INVALID401The API key is missing, malformed, unknown, revoked or expiredno
KEY_SCOPE_MISSING403The API key does not hold a scope this route needsno
KEY_VERIFY_UNAVAILABLE503The API key could not be verified right nowyes
LIMIT_INVALID400The limit is not a whole number from 1 to 100no
LIST_TOO_BROAD422The list cannot be read whole in time; narrow it with a filterno
MEDIA_CONTENT_TYPE_REFUSED400An image is PNG, JPEG or WebPno
MEDIA_KEY_INVALID400The media key was not issued for this rowno
MEDIA_TOO_LARGE400An image is at most 10 MiBno
MEDIA_UPLOAD_EXPIRED409The upload this Idempotency-Key signed has expired; sign with a new keyno
METHOD_NOT_ALLOWED405Method not allowed on this routeno
MODE_NOT_PROVISIONED409This workspace is not provisioned in this key’s mode yetno
OFFER_ARCHIVED409The offer is archived; restore it firstno
OFFER_CURRENCY_MISMATCH400The price is not in the workspace’s currencyno
OFFER_CURRENCY_UNSET409The workspace’s currency is not set yetno
OFFER_HAS_CURRENCY_PRICES409The offer is priced per currency; one price cannot restate itno
OFFER_KEY_NOT_FOUND404No such key in this offer, workspace and modeno
OFFER_KEYS_NOT_SERVED422This workspace’s key stock cannot be written through the API yetno
OFFER_NOT_FOUND404No such offer in this workspace and modeno
OFFER_NOT_KEYED409The offer is not a key offer of this workspace’s published catalogueno
OFFER_STOCK_IS_KEY_COUNT400A key offer’s stock is its key countno
OFFER_TERMS_INVALID400The offer’s terms break a pricing rule; detail names itno
ORDER_ITEM_NO_DOWNLOAD409The item has no file to downloadno
ORDER_ITEM_NOT_FOUND404No such item in this orderno
ORDER_ITEM_WITHHELD409The item is refunded or withheldno
ORDER_NOT_FOUND404No such order in this workspace and modeno
ORDER_NOT_PAID409The order is not paidno
ORDER_SERVED_BY_V0409This order is served by API v0; download its item thereno
PAYMENT_NOT_FOUND404No such payment in this workspace and modeno
PRODUCT_ARCHIVED409The product is archived; restore it firstno
PRODUCT_HAS_OPEN_OFFERS409An offer of the product is on sale; archive with archiveOffersno
PRODUCT_KIND_NEEDS_FOLDER400This kind needs a folder, which this API does not set yetno
PRODUCT_KIND_NOT_GAME400Only a game takes game fieldsno
PRODUCT_NOT_FOUND404No such product in this workspace and modeno
PRODUCT_REQUIREMENT_SYSTEM_UNLISTED400A requirement names a system the product does not listno
QUERY_PARAM_INVALID400A query field’s value is not one this route takesno
QUERY_PARAM_UNKNOWN400The query names a field this route does not takeno
RATE_LIMITED429Too many requests; retry after the stated delayyes
ROUTE_NOT_FOUND404No such routeno
SERVICE_UNAVAILABLE503The service could not answer; retry with the same Idempotency-Keyyes
STALE_WRITE409The row changed since expectedUpdatedAt; current holds itno
SUBSCRIPTION_ALREADY_PAUSED409The subscription’s collection is already pausedno
SUBSCRIPTION_ENDED409The subscription has endedno
SUBSCRIPTION_LEGACY_BORN409This subscription was sold before the API v1 records; manage it through v0no
SUBSCRIPTION_NOT_CHARGEABLE422The subscription is not active or past due here, or has no instrument to chargeno
SUBSCRIPTION_NOT_FOUND404No such subscription in this workspace and modeno
SUBSCRIPTION_NOT_TRIALING409The subscription is not in its trialno
SUBSCRIPTION_WRITE_NOT_SERVED422This subscription cannot be written through the API yetno
TAG_NAME_TAKEN409A live tag has this name; current holds itno
TAG_UNKNOWN400A tag id is not a live tagno
TAX_LOCATION_UNRESOLVABLE422Tax could not be calculated for the location givenno
TAX_NUMBER_FORMAT_INVALID400The taxNumber is not in this scheme’s formatno
TAX_NUMBER_REQUIRED400A company quote needs its taxNumberno
TAX_NUMBER_TYPE_NOT_FOR_COUNTRY400The taxNumberType is not available for this countryno
TAX_NUMBER_TYPE_UNKNOWN400The taxNumberType is not one a checkout acceptsno
TEST_HELPER_LIVE_KEY403A test helper takes a test-mode key onlyno
TEST_PURCHASE_CHECKOUT_FOREIGN403The checkout is not one of this key’s workspaceno
TEST_PURCHASE_STEP_REFUSED422A checkout step of the test purchase was refusedno
USAGE_EVENT_NOT_FOUND404No such usage event in this workspace and modeno
USAGE_EVENT_OUTSIDE_WINDOW422The event is over an hour old or over five minutes aheadno
USAGE_EVENT_VALUE_NOT_NUMERIC422The metered property is not a finite numberno
USAGE_METER_ARCHIVED409The usage meter is archived; restore it firstno
USAGE_METER_DEFINITION_FIXED409An event has matched the meter; its event name and aggregation are fixedno
USAGE_METER_EVENT_NAME_TAKEN409A live meter already counts this event nameno
USAGE_METER_NOT_FOUND404No such usage meter in this workspace and modeno
USAGE_UNAVAILABLE503Usage could not be read or written right now; retryyes
VARIANT_ARCHIVED409The variant is archived; restore it firstno
VARIANT_HAS_OFFERS409Offers name the variant; archive with archiveOffersno
VARIANT_NOT_FOUND404No such variant in this workspace and modeno
VARIANT_ORDER_MISMATCH409The order must name every live variant onceno
WEBHOOK_DELIVERY_NOT_FOUND404No such webhook delivery in this workspace and modeno
WEBHOOK_DELIVERY_NOT_RETRYABLE409Only a settled delivery inside its replay window can be retriedno
WEBHOOK_ENDPOINT_LIMIT_REACHED409This workspace holds the most webhook endpoints it mayno
WEBHOOK_ENDPOINT_NOT_FOUND404No such webhook endpoint in this workspace and modeno
WEBHOOK_ENDPOINT_NOT_WRITABLE409This webhook endpoint can be changed in the dashboard onlyno
WEBHOOK_EVENT_TYPE_UNKNOWN400The type is not an event type the catalogue namesno
WEBHOOK_NOT_SUBSCRIBED409The endpoint is not subscribed to this event typeno
WEBHOOK_TYPE_NOT_IN_VERSION409The event type has no rendering at the API version the endpoint pinsno
WEBHOOK_URL_NOT_ALLOWED422Webhooks are sent over HTTPS on port 443 to a public host onlyno
WORKSPACE_HISTORY_UNMAPPED409This workspace’s earlier records are not mapped to the API yetno
WORKSPACE_INACTIVE403The account this subscription bills on takes no paymentsno