> ## Documentation Index
> Fetch the complete documentation index at: https://docs.djigui.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Quotes

> A quote's statuses, its 24-hour expiry, and cancelling it.

A quote prices one of your vehicles under a coverage. You have 24 hours to pay it. Once paid, it opens a contract.

## Quote status

```mermaid theme={null}
stateDiagram-v2
    [*] --> awaiting_payment: POST /quote/create
    awaiting_payment --> payment_pending: POST /quote/{id}/pay
    payment_pending --> awaiting_payment: payment failed
    payment_pending --> paid: payment confirmed
    awaiting_payment --> cancelled: POST /quote/{id}/cancel
    awaiting_payment --> expired: 24 hours unpaid
    paid --> [*]
    cancelled --> [*]
    expired --> [*]
```

| `status` | Meaning | What you can do |
| - | - | - |
| `awaiting_payment` | Never paid, or every attempt failed. | [Pay](https://docs.djigui.io/api-reference/quotes/pay.md) or [cancel](https://docs.djigui.io/api-reference/quotes/cancel.md) it. |
| `payment_pending` | A payment is waiting for the payer to confirm in Wave. | Wait for it to settle. See [Payments](https://docs.djigui.io/guides/payments.md). |
| `paid` | Final. The payment opened the contract. | Follow the contract with `contractId`, or with [`GET /contract/quote/{quoteId}`](https://docs.djigui.io/api-reference/contracts/get-by-quote). |
| `cancelled` | Final. You cancelled it. | Nothing: create a new quote if you need one. |
| `expired` | Final. It was not paid within 24 hours. | Nothing: create a new quote. |

> [!NOTE]
>
> A paid quote's `status` stays `paid`. The contract has its own status (`pending`, `started`, `expired`): read it from the [contract](https://docs.djigui.io/guides/contracts.md#contract-status).

## Expiry

Every quote has an `expires` timestamp, 24 hours after its `created`. A quote not paid by then expires:

* [`GET /quote`](https://docs.djigui.io/api-reference/quotes/list) leaves it out.
* [`GET /quote/{id}`](https://docs.djigui.io/api-reference/quotes/get), [`GET /quote/{id}/status`](https://docs.djigui.io/api-reference/quotes/status), [paying](https://docs.djigui.io/api-reference/quotes/pay.md) and [cancelling](https://docs.djigui.io/api-reference/quotes/cancel.md) it answer `410 quote_expired`.

The quote expires at `expires` exactly, not a few minutes later.

If a payment is waiting for the payer when the 24 hours run out, the quote does not expire yet. It stays `payment_pending` until the payment settles: `paid` if the payer confirms, `expired` if the payment fails.

A quote also cannot be paid after its `startDate`, even within its 24 hours. See [Quotes that cannot be paid](https://docs.djigui.io/guides/payments.md#quotes-that-cannot-be-paid).

## Cancelling a quote

[`POST /quote/{id}/cancel`](https://docs.djigui.io/api-reference/quotes/cancel) cancels a quote you no longer want paid, for example when your client changes their mind. A cancelled quote stays in [`GET /quote`](https://docs.djigui.io/api-reference/quotes/list) and can no longer be paid.

You can only cancel a quote that is `awaiting_payment`. While a payment is waiting for the payer, cancelling answers `409 payment_in_progress`: wait for the payment to settle. Cancelling a cancelled quote again changes nothing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.