[#1207] Workflow

Migrated from Redmine #1207 | Author: Nicolas Abrovich
Status: Feedback | Priority: High, I’m very impatient | Created: 2024-03-27


Hi

I would like to understand the workflow involved in using the login feature to create a booking.

  • Should I use the company’s public booking service API, the company admin service, or the REST API?
  • Additionally, I would like to clarify whether it is necessary to create the booking before making the Stripe payment, or create booking, wait payment, and confirm or cancelled after with stripe payment
  • Is it possible to use SBPayMe to establish a correlation between the Stripe ID and the invoice ID, as is currently the case with your client interface?

Do you have ressource to explains different step with login feature for booking and paid with best practices ?

Nicolas Abrovich wrote:

It’s possible to list all deprecated method in company public service api ?
your documentation is out of date

Dmytro Bondarev wrote:

Hi, with client login you can use book method with client_login, client_password parameters in $clientData. Or client_id and client_sign in $clientData.
Unfortunately not possible to establish a correlation between the Stripe ID and the invoice ID.
If you make booking from public side it will be automatically cancelled by timeout.

Nicolas Abrovich wrote:

In book public method :
book ($eventId, $unitId, $date, $time, $clientData, $additional, $count, $batchId, $recurringData)

can you give more details for params needed ? for exemple in rest api eventId is service, etc
and missing some informations and documentation in the jsonrpc doc is missing compared to the document rest

Dmytro Bondarev wrote:

Hi,

$eventId - Service id
$unitId - Provider id
$date - Start date of booking
$time - Start time of booking
$clientData - Client data is object, that can contains name/email/phone (eg. {name: “Test”, email: “test@gmail.com”…}), or client login details (by client_login and client_password or client_id, client_sign)
$additional - intake forms and additional parameters
$count - count for group booking
$batchId - batch id in case of multiple bookings, otherwise null
$recurringData - recurring settings in case recurring booking, otherwise null.

Here you can investigate more about JSON RPC API with example. API documentation | SimplyBook.me Online Scheduling

Nicolas Abrovich wrote:

Ok thanks, a booking was created, but no invoice or payment required in sbpay

Nicolas Abrovich wrote:

Here result of my booking created :


{"require_confirm":true,"bookings":[{"id":"498","event_id":31,"unit_id":5,"client_id":"253","client_hash":"-","start_date_time":"2025-01-09 14:15:00","end_date_time":"2025-01-09 16:20:00","time_offset":"0","is_confirmed":"1","require_payment":true,"code":"5ptdtjtk","hash":"-"}],"invoice":null}

There is require_payment, but what does it mean
is_confirmed:1 ?

Nicolas Abrovich wrote:

It possible to have a booking pending payment and after get payment link with admin api to redirect to stripe ?

Nicolas Abrovich wrote:

How can handle invoice when use book method and trigger only deposit payment like web version ??

Nicolas Abrovich wrote:

where to find the api key
X-Auth-Token for the sbpay.me api?

is it on the simplybook or sbpay website?

Nicolas Abrovich wrote:

Nicolas Abrovich wrote:

where to find the api key
X-Auth-Token for the sbpay.me api?

is it on the simplybook or sbpay website?

no need, I’ve found it!

But i still blocked to
How can handle invoice when use book method and trigger only deposit payment like web version ??

I want to book with a pending payment, but only with the deposit. then create a second pending payment associated with this one for the rest of the deposit.
I want the same behavior as the original.

Nicolas Abrovich wrote:

Pls, Can you give me an answer?