# Payments API

> List and retrieve payments with the Anytime Capital Payments API: status, amounts, net after fees, payment method, customer, metadata and disputes.

Source: https://anytime-capital.com/docs/payments · Markdown: https://anytime-capital.com/docs/payments.md · All docs: https://anytime-capital.com/docs/llms-full.txt

A payment is one charge — by card, card wallet or bank account — on a payment link, an invoice or a subscription. Payments are created by your customers at checkout; the API reads them. Refunds and dispute responses are handled from **Orders** and **Disputes** in the dashboard, and each one is reported by webhook.

## The payment object

```json
{
  "object": "payment",
  "id": "pay_7Hq2LmX9cR4tVb",
  "status": "paid",
  "amountCents": 12500,
  "amountRefundedCents": 0,
  "netCents": 12088,
  "currency": "usd",
  "description": "Consulting — October",
  "source": {
    "type": "payment_link",
    "id": "pl_4kTz8QwN2xYb6RcD1mPa"
  },
  "customer": {
    "name": "Jordan Lee",
    "email": "jordan@example.com",
    "country": "US"
  },
  "card": {
    "brand": "visa",
    "last4": "4242"
  },
  "paymentMethod": {
    "type": "card",
    "label": "Visa •••• 4242"
  },
  "clientReference": "order_1042",
  "metadata": {
    "campaign": "fall-launch"
  },
  "amountDetails": {
    "subtotalCents": 12500,
    "discountCents": 0,
    "shippingCents": 0,
    "taxCents": 0,
    "customerFeeCents": 0
  },
  "dispute": null,
  "failureMessage": null,
  "createdAt": "2026-10-14T16:02:11.000Z",
  "paidAt": "2026-10-14T16:02:15.000Z"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | `pay_` followed by letters and digits. |
| `status` | string | One of `paid`, `pending`, `failed`, `canceled`, `refunded`, `partially_refunded`, `disputed`. |
| `amountCents`, `amountRefundedCents` | integer | What was charged, and how much of it has been refunded so far. |
| `netCents` | integer or null | What you keep after fees, once known. |
| `description` | string | The payment link's title, or `Invoice INV-…`. |
| `source` | object | `type` is `payment_link`, `invoice`, `subscription` or `manual`; `id` is that object's id (null for manual). |
| `customer` | object | `name`, `email` and `country`. |
| `paymentMethod` | object or null | `type` (`card`, `apple_pay`, `google_pay` or `us_bank_account`; more may be added) and a readable `label` such as “Visa •••• 4242”. Null until the method is known. |
| `card` | object or null | The card's `brand` and `last4`, for cards and card wallets. |
| `clientReference` | string or null | Your own reference, from `?ref=` on the link or `data-ref` on your website's Pay button. |
| `metadata` | object | The payment link's metadata when the payment was made; `{}` when it had none. |
| `amountDetails` | object | `subtotalCents`, `discountCents`, `shippingCents`, `taxCents` and `customerFeeCents`. |
| `dispute` | object or null | `status` is `needs_response`, `under_review`, `won`, `lost` or `closed`. |
| `failureMessage` | string or null | Why a failed payment failed. |
| `createdAt`, `paidAt` | string, string or null | ISO 8601 times in UTC. |

> **Bank account payments take days:** A payment by bank account (`us_bank_account`) stays `pending` for 3–5 business days before it is `paid` or `failed`. Fulfil on the `payment.succeeded` webhook, not when checkout finishes.

## Endpoints

### List payments

`GET /api/v1/payments`

Your payments, newest first.

**Query**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | no | Only payments with this status: `paid`, `pending`, `failed`, `canceled`, `refunded`, `partially_refunded`, `disputed`. |
| `createdFrom` | date or date-time | no | Created at or after, e.g. `2026-10-01` (midnight UTC) or `2026-10-01T12:00:00Z`. |
| `createdTo` | date or date-time | no | Created before (exclusive). Must be after `createdFrom`. |
| `limit` | integer | no | How many objects per page. See [Pagination](https://anytime-capital.com/docs/pagination.md). |
| `cursor` | string | no | The previous page's `nextCursor`, for the page after it. |

**Request**

```bash
curl "https://anytime-capital.com/api/v1/payments?status=paid&createdFrom=2026-10-01&createdTo=2026-11-01" \
  -H "Authorization: Bearer $ANYTIME_API_KEY"
```

**Response** (200)

```json
{
  "object": "list",
  "data": [
    {
      "object": "payment",
      "id": "pay_7Hq2LmX9cR4tVb",
      "status": "paid",
      "amountCents": 12500,
      "amountRefundedCents": 0,
      "netCents": 12088,
      "currency": "usd",
      "description": "Consulting — October",
      "source": {
        "type": "payment_link",
        "id": "pl_4kTz8QwN2xYb6RcD1mPa"
      },
      "customer": {
        "name": "Jordan Lee",
        "email": "jordan@example.com",
        "country": "US"
      },
      "card": {
        "brand": "visa",
        "last4": "4242"
      },
      "paymentMethod": {
        "type": "card",
        "label": "Visa •••• 4242"
      },
      "clientReference": "order_1042",
      "metadata": {
        "campaign": "fall-launch"
      },
      "amountDetails": {
        "subtotalCents": 12500,
        "discountCents": 0,
        "shippingCents": 0,
        "taxCents": 0,
        "customerFeeCents": 0
      },
      "dispute": null,
      "failureMessage": null,
      "createdAt": "2026-10-14T16:02:11.000Z",
      "paidAt": "2026-10-14T16:02:15.000Z"
    }
  ],
  "hasMore": true,
  "nextCursor": "pay_7Hq2LmX9cR4tVb"
}
```

### Retrieve a payment

`GET /api/v1/payments/{id}`

Returns the payment, or `404 NOT_FOUND` if it isn't one of yours.

**Request**

```bash
curl https://anytime-capital.com/api/v1/payments/pay_7Hq2LmX9cR4tVb \
  -H "Authorization: Bearer $ANYTIME_API_KEY"
```

**Response** (200)

```json
{
  "object": "payment",
  "id": "pay_7Hq2LmX9cR4tVb",
  "status": "paid",
  "amountCents": 12500,
  "amountRefundedCents": 0,
  "netCents": 12088,
  "currency": "usd",
  "description": "Consulting — October",
  "source": {
    "type": "payment_link",
    "id": "pl_4kTz8QwN2xYb6RcD1mPa"
  },
  "customer": {
    "name": "Jordan Lee",
    "email": "jordan@example.com",
    "country": "US"
  },
  "card": {
    "brand": "visa",
    "last4": "4242"
  },
  "paymentMethod": {
    "type": "card",
    "label": "Visa •••• 4242"
  },
  "clientReference": "order_1042",
  "metadata": {
    "campaign": "fall-launch"
  },
  "amountDetails": {
    "subtotalCents": 12500,
    "discountCents": 0,
    "shippingCents": 0,
    "taxCents": 0,
    "customerFeeCents": 0
  },
  "dispute": null,
  "failureMessage": null,
  "createdAt": "2026-10-14T16:02:11.000Z",
  "paidAt": "2026-10-14T16:02:15.000Z"
}
```

---

Anytime Capital is a fintech company, not a bank. Payment processing, banking and payout services are provided by Anytime Capital's licensed partners. Rates shown are for US card payments; international cards, currency conversion and disputes may carry additional fees shown in your dashboard before you accept a payment.
