Best answer

"message" error: "Invalid JSON"

  • 13 June 2020
  • 1 reply

I am integrating with BOOKEO, I am using a POST function, but I am getting the following "message" error: "Invalid JSON", which may be the problem. Thank you


const options = {
  url: '',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/json'
  params: {
    'secretKey': '',
    'apiKey': ''
  body: {
    'paymentMethod': 'cash',
    'reason': 'prueba',
    'amount': '85000'

return z.request(options)
  .then((response) => {
    const results = response.json;

    // You can do any parsing you need for results here before returning them

    return results;


Best answer by David Mercer 17 June 2020, 18:35

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 2

@baruc You JSON is formatted correctly, but it is not valid for POSTing to a booking payment.  Take a look at the API documentation of the fields required for this JSON:!/Bookings/bookings__bookingNumber__payments_post