# \<Invoice />

<figure><img src="https://386337055-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuulYgSMMvPL7hiTgkFyZ%2Fuploads%2Fgit-blob-13f5f14795c197af10d3c8b47e759cc32de4f90c%2FScreenshot%202025-08-25%20at%2014.32.25.png?alt=media" alt=""><figcaption><p>The invoice component showing an paid invoice.</p></figcaption></figure>

<figure><img src="https://386337055-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuulYgSMMvPL7hiTgkFyZ%2Fuploads%2Fgit-blob-505c5d5602457a359d9d6c82c992bb066c5bbbd9%2FScreenshot%202025-08-25%20at%2014.35.04.png?alt=media" 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.
