# List recharge orders

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

List recharge orders for an account, ordered by creation time from newest to oldest.

```text
GET https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/recharge-orders
```

## Before you begin

1. Prepare a valid [personal access token](../../../../../guides/billing/credentials.md#personal-access-token) for the account owner.
2. Call [List current accounts](../accounts/current.md) to obtain the target account’s ID.

## Request example

Replace `$MOI_PERSONAL_ACCESS_TOKEN` and `$ACCOUNT_ID` in the example with your personal access token and the selected account’s ID.

```bash
curl -X GET \
  "https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/recharge-orders?page_size=2" \
  -H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN"
```

## Path parameters

::::{div} mo-api-parameter-table

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `accountID` | string | Yes | Target account ID from `items[].billing_account_id` in the List current accounts response. |

::::

## Query parameters

::::{div} mo-api-parameter-table

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `page_size` | integer | No | Page size, 1–100; omitted, nonpositive, or greater than 100 uses 50. |
| `page_token` | string | No | Next-page token. Omit for the first request; then use `next_page_token` from the response. |

::::

## Successful response

Returns HTTP `200` with the account’s recharge orders; the list is empty when no orders exist.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "items": [],
  "total": 0,
  "next_page_token": ""
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `items` | array of object | Records returned by this request. |
| `items[].payment_order_id` | string | Payment order ID. |
| `items[].order_no` | string | Recharge order number. |
| `items[].billing_account_id` | string | Billing account ID. |
| `items[].recharge_type` | string | Recharge type. |
| `items[].channel` | string | Payment channel. |
| `items[].pay_amount` | string | Payment amount as a decimal string. |
| `items[].pay_currency` | string | Payment currency. |
| `items[].base_credit` | string | Base Credit. |
| `items[].bonus_credit` | string | Bonus Credit. |
| `items[].total_credit` | string | Total Credit. |
| `items[].exchange_rate` | string | Credit exchange rate when the order was created. |
| `items[].tier_snapshot` | string | Recharge tier snapshot encoded as a JSON string; may be omitted. |
| `items[].status` | string | Order status. |
| `items[].refund_status` | string | Refund status. |
| `items[].dispute_status` | string | Payment dispute status. |
| `items[].provider_trade_no` | string | Payment provider transaction number; may be omitted. |
| `items[].expires_at` | integer | Order expiry time in Unix seconds. |
| `items[].created_at` | integer | Creation time in Unix seconds. |
| `items[].updated_at` | integer | Update time in Unix seconds. |
| `total` | integer | Total records matching the filters. |
| `next_page_token` | string | Next-page token; an empty string marks the last page. |

In field paths, `[]` denotes each array item. For example, `items[].payment_order_id` refers to the corresponding field in each item.

:::::
::::::
:::::::

For the next page, set `$NEXT_PAGE_TOKEN` to `next_page_token` from the preceding response and retain the same filters. Stop when the token is empty.

```bash
curl -X GET \
  "https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/recharge-orders?page_size=2&page_token=$NEXT_PAGE_TOKEN" \
  -H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN"
```

## Error response

Missing authentication returns HTTP `401`; provide a valid personal access token.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "unauthenticated",
  "message": "missing bearer token",
  "error": "missing bearer token"
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Error code. |
| `message` | string | Error message. |
| `error` | string | Compatibility error message, with the same content as message. |

:::::
::::::
:::::::
