[#199] Booking and payment

Migrated from Redmine #199 | Author: Karl Oskar Andersen
Status: New | Priority: Normal | Created: 2018-07-23


Hello,

I am creating bookings through “Company administration service” (https://user-api.simplybook.me/admin), using the “book” method.

When I create the booking using this method, it is always makred as “Pay later”.

!https://i.imgur.com/4F58Zj0.png!

How do I go about marking this booking as “Pending payment” or similar, causing the booking to be removed in e.g. 20 minutes if no payment is made?

Maybe I am using the wrong api for this?

I tried to use the “Company public service” (https://user-api.simplybook.me/) method “book”.

but I am always receiving this message:

{“error”: {
“code”: -32068,
“message”: “Client authorization required”,
“data”:
}}

The booking api is as follows:

book ($eventId, $unitId, $date, $time, $clientData, , $count, $batchId, $recurringData)

I don’t see where to put the client authorization?

  • Karl Oskar Andersen

Karl Oskar Andersen wrote:

I am using these header fields for the call:

X-Company-Login: *****
X-Token: *****

Still getting:

{“error”: {
“code”: -32068,
“message”: “Client authorization required”,
“data”:
}}

All of the other api calls seems to work just fine,
I am only struggeling with the “Company public service” (https://user-api.simplybook.me/) method “book”.

Also bumping this thread as no one has answered yet,

Dmytro Bondarev wrote:

Hi! You are using client login plugin.
Please provide client_login and client_password to $clientData.
Or client_id and client_sign Where client_sign is md5(clilentId . clientHash . yourSecretKey);

Karl Oskar Andersen wrote:

Hello,

Thank you, it is working correctly now.
I just could not find these fields in the documentation.