Skip to main content

Response envelope

Every response, successful or not, uses the same envelope:
Don’t parse message for meaning: its text can change. Use code in your logic and displayError (or your own copy) for user-facing text.

HTTP statuses

Check code even when the HTTP status is 200. Some failures currently return 200:
  • A malformed JSON body, or one that fails field validation, returns 200 with code 100008 (internal_err). Fix the request; don’t retry it unchanged.
  • A quote for an unsupported pair, or an amount outside the route’s limits, returns 200 with code 0, empty quote data and a message such as No routes found for the selected options.
Rampnow doesn’t currently apply API rate limits and doesn’t send Retry-After.

Error codes

Retrying

  • Retry only codes marked Yes, with exponential backoff (for example 1s, 2s, 4s, up to 5 attempts).
  • Never retry 4xx responses or business errors unchanged. Fix the request or ask the user to change it.
  • Quotes, configuration endpoints and Get Order are safe to retry.
Don’t blindly retry Create Order (/ext/ramp_order/checkout). Orders aren’t de-duplicated by externalOrderUid, so a retry after a timeout or 5xx can create a second order. First call Get Order with your externalOrderUid, and retry only if orderList is empty.