fix: platform decrease usage when cancelling booking (#18241)

* fix: decrement billing upon cancelled booking

* docs: explain billing in FAQ

* update docs
This commit is contained in:
Lauris Skraucis
2024-12-18 14:50:31 +02:00
committed by GitHub
parent ad5d92dff0
commit e6a7ae7da3
2 changed files with 12 additions and 1 deletions
@@ -340,7 +340,10 @@ export class BookingsService_2024_08_13 {
}
const bookingRequest = await this.inputService.createCancelBookingRequest(request, bookingUid, body);
await handleCancelBooking(bookingRequest);
const res = await handleCancelBooking(bookingRequest);
if (!res.onlyRemovedAttendee) {
await this.billingService.cancelUsageByBookingUid(res.bookingUid);
}
if ("cancelSubsequentBookings" in body && body.cancelSubsequentBookings) {
return this.getAllRecurringBookingsByIndividualUid(bookingUid);
+8
View File
@@ -44,3 +44,11 @@ description: Answers to the most common questions about the Platform API and ato
Either of the two:
- Setting `Authorization: Bearer <token>` header where `<token>` is access token of the managed user.
- Setting `x-cal-client-id: <client-id>` and `x-cal-secret-key: <client-secret>` where `<client-id>` is OAuth client id and `<client-secret>` is OAuth client secret. Both can be copied from the dashboard.
### 10. When am I charged and not charged ?
- You are charged for scheduled booking only when the booking starts.
- If a booking is rescheduled you are still charged once.
- If a booking is cancelled then you are not charged for it.
### 11. What happens if there are more bookings than in my plan?
- You have to pay overage for each booking that exceeds the amount in your plan.