# Invoicing and fees

These operations cover TMC service fees and invoice generation for car rental bookings.

**Webhooks used:** [PNR_V3](/openapi/webhookeventapi/webhooks/paths/pnr_v3/post), [SERVICE_CHARGE](/openapi/webhookeventapi/webhooks/paths/service_charge/post).

| Step | Operation  | Event trigger | Context |
|  --- | --- | --- | --- |
| 1 | `SERVICE_FEE` | When a TMC service fee is charged for the car booking. | A service fee has been charged by the TMC for a car booking.
The amount charged by a TMC depends on the contract and the configuration made on the Spotnana platform.
**Example:** A company's TMC charges a $10 booking fee per car reservation.
After the booking is confirmed, the `SERVICE_FEE` event is triggered with the charge details. |
| 2 | `INVOICE_GENERATED` | When an invoice document is created for the car booking or service fee. | Separate invoices are generated for the car booking and for any service fee incurred.
This event is also triggered for credit notes generated after cancellations and refunds.
**Example:** After a car is booked,
two `INVOICE_GENERATED` events are generated. One for the car booking and another for the TMC service fee. |


## Invoicing and service fee flow diagram

```mermaid
flowchart TD
    subgraph invoicing["Invoicing and fees"]
        A(["Car booking<br>confirmed"]) --> B["<b>SERVICE_FEE</b><br>―――――――――――<br>TMC fee<br>charged for this booking<br>(if configured)."]

        B --> C["<b>INVOICE_GENERATED</b><br>―――――――――――<br>Car booking invoice created."]

        B --> D["<b>INVOICE_GENERATED</b><br>―――――――――――<br>Service fee invoice created<br>(if service fee was charged)."]
    end

    style A fill:#f0f0f0,stroke:#999
    style B fill:#FF9800,color:#fff
    style C fill:#FF9800,color:#fff
    style D fill:#FF9800,color:#fff
```