Skip to main content

Stream API Errors

This page documents the error response format and the standardized error codes returned by Stream API endpoints. The goal is to provide a stable, predictable contract for client applications and integrators.

Error response envelope​

All handled errors return a response body in this format:

{
"error": {
"code": "STREAM_ERROR",
"message": "Something wrong happened, please contact support.",
"additional_info": "Optional human-readable details"
}
}
  • code: A stable error code from StreamErrorCodes.
  • message: A user‑facing message associated with the code.
  • additional_info: Optional, best‑effort details to aid debugging.

HTTP status codes​

HTTP statusMeaning
400The request is invalid.
401The API key is missing or invalid.
403The API key doesn't have permission for this action or resource.
404The resource doesn't exist.
410The resource is no longer available.
422The request failed validation, or a value conflicts with an existing record.

Stream error codes​

The following codes are used across all Stream API endpoints:

CodeMessage
STREAM_ERRORSomething wrong happened, please contact support.
STREAM_UNKNOWN_ERRORUnknown exception happened; this exception will be handled as soon as possible.
PHONE_ALREADY_REGISTEREDPhone is already registered.
INVALID_PARAMETERSRequest input is not valid.
INVOICE_FINALISEDInvoice is finalised and cannot undergo this action.
PAYMENT_REFUNDED_ALREADYDuplicate action; payment has already been refunded.
PAYMENT_REFUNDED_FAILEDCould not refund payment; processor failed.
DUPLICATE_CONSUMERConsumer already exists.
DUPLICATE_PAYMENTA payment with the given information already exists.
PERMISSION_FORBIDDENPermission forbidden.
PRODUCT_USED_IN_FINALIZED_INVOICEProduct cannot be updated; it is used by a finalized invoice.
COUPON_USED_IN_FINALIZED_INVOICECoupon cannot be updated; it is used by a finalized invoice.