# Invoices API

> Create, list, retrieve and send invoices with the Anytime Capital Payments API. Totals are calculated for you; customers pay by card at the invoice's URL.

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

Invoices are emailed from Anytime Capital in your branding and paid at their `url`. Totals are calculated from the line items, an optional discount and tax. A customer can pay a deposit first, and automatic reminders go out around the due date unless you turn them off.

## The invoice object

```json
{
  "object": "invoice",
  "id": "inv_9QmR2vX7pLk3TzW8cN4b",
  "number": "INV-0042",
  "url": "https://anytime-capital.com/pay/invoice/inv_9QmR2vX7pLk3TzW8cN4b",
  "status": "open",
  "overdue": false,
  "customer": {
    "name": "Northwind LLC",
    "email": "ap@northwind.example"
  },
  "lineItems": [
    {
      "description": "Website redesign",
      "quantity": 1,
      "unitCents": 450000
    }
  ],
  "subtotalCents": 450000,
  "discountCents": 0,
  "taxBps": 825,
  "taxCents": 37125,
  "totalCents": 487125,
  "amountPaidCents": 0,
  "balanceCents": 487125,
  "depositCents": null,
  "currency": "usd",
  "dueDate": "2026-11-15",
  "notes": "Thank you for your business.",
  "paidVia": null,
  "paidAt": null,
  "paymentId": null,
  "sentAt": "2026-10-16T14:00:00.000Z",
  "voidedAt": null,
  "createdAt": "2026-10-16T14:00:00.000Z"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `id`, `number` | string | `inv_` followed by 20 letters and digits; your sequential invoice number, e.g. `INV-0042`. |
| `url` | string | Where the customer views and pays the invoice. |
| `status` | string | One of `open`, `partially_paid`, `paid`, `refunded`, `void`: `partially_paid` after a deposit or part payment, `refunded` when paid and then refunded in full. |
| `overdue` | boolean | True while something is owed past the due date. |
| `customer` | object | `name` and `email`. |
| `lineItems` | array | `description`, `quantity` and `unitCents` per line. |
| `subtotalCents`, `discountCents`, `taxBps`, `taxCents`, `totalCents` | integer | Totals, calculated for you. Tax applies after the discount; `taxBps` 825 is 8.25%. |
| `amountPaidCents`, `balanceCents` | integer | Paid so far (by card or recorded by you) and still owed. |
| `depositCents` | integer or null | The deposit the customer may pay first. |
| `dueDate` | string | `YYYY-MM-DD`. |
| `paidVia`, `paidAt`, `paymentId` | string or null | How and when it was settled, and the card payment that paid it, if any. |
| `sentAt`, `voidedAt`, `createdAt` | string or null | ISO 8601 times in UTC. |

## Endpoints

### List invoices

`GET /api/v1/invoices`

Your invoices, newest first.

**Query**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | no | Only invoices with this status: `open`, `partially_paid`, `paid`, `refunded`, `void`. |
| `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/invoices?status=open" \
  -H "Authorization: Bearer $ANYTIME_API_KEY"
