Skip to main content

parameter_invalid

HTTP 422, type invalid_request_error.

A parameter is present, but its value is not one this endpoint accepts.

Why it happened​

The response names the parameter in param, and the message says which of two cases applies.

  • A bad value. The parameter exists and is spelled correctly, but its value breaks a rule for it: the wrong format, out of range, or not one of the allowed values.
  • A query parameter that is not implemented on this request yet. The message says it is not implemented, or not supported, on this request. Today these are ending_before and expand[] on GET /payments, GET /checkout_sessions and GET /customers; expand[] on GET /customers/{id}; limit, starting_after and ending_before on GET /payments/{id}/attempts; and ending_before on GET /events.

How to fix it​

Read param and the message. For a bad value, correct that one value and send the request again. For a parameter that is not implemented yet, remove it and send the request again.

Retrying: retry only after fixing the parameter named in param. It is safe to retry with the same Idempotency-Key: a request refused for the shape of its parameters is refused before the key is claimed.