# \<Invoice />

<figure><img src="/files/a4izVYNZ6Q59giZCHjF0" alt=""><figcaption><p>The invoice component showing an paid invoice.</p></figcaption></figure>

<figure><img src="/files/cuj0RTocdXFWJqIVR48N" alt=""><figcaption><p>An unpaid invoice. The user can add/remove payment methods here to conveniently pay an invoice.</p></figcaption></figure>

The above component is created using the props below

```tsx
<Invoice
    id={invoiceId}
    invoiceQuoteViewComponent={<div>Display custom invoice here</div>}
    onBackButtonClick={() => console.log("Clicked back button!")}
    backButtonName="Custom back button name"
    onInvoiceDownloadError={() => console.log("Handle invoice download error here")}
    onPaymentSuccess={(savePaymentMethod: boolean) => console.log("payment method saved: ", savePaymentMethod)}
    shadow="shadow-md"
    className={undefined}
    hideDownloadButton={false}
    onInvoiceLoaded={(invoice: FormattedInvoice) => console.log(invoice)}
    onQuoteLoaded={(quote: FormattedQuote) => console.log(quote)}
/>
```

### className

You can apply any tailwind css styling to the billing details component.

### invoiceQuoteViewComponent

Instead of the default quote display, you can pass in custom React code to display the invoice the way you'd like.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bunny.com/developer/less-than-billingdetails-greater-than-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
