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_beforeandexpand[]onGET /payments,GET /checkout_sessionsandGET /customers;expand[]onGET /customers/{id};limit,starting_afterandending_beforeonGET /payments/{id}/attempts; andending_beforeonGET /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.
Related codes
parameter_missing-- the field is absentparameter_unknown-- the field is not one this endpoint acceptsparameter_unsupported-- a valid BODY field the endpoint does not act on yet