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

# Download invoices and receipts for your payments

> China e-invoices for WeChat Pay/Alipay orders and Stripe receipts for international orders: how to request, download, and use them for accounting.

Every paid Aria Compute top-up can be turned into a downloadable document. The China site issues electronic invoices (电子发票) for WeChat Pay and Alipay orders. The international site provides Stripe receipts.

## China site: e-invoice (电子发票)

<Steps>
  <Step title="Request an invoice for a paid payment">
    ```bash theme={null}
    curl -X POST https://ariacompute.cn/api/billing/invoices \
      -H "Authorization: Bearer eyJhbGciOi..." \
      -H "Content-Type: application/json" \
      -d '{
        "payment_id": "pay_01H...",
        "title": "北京某某科技有限公司",
        "tax_id": "91110000..."
      }'
    ```

    ```json theme={null}
    {
      "id": "inv_01H...",
      "payment_id": "pay_01H...",
      "title": "北京某某科技有限公司",
      "tax_id": "91110000...",
      "amount": 100,
      "currency": "CNY",
      "status": "issued"
    }
    ```

    Invoices are idempotent per `payment_id`: repeated requests return the same invoice.
  </Step>

  <Step title="Download the invoice">
    The download endpoint accepts the session token as a query parameter so a plain browser link works.

    ```bash theme={null}
    curl -L "https://ariacompute.cn/api/billing/invoices/pay_01H.../download?token=eyJhbGciOi..." \
      -o invoice.pdf
    ```

    You can also use `Authorization: Bearer` if you are calling from a server:

    ```bash theme={null}
    curl -L -H "Authorization: Bearer eyJhbGciOi..." \
      https://ariacompute.cn/api/billing/invoices/pay_01H.../download \
      -o invoice.pdf
    ```
  </Step>
</Steps>

## International site: Stripe receipt

Stripe payments do not need a separate request: the receipt is generated automatically once the payment is `paid`.

```bash theme={null}
curl -L "https://ariacompute.com/api/billing/receipts/pay_01H.../download?token=eyJhbGciOi..." \
  -o receipt.html
```

Or with a Bearer header:

```bash theme={null}
curl -L -H "Authorization: Bearer eyJhbGciOi..." \
  https://ariacompute.com/api/billing/receipts/pay_01H.../download \
  -o receipt.html
```

## When to use which

| Site              | Providers          | Document |
| ----------------- | ------------------ | -------- |
| `ariacompute.com` | Stripe             | Receipt  |
| `ariacompute.cn`  | WeChat Pay, Alipay | 电子发票     |

<Note>
  `?token=` is the same JWT you send in `Authorization: Bearer`. It exists so a plain `<a href>` link can download the file without setting headers.
</Note>

## Related

* [Top up your wallet](/guides/top-up-wallet)
* [POST /api/billing/invoices](/api-reference/billing/invoices)
* [GET /api/billing/receipts/](/api-reference/billing/receipt-download){paymentId}[/download](/api-reference/billing/receipt-download)


## Related topics

- [GET /api/billing/receipts/{paymentId}/download — download Stripe receipt](/api-reference/billing/receipt-download.md)
- [GET /api/billing/invoices/{paymentId}/download — download invoice](/api-reference/billing/invoice-download.md)
- [Top up your wallet with Stripe, WeChat Pay, or Alipay](/guides/top-up-wallet.md)
- [Prepaid wallet, top-ups, and usage billing](/concepts/wallet-billing.md)
- [GET and POST /api/billing/invoices — list and request invoices](/api-reference/billing/invoices.md)
