# list_site_payments

Source: https://modulify.ai/docs/api/payments/list-site-payments

Lists the payments a site took, newest first, with their status, amounts, refunds and disputes.

- Title: List the payments of a site
- Scope: `config:read`
- Access: Read only
- Endpoint: `POST /v1/list_site_payments`

> **Payments are in alpha**
>
> Payments are open on a few sites while we test them. On any other site this tool is refused with `Payments are not available on this site yet!`. To ask for access, use the [support chat](https://modulify.ai/docs/reference/support-chat).

Each payment carries its Stripe payment intent id as `StripePaymentIntentId`, its `Status` (`paid` or `failed`), `AmountCents` and `AmountRefundedCents` in the currency's smallest unit, its `Currency`, whether it is `Disputed`, whether it is `Livemode` (false for a test payment) and `CreatedAt`, the time the visitor paid or tried to. `rows` holds up to 25 payments, newest first, and `count` the payments that match the filter and the window. `filter` is required and keeps `all`, `paid`, `refunded`, `disputed` or `failed` payments, as the Payments tab does. Leave `period`, `from` and `to` out to list every payment still kept, which the record retention keeps for 1 year. While `hasMore` is true, call again with `offset` set to the number of payments already read. A site moved from another workspace lists only the payments taken since it arrived. Refunds and disputes are handled in the owner's Stripe dashboard. Only the workspace owner can list them, so any other caller is refused.

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/list_site_payments`, sending the inputs below as a JSON object. The token needs the `config:read` scope.

It only reads and changes nothing, so retrying it is safe.

```bash
curl -X POST https://api.modulify.ai/v1/list_site_payments \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","filter":"FILTER"}'
```

Over MCP, the same method is the [list_site_payments tool](https://modulify.ai/docs/mcp/payments/list-site-payments).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `filter` | string | Yes | Which payments to keep: `all`, `paid`, `refunded`, `disputed` or `failed`. |
| `period` | string | No | One of `day`, `24h`, `7d`, `30d`, `90d`, `12mo` or `all`. `day` is today so far, from midnight UTC, `24h` is the current hour and the 23 before it, `7d`, `30d` and `90d` are the last 7, 30 and 90 days counting today, `12mo` is this month and the 11 before it, and `all` reaches back to the first record. Leave `period`, `from` and `to` out for every payment still kept. |
| `from` | string | No | The first day of a custom range as `YYYY-MM-DD` in UTC, sent together with `to`. |
| `to` | string | No | The last day of a custom range as `YYYY-MM-DD` in UTC, included in the range and sent together with `from`. |
| `offset` | integer | No | How many payments to skip. `0` for the first page. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) of `success`, `message`, `data`, `code` and `version`. `data` holds the result described above, and on a method that returns a total, `count` carries it. The [response headers](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) carry the call's `X-Request-Id` and what is left of your per-minute budget in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. [Errors](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.