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

# Receipts

> Every paid invoice gets a receipt, emailed to the buyer automatically. Download the PDF, or send the email again.

When a payment clears, AgentaOS emails the buyer a receipt at the email they gave at checkout. You do not send it or build it. The receipt belongs to the paid invoice, and you can send it again if the buyer loses it. AgentaOS also emails you when you make a sale.

A receipt exists only for a paid invoice. An open or voided invoice has no receipt.

## In the dashboard

In the sidebar, click **Invoices**, then open a paid invoice from the **Paid** tab.

* **Download receipt** saves the receipt PDF.
* **Resend invoice** emails the receipt to the buyer again. The button is grayed out when the invoice has no buyer email.

<Frame caption="A paid invoice: Download invoice, Download receipt and Resend invoice.">
  <img src="https://mintcdn.com/agentokratia/ob7A8SZLgGb2oPrT/images/product/invoice-detail.png?fit=max&auto=format&n=ob7A8SZLgGb2oPrT&q=85&s=437134d55e4fc9580541fc0ba9227c58" alt="A paid invoice INV-2026-0001 for €12.40 with the buttons Download invoice, Download receipt and Resend invoice, the invoice preview from AgentaOS (Aristokrates OÜ) as merchant of record for ClientCo, and the details with the receipt number RCP-2026-0001" width="1440" height="790" data-path="images/product/invoice-detail.png" />
</Frame>

## Send a receipt again

Resending goes to the buyer's email on the invoice, the same address as the first receipt. Only an owner or an admin can resend a receipt.

<Tabs>
  <Tab title="SDK">
    ```typescript theme={"system"}
    const result = await agentaos.invoices.sendReceipt('invoice-uuid');
    console.log(result.sentTo); // the address it went to
    ```
  </Tab>

  <Tab title="CLI">
    ```bash theme={"system"}
    agenta invoices send-receipt invoice-uuid
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST https://api.agentaos.ai/api/v1/gateway/invoices/invoice-uuid/send-receipt \
      -H "x-api-key: sk_live_..."
    ```
  </Tab>
</Tabs>

The call returns `{ ok: true, sentTo }`. It fails when the invoice is not paid, or when the invoice has no buyer email.

## Download the receipt PDF

<Tabs>
  <Tab title="SDK">
    ```typescript theme={"system"}
    import { writeFileSync } from 'node:fs';

    const pdf = await agentaos.invoices.getReceipt('invoice-uuid');
    writeFileSync('receipt.pdf', pdf);
    ```
  </Tab>

  <Tab title="CLI">
    ```bash theme={"system"}
    agenta invoices receipt invoice-uuid -o receipt.pdf
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl https://api.agentaos.ai/api/v1/gateway/invoices/invoice-uuid/receipt \
      -H "x-api-key: sk_live_..." \
      -o receipt.pdf
    ```
  </Tab>
</Tabs>

An invoice from before receipts existed on AgentaOS has no receipt document. For that invoice, the call returns the invoice PDF, which is also a proof of payment.

## Next steps

<Columns cols={2}>
  <Card title="Invoices" icon="file-invoice" href="/payments/invoices">
    The invoice behind every receipt.
  </Card>

  <Card title="Customers" icon="users" href="/payments/customers">
    Where the buyer's email comes from.
  </Card>
</Columns>


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