> For the complete documentation index, see [llms.txt](https://stablemesh.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stablemesh.gitbook.io/docs/home/stablemesh-doc/developers/api/transactions.md).

# Transactions

`POST /v1/bill/list`

Returns a paginated list of card transactions, newest first. Filter by a single card, by BIN, or across all your cards.

***

## Request

```json
{
  "cardId": "card_xxx",
  "pageNumber": 1,
  "pageSize": 20
}
```

| Field        | Required | Description                                              |
| ------------ | -------- | -------------------------------------------------------- |
| `cardId`     | no       | Restrict to one card. Omit to query across your account. |
| `binId`      | no       | Restrict to a BIN (used when `cardId` is omitted).       |
| `pageNumber` | no       | 1-based page number. Defaults to the first page.         |
| `pageSize`   | no       | Page size. Defaults to `20`.                             |

If you pass a `pageNumber` beyond the last page, the API returns the last available page rather than an error.

***

## Response

```json
{
  "transactions": [
    {
      "transactionTime": "2026-06-01T10:15:00Z",
      "merchant": "GOOGLE ADS",
      "amount": "-12.50",
      "currency": "USD",
      "status": "COMPLETED"
    }
  ],
  "last": false,
  "totalPages": 5,
  "totalElements": 92
}
```

| Field           | Description                           |
| --------------- | ------------------------------------- |
| `transactions`  | The page of transactions              |
| `last`          | `true` if this is the final page      |
| `totalPages`    | Total number of pages                 |
| `totalElements` | Total transactions matching the query |

***

## Transaction statuses

| Status      | Meaning                                             |
| ----------- | --------------------------------------------------- |
| `COMPLETED` | Settled and funds deducted                          |
| `PENDING`   | Authorised; funds held (frozen) but not yet settled |
| `FAILED`    | Declined or failed                                  |
| `REVERTED`  | Reversed and funds returned                         |

***

## Example

```bash
curl -X POST https://api.stablemesh.io/v1/bill/list \
  -H "X-API-KEY: $SMK_KEY" -H "Content-Type: application/json" \
  -d '{"cardId":"card_xxx","pageNumber":1,"pageSize":20}'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://stablemesh.gitbook.io/docs/home/stablemesh-doc/developers/api/transactions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
