> ## 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.

# GET and POST /api/billing/invoices — list and request invoices

> List issued invoices or request a new e-invoice (电子发票) for a paid WeChat Pay or Alipay order. China site only, idempotent per payment.

Two operations on the invoice collection: list every invoice on the account, or request a new one for a paid China-site payment. Invoices are idempotent per `payment_id`; requesting one twice returns the same record.

<Note>
  Invoices apply to the China site only. On the international site, use [receipts](/api-reference/billing/receipt-download) instead.
</Note>

## GET /api/billing/invoices

**Auth:** Session Bearer

### Response

<ResponseField name="invoices" type="object[]">
  <Expandable title="invoice">
    <ResponseField name="id" type="string">
      Invoice identifier.
    </ResponseField>

    <ResponseField name="payment_id" type="string">
      Backing payment ID.
    </ResponseField>

    <ResponseField name="title" type="string">
      Invoice header (buyer name).
    </ResponseField>

    <ResponseField name="tax_id" type="string">
      Buyer tax ID.
    </ResponseField>

    <ResponseField name="amount" type="number">
      Invoiced amount.
    </ResponseField>

    <ResponseField name="currency" type="string">
      `CNY`.
    </ResponseField>

    <ResponseField name="status" type="string">
      `issued` or `pending`.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp.
    </ResponseField>
  </Expandable>
</ResponseField>

## POST /api/billing/invoices

**Auth:** Session Bearer

### Request

<ParamField body="payment_id" type="string" required>
  Paid payment to invoice.
</ParamField>

<ParamField body="title" type="string" required>
  Invoice header (buyer name in Chinese).
</ParamField>

<ParamField body="tax_id" type="string">
  Optional buyer tax ID (统一社会信用代码).
</ParamField>

### Response

Returns the created invoice with the same shape as the GET response.

## Example

```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..."
  }'
```

## Errors

| Status | Meaning                                                                                 |
| ------ | --------------------------------------------------------------------------------------- |
| `400`  | Missing field.                                                                          |
| `401`  | Missing or invalid session token.                                                       |
| `404`  | Payment not found or not paid.                                                          |
| `409`  | Invoice already exists for this payment (idempotent conflict, returns existing record). |


## Related topics

- [GET /api/billing/invoices/{paymentId}/download — download invoice](/api-reference/billing/invoice-download.md)
- [Prepaid wallet, top-ups, and usage billing](/concepts/wallet-billing.md)
- [Download invoices and receipts for your payments](/guides/invoices-receipts.md)
- [Authenticate requests to the Aria Compute API](/authentication.md)
- [API authentication: session tokens and API keys](/api-reference/authentication.md)