```

**Response** (200)

```json
{
  "object": "list",
  "data": [
    {
      "object": "invoice",
      "id": "inv_9QmR2vX7pLk3TzW8cN4b",
      "number": "INV-0042",
      "url": "https://anytime-capital.com/pay/invoice/inv_9QmR2vX7pLk3TzW8cN4b",
      "status": "open",
      "overdue": false,
      "customer": {
        "name": "Northwind LLC",
        "email": "ap@northwind.example"
      },
      "lineItems": [
        {
          "description": "Website redesign",
          "quantity": 1,
          "unitCents": 450000
        }
      ],
      "subtotalCents": 450000,
      "discountCents": 0,
      "taxBps": 825,
      "taxCents": 37125,
      "totalCents": 487125,
      "amountPaidCents": 0,
      "balanceCents": 487125,
      "depositCents": null,
      "currency": "usd",
      "dueDate": "2026-11-15",
      "notes": "Thank you for your business.",
      "paidVia": null,
      "paidAt": null,
      "paymentId": null,
      "sentAt": "2026-10-16T14:00:00.000Z",
      "voidedAt": null,
      "createdAt": "2026-10-16T14:00:00.000Z"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}
```

### Create an invoice

`POST /api/v1/invoices`

Creates an invoice, emails it to the customer unless `send` is `false`, and answers `201`. Totals run from $1.00 to $100,000.00. Supports Idempotency-Key.

**Body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `customerName` | string | yes | Who the invoice is for, up to 200 characters. |
| `customerEmail` | string | yes | Where we email it. |
| `lineItems` | array | yes | 1–50 lines of `description` (up to 200 characters), `quantity` (1–10000) and `unitCents`. |
| `dueDate` | string | yes | `YYYY-MM-DD`. |
| `discountCents` | integer | no | Taken off the subtotal before tax. Default 0. |
| `taxBps` | integer | no | Tax in basis points, 0–3000: 825 is 8.25%. Default 0. |
| `notes` | string | no | Printed on the invoice, up to 2,000 characters. |
| `deposit` | object | no | `{"type": "amount", "amountCents": 50000}` or `{"type": "percent", "percent": 25}`: what the customer may pay first. At least $1.00, and less than the total with at least $1.00 left to pay. |
| `remindersEnabled` | boolean | no | Automatic reminders before, on and after the due date. Default `true`. |
| `send` | boolean | no | Email the invoice now. Default `true`; if the email fails, `sentAt` stays null and you can call Send. |
| `saveCustomer` | boolean | no | Also add the customer to your customer list (skipped if the email is already there). Default `false`. |

**Request**

```bash
curl -X POST https://anytime-capital.com/api/v1/invoices \
  -H "Authorization: Bearer $ANYTIME_API_KEY" \
  -H "Idempotency-Key: invoice-northwind-oct" \
  -H "Content-Type: application/json" \
  -d '{
    "customerName": "Northwind LLC",
    "customerEmail": "ap@northwind.example",
    "lineItems": [
      { "description": "Website redesign", "quantity": 1, "unitCents": 450000 }
    ],
    "taxBps": 825,
    "dueDate": "2026-11-15"
  }'
```

**Response** (201)

```json
{
  "object": "invoice",
  "id": "inv_9QmR2vX7pLk3TzW8cN4b",
  "number": "INV-0042",
  "url": "https://anytime-capital.com/pay/invoice/inv_9QmR2vX7pLk3TzW8cN4b",
  "status": "open",
  "overdue": false,
  "customer": {
    "name": "Northwind LLC",
    "email": "ap@northwind.example"
  },
  "lineItems": [
    {
      "description": "Website redesign",
      "quantity": 1,
      "unitCents": 450000
    }
  ],
  "subtotalCents": 450000,
  "discountCents": 0,
  "taxBps": 825,
  "taxCents": 37125,
  "totalCents": 487125,
  "amountPaidCents": 0,
  "balanceCents": 487125,
  "depositCents": null,
  "currency": "usd",
  "dueDate": "2026-11-15",
  "notes": "Thank you for your business.",
  "paidVia": null,
  "paidAt": null,
  "paymentId": null,
  "sentAt": "2026-10-16T14:00:00.000Z",
  "voidedAt": null,
  "createdAt": "2026-10-16T14:00:00.000Z"
}
```

> **Note:** Recurring invoices are set up in the dashboard. Sending `recurrence` to the API answers `400 INVALID_INPUT`.

### Retrieve an invoice

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

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

**Request**

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

**Response** (200)

```json
{
  "object": "invoice",
  "id": "inv_9QmR2vX7pLk3TzW8cN4b",
  "number": "INV-0042",
  "url": "https://anytime-capital.com/pay/invoice/inv_9QmR2vX7pLk3TzW8cN4b",
  "status": "open",
  "overdue": false,
  "customer": {
    "name": "Northwind LLC",
    "email": "ap@northwind.example"
  },
  "lineItems": [
    {
      "description": "Website redesign",
      "quantity": 1,
      "unitCents": 450000
    }
  ],
  "subtotalCents": 450000,
  "discountCents": 0,
  "taxBps": 825,
  "taxCents": 37125,
  "totalCents": 487125,
  "amountPaidCents": 0,
  "balanceCents": 487125,
  "depositCents": null,
  "currency": "usd",
  "dueDate": "2026-11-15",
  "notes": "Thank you for your business.",
  "paidVia": null,
  "paidAt": null,
  "paymentId": null,
  "sentAt": "2026-10-16T14:00:00.000Z",
  "voidedAt": null,
  "createdAt": "2026-10-16T14:00:00.000Z"
}
```

### Send an invoice

`POST /api/v1/invoices/{id}/send`

Emails the invoice to the customer: the invoice itself the first time, a reminder after that. At most once every 24 hours per invoice (`429 TOO_SOON` with `Retry-After` otherwise), and only while something is owed (`409 INVOICE_CLOSED`). Supports Idempotency-Key.

**Request**

```bash
curl -X POST https://anytime-capital.com/api/v1/invoices/inv_9QmR2vX7pLk3TzW8cN4b/send \
  -H "Authorization: Bearer $ANYTIME_API_KEY" \
  -H "Idempotency-Key: 1b7e5c2a-send-inv-0042"
```

**Response** (200)

```json
{
  "object": "invoice",
  "id": "inv_9QmR2vX7pLk3TzW8cN4b",
  "number": "INV-0042",
  "url": "https://anytime-capital.com/pay/invoice/inv_9QmR2vX7pLk3TzW8cN4b",
  "status": "open",
  "overdue": false,
  "customer": {
    "name": "Northwind LLC",
    "email": "ap@northwind.example"
  },
  "lineItems": [
    {
      "description": "Website redesign",
      "quantity": 1,
      "unitCents": 450000
    }
  ],
  "subtotalCents": 450000,
  "discountCents": 0,
  "taxBps": 825,
  "taxCents": 37125,
  "totalCents": 487125,
  "amountPaidCents": 0,
  "balanceCents": 487125,
  "depositCents": null,
  "currency": "usd",
  "dueDate": "2026-11-15",
  "notes": "Thank you for your business.",
  "paidVia": null,
  "paidAt": null,
  "paymentId": null,
  "sentAt": "2026-10-16T14:00:00.000Z",
  "voidedAt": null,
  "createdAt": "2026-10-16T14:00:00.000Z"
}
```

## Knowing when an invoice is paid

Subscribe to the `invoice.paid` webhook, which carries the invoice object once it is paid in full, by card or recorded as paid in the dashboard. Each card payment on an invoice, deposits included, also sends `payment.succeeded` with `source.type` `invoice` and `source.id` the invoice id. See [Webhooks](https://anytime-capital.com/docs/webhooks.md).

---

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.
