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:
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user