0

I use extension Advanced Rest client And I want to send POST request with 3 params in body. On of them must be array. I use this

enter image description here

but I get error:

{
"error": {
"message": "Invalid array",
"param": "payment_method_types",
"type": "invalid_request_error"
}
}
Alexei
  • 14,350
  • 37
  • 121
  • 240

1 Answers1

1

The value you entered is not valid application/www-url-encoded value. In the editor you have "Encode payload" button that transforms the value you entered to valid message. It should be something like:

success_url=https%3A%2F%2Fexample.com%2Fsuccess&cancel_url=https%3A%2F%2Fexample.com%2Fcancel&payment_method_types=%5B%22card%22%5D

You can see the exact sent message in the response details, under request headers, and the "source message".

Pawel Uchida-Psztyc
  • 3,735
  • 2
  • 20
  • 41