[#116] Simplybook.me not calling callback URL

Migrated from Redmine #116 | Author: Daniel Okwufulueze
Status: Closed | Priority: High, I’m very impatient | Created: 2018-02-21


Hi,

We have enabled API Custom Features. We successfully interact with Simplybook using the API methods.

Recently, we decided to send the booking_id of any booking created on simplybook.me directly to one of our endpoints using the callback URL feature. This has not worked. Whenever a new booking is created, nothing happens on our endpoint [it’s not getting any booking_id from Simplybook, not even a request is sent from Simplybook].

We have read the docs, and done everything as stated. Please help, in case we may be missing anything.

I have attached a snapshot of our API custom feature page where we set the callback URL.

Dmytro Bondarev wrote:

Hi! Please attach snapshot.
To check we need company login and your callback URL.
You can contact to our support and provide this information in case you do not want to publish it.

Daniel Okwufulueze wrote:

Hi, Dmitry.

Thanks for the reply. I have contacted Support about this.

I’ll update here how contacting Support went. I’m hoping we’ll resolve this soonest.

Dmytro Bondarev wrote:

We have checked and see that our server calls your URL.
I see that your URL returns 500 error.
So it looks like something wrong at your end.
Please check code, make sure that you expect raw data in json in POST.

Daniel Okwufulueze wrote:

Thanks for the raw JSON POST.

This has been fixed on our endpoint, with sample raw JSON POST requests sent to the callback URL on Postman without any issues, but Simplybook is still not posting anything to us.

Perhaps we’re reading the wrong key, this is a sample raw JSON POST we used to test on Postman:

{
“booking_id”: “42384”,
“booking_hash”: “”,
“company”: “cars45”,
“notification_type”: “create”
}

From Postman, this works fine. But once we create a new booking on Simplybook, nothing happens.

Please help look into this again. Also let me know if you’re still getting a 500 [because we aren’t anymore with raw JSON POST requests].

Thanks a lot for your time.

Daniel Okwufulueze wrote:

Hey, Dmitry.

I just tested again, and all is fine now. Simplybook now calls our Callback URL.

Again, thanks for your time.

Dmytro Bondarev wrote:

Hi!
Glad to hear that!

Daniel Okwufulueze wrote:

It turned out that the 500 error, after handling the raw JSON POST issue, was a missing / after the callback URL we supplied to Simplybook. Simplybook seems to append to the URL, the POST data without a / if one is missing, so the server sees this as one long and wrong URL and throws a 500.

I simply added the missing / to the callback URL on Simplybook API Custom Feature, and Simplybook worked fine.

For the sake of anyone who may have problems with Simplybook not calling their callback URL, ensure you’re expecting a raw JSON POST on your server, and supply a URL ending with a forward-slash [/] in the text field for callback URL in Simplybook, and you should be fine.

Cheers!