NovaCodes

Errors

Every error code, the product family it belongs to and what to do about it.

An error has an HTTP status and a JSON body with a stable code for your program and a message for a person. The format is the same in both product families. When an error is returned, nothing was charged.

{"error": {"code": "insufficient_balance", "message": "Your USD balance is USD 0.00; this order costs USD 8.99."}}

Error codes

The Family column says where a code can appear: Both, only the gift card & software endpoints, or only the eSIM endpoints (/esim/…). Codes of the family you do not sell never reach you.

HTTPcodeFamilyMeaningWhat to do
401invalid_keyBothMissing, wrong or revoked key.Check the Authorization header; create a new key if needed.
403account_not_allowedBothThe account is not wholesale (any more), or is blocked.Contact us.
403ip_not_allowedBothThe key is restricted to other IP addresses.Add this server’s address to the key, or call from an allowed server.
404not_foundBothNo order with that number or reference in this family. On the eSIM endpoints also: no such destination, or no eSIM with that ICCID on your account.Check the value, and that you are asking the right family: an eSIM order is only found under /esim/orders, a gift-card order only under /orders.
402insufficient_balanceBothThe named balance does not cover the order.Add balance in your dashboard, or charge the other balance.
409reference_in_useBothThe reference already belongs to one of your orders in the other family.Use a new reference. A reference is one order, whatever it bought.
422currency_unavailableBothThe product or plan has no price in that currency.Charge the other balance.
422invalid_requestBothA field is missing or malformed.Read message.
422order_refusedBothThe order could not be placed.Read message.
429—BothRate limit reached.Wait a few seconds and retry.
503api_disabledBothThe API is switched off for maintenance.Retry later.
404invalid_variantGift cardsNo such product in the API catalogue.Refresh your copy of /products.
409out_of_stockGift cardsFewer than quantity are available.Order fewer, or try later.
422limit_exceededGift cardsQuantity above the per-order limit.Split into several orders, each with its own reference.
422not_api_sellableGift cardsA website-only product.Order it on novacodes.app.
404 / 422invalid_planeSIMs404: no such plan in the API catalogue. 422: the plan cannot be ordered as asked: it went off sale, the quantity is not 1 to 30, or days is missing or outside the range of a daily plan.Read message. Refresh the destination’s plans and order again with a new reference.
422topup_not_allowedeSIMsThat plan cannot be added to this eSIM: it is not one of the eSIM’s top-up plans, or the eSIM is cancelled or expired.Choose a plan from GET /esim/esims/{iccid}/topups.
409not_cancellableeSIMsThe eSIM cannot be cancelled: it was installed, topped up or already cancelled, or its state could not be checked just now.Read message. Only the “could not check” case is worth another try, a minute later.

What is safe to retry

  • Timeouts, dropped connections, 429, 5xx: retry. For every call that buys something (POST /orders, POST /esim/orders, an eSIM top-up) keep the same reference.
  • 4xx with an error code: retrying unchanged gives the same answer. Fix the cause first.
  • An eSIM cancel carries no reference and needs none: an eSIM is refunded once, and a second cancel answers 409 not_cancellable.
A response without the error object is a success, also when the order's status is refunded: the order exists, and your money is back in your balance.