Migrated from Redmine #1498 | Author: Roman Gaivoronskyi
Status: Resolved | Priority: Immediate, there is BUG! | Created: 2025-11-26
h2. Intro
Greetings team!
For us this is a urgent matter, especially considering this bug was already raised some time ago by another user: Bug #531: Invoice amount in API is wrong - API - Simplybook.me support for developers
Unfortunately, this bug persists, and is still unresolved
h2. Description
When fetching a list of bookings, fields payed_amount and invoice_amount are incorrect. It seems that the value for those fields is not parsed correctly on simplybook API side, and it probably tries to multiply service price by an amount of objects in a cart, instead of summing them correctly.
For example, we have a service priced at 36 CHF, and a product inside this service that is priced at 18 CHF.
When booking this service with 3 products, the total price SHOULD be 36 + 18 * 3 = 90, but it actually comes out as 72 CHF
When fetching the actual booking by id, or using UI / Invoice or any other method to get details of a booking, this value is shown correctly. This is forcing us to send 1 request for each booking to fetch the correct data, instead of doing one getBookings request.
h2. Code
getBookings: {
url: 'https://user-api.simplybook.me/admin',
method: 'POST',
params: [
{
date_from: '2025-11-28',
date_to: '2025-11-28',
is_confirmed: 1,
order: 'start_date'
}
RESPONSE
[ {
"id": "123",
"record_date": "2025-11-26 16:55:40",
"start_date": "2025-11-28 13:00:00",
"end_date": "2025-11-28 15:00:00",
"client_timezone": null,
"unit_id": "13",
"text": "db",
"client": "db",
"unit": "SPA",
"unit_email": "",
"event": "SPA (With children)",
"event_id": "7",
"is_confirm": "1",
"client_id": "1465",
"client_phone": "+93111111111",
"client_email": "db@gmail.com",
"offset": "0",
"comment": "",
"code": "20su3er4u",
"event_duration": "120",
"event_buffertime_before": "0",
"event_buffertime_after": "0",
"batch_is_confirm": null,
"batch_type": null,
"event_category": "2",
"payment_status": "paid",
"payment_system": "delay",
"invoice_status": "paid",
"invoice_payment_received": "0",
"invoice_id": "80",
"invoice_number": "O-00000080",
"invoice_datetime": "2025-11-26 16:55:40",
"invoice_amount": "72.0000",
"invoice_currency": "CHF",
"payed_amount": "72.0000",
"payed_currency": "CHF",
"event_price": null,
"event_currency": null,
"is_google_maps_booking": false
}
]
And now, calling getBookingDetails for the same booking:
....
"number": "O-00000080",
"datetime": "2025-11-26 16:55:40",
"due_datetime": "2025-11-26 16:57:40",
"payment_datetime": null,
"amount": 126.05,
"recurring_amount": 0.0,
"deposit": 126.05,
"is_with_deposit_amount": false,
"deposit_is_client_can_pay_later": 0,
"rest_amount": 0.0,
"discount_amount": 1.4210854715202e-14,
"taxes": [],
"tax_amount": 0,
"currency": "CHF",
....