> ## Documentation Index
> Fetch the complete documentation index at: https://docs.easner.com/llms.txt
> Use this file to discover all available pages before exploring further.

# v1 reference

> Every public /v1 method, its scope, id prefix, and what is not on the API.

Base URL: `https://api.easner.com`

Auth: `Authorization: Bearer easner_sk_test_…` or `easner_sk_live_…`. See [Authentication](https://docs.easner.com/authentication.md). Every secret key belongs to one business and one mode (test or live). The same key prefixes work for **Banking**, **Checkout** and **Connect**; scopes on the key decide which rows below you can call.

> [!NOTE]
>
> **API reference.** This page is the index. The API reference tab lists one page per method under **Banking**, **Checkout**, **Connect** and **API** (the same grouping as the Guides). Each page has parameters, the response, and a request builder. Paste a test key and send the call from the page. Use a test key. A live key moves money.

`GET /v1/checkout/publishable-keys/validate` is the only route that is not for your server. Checkout.js calls it from the browser with a publishable key.

Payment links (`/v1/payment_links`) are not on the public API. Create them in Console under Collections → Links.

## Banking

| Method | Path | Scope | Id |
| - | - | - | - |
| `GET` | `/v1/customers` | `accounts.read` | `cus_` |
| `POST` | `/v1/customers` | `accounts.write` | `cus_` (+ issued `acct_`) |
| `GET` | `/v1/customers/:id` | `accounts.read` | `cus_` |
| `POST` | `/v1/customers/:id/verification` | `accounts.write` | none |
| `GET` | `/v1/accounts` | `accounts.read` | `acct_` |
| `POST` | `/v1/accounts` | `accounts.write` | `acct_` |
| `GET` | `/v1/accounts/:id` | `accounts.read` | `acct_` |
| `GET` | `/v1/accounts/:id/deposit_instructions` | `accounts.read` | none |
| `GET` | `/v1/accounts/:id/deposit_addresses` | `accounts.read` | none |
| `POST` | `/v1/accounts/:id/onramp_sessions` | `accounts.write` | `ors_` |
| `GET` | `/v1/payment_methods` | `accounts.read` | none |
| `GET` | `/v1/destinations` | `accounts.read` | `dest_` |
| `POST` | `/v1/destinations` | `accounts.write` | `dest_` |
| `POST` | `/v1/quotes` | `transfers.write` | `qt_` |
| `GET` | `/v1/transfers` | `accounts.read` | `tr_` |
| `POST` | `/v1/transfers` | `transfers.write` | `tr_` (+ one-time `client_secret` in test) |
| `GET` | `/v1/transfers/:id` | `accounts.read` or Bearer `easner_ta_…` | `tr_` |
| `POST` | `/v1/transfers/:id/confirm` | none (customer secret) | `tr_` |
| `POST` | `/v1/transfers/:id/code` | none (customer secret) | `{ required, email_masked, resend_after_seconds }` |
| `POST` | `/v1/transfers/:id/authorization_sessions` | `transfers.write` | `{ object: "authorization_session", transfer, client_secret, url }` |
| `POST` | `/v1/transfers/:id/cancel` | `transfers.write` | `tr_` |
| `GET` | `/v1/transactions` | `accounts.read` | `txn_` |
| `GET` | `/v1/transactions/:id` | `accounts.read` | `txn_` |
| `POST` | `/v1/checkout/sessions` | `checkout` | `cs_…` (also `id` and `checkout_session_id`) |
| `GET` | `/v1/checkout/sessions` | `checkout.read` | `cs_…` (a list) |
| `GET` | `/v1/checkout/sessions/:id` | `checkout.read` | `cs_…` |
| `GET` | `/v1/checkout/sessions?id=cs_…` | `checkout.read` | `cs_…` (the same read as the path form) |
| `GET` | `/v1/checkout/publishable-keys/validate?key=easner_pk_…` | none (publishable key) | none |
| `POST` | `/v1/refunds` | `refunds.write` | `re_…` (provider refund id) |
| `GET` | `/v1/refunds?checkout_session=cs_…` | `checkout.read` | internal id, see [Refunds](https://docs.easner.com/refunds.md#ids) |
| `POST` | `/v1/customer_portal/sessions` | `checkout` | none (returns a signed `url`) |
| `GET` | `/v1/customers/checkout` | `checkout.read` | UUID (a Checkout customer, not `cus_`) |
| `GET` | `/v1/customers/checkout/:id` | `checkout.read` | UUID |
| `GET` | `/v1/payments` | `checkout.read` | UUID (the settlement) |
| `GET` | `/v1/payments/:id` | `checkout.read` | UUID (the settlement) |
| `GET` | `/v1/subscriptions` | `checkout.read` | `sub_…` |
| `GET` | `/v1/subscriptions/:id` | `checkout.read` | `sub_…` |
| `POST` | `/v1/subscriptions/:id/cancel` | `checkout` | `sub_…` (body `at`: `period_end` or `now`) |
| `POST` | `/v1/subscriptions/:id/pause` | `checkout` | `sub_…` |
| `POST` | `/v1/subscriptions/:id/resume` | `checkout` | `sub_…` |
| `POST` | `/v1/subscriptions/:id` | `checkout` | `sub_…` (body `quantity`, `price`, `proration`, `effective`) |
| `GET` | `/v1/subscriptions/:id/preview` | `checkout.read` | `sub_…` (the charge for a change, nothing changed) |
| `GET` | `/v1/api_keys` | `keys.manage` | `uuid` |
| `POST` | `/v1/api_keys/:id/revoke` | `keys.manage` | `uuid` |
| `GET` | `/v1/webhook_endpoints` | `webhooks.manage` | `uuid` |
| `POST` | `/v1/webhook_endpoints` | `webhooks.manage` | `uuid` (+ one-time `secret`) |
| `POST` | `/v1/webhook_endpoints/:id` | `webhooks.manage` | `uuid` |
| `GET` | `/v1/products` | `checkout.read` | UUID |
| `POST` | `/v1/products` | `checkout` | UUID |
| `GET` | `/v1/products/:id` | `checkout.read` | UUID |
| `POST` | `/v1/products/:id` | `checkout` | UUID |
| `GET` | `/v1/prices` | `checkout.read` | UUID |
| `POST` | `/v1/prices` | `checkout` | UUID |
| `GET` | `/v1/prices/:id` | `checkout.read` | UUID |
| `POST` | `/v1/prices/:id` | `checkout` | UUID |
| `GET` | `/v1/promotion_codes` | `checkout.read` | UUID |
| `POST` | `/v1/promotion_codes` | `checkout` | UUID |
| `GET` | `/v1/promotion_codes/:id` | `checkout.read` | UUID |
| `POST` | `/v1/promotion_codes/:id` | `checkout` | UUID |
| `GET` | `/v1/discounts` | `checkout.read` | UUID |
| `POST` | `/v1/discounts` | `checkout` | UUID |
| `GET` | `/v1/discounts/:id` | `checkout.read` | UUID |
| `POST` | `/v1/discounts/:id` | `checkout` | UUID (body `active` only) |

## Connect

| Method | Path | Scope | Id |
| - | - | - | - |
| `GET` | `/v1/payees` | `payees.read` | `pye_` |
| `POST` | `/v1/payees` | `payees.write` | `pye_` |
| `GET` | `/v1/payees/:id` | `payees.read` | `pye_` |
| `POST` | `/v1/payees/:id` | `payees.write` | `pye_` |
| `GET` | `/v1/payees/:id/balance` | `payees.read` | none |
| `GET` | `/v1/payees/:id/tax_form` | `payees.tax_forms.read` | none |
| `POST` | `/v1/payees/:id/credits` | `payees.credit` | `crd_` |
| `POST` | `/v1/credits/batch` | `payees.credit` | `bch_` |
| `POST` | `/v1/credits/:id/reversals` | `payees.credit` | `ent_` |
| `GET` | `/v1/payouts` | `payees.read` | `pay_` |
| `POST` | `/v1/payouts` | `payouts.write` | `pay_` |
| `GET` | `/v1/payouts/:id` | `payees.read` | `pay_` |
| `POST` | `/v1/link_sessions` | `payees.write` | `pls_` |
| `POST` | `/v1/link_sessions/:id/redeem` | `payees.write` | `pls_` |
| `POST` | `/v1/link_sessions/:id/confirm` | `payees.write` | `pls_` |
| `POST` | `/v1/payout_sessions` | `payouts.write` | `pos_` |
| `GET` | `/v1/payee_entries` | `payees.read` | `ent_` |
| `GET` | `/v1/payout_limits` | `payees.read` | none |
| `POST` | `/v1/reconciliations` | `payees.read` | none |
| `POST` | `/v1/test/fund` | `payees.write` | none |
| `POST` | `/v1/test/settle` | `payees.write` | none |
| `POST` | `/v1/test/payees/:id/approve_link` | `payees.write` | `pye_` |
| `POST` | `/v1/test/payees/:id/unlink` | `payees.write` | `pye_` |

## API keys and webhooks

| Method | Path | Scope | Id |
| - | - | - | - |
| `GET` | `/v1/api_keys` | `keys.manage` | `uuid` |
| `POST` | `/v1/api_keys/:id/revoke` | `keys.manage` | `uuid` |
| `GET` | `/v1/webhook_endpoints` | `webhooks.manage` | `uuid` |
| `POST` | `/v1/webhook_endpoints` | `webhooks.manage` | `uuid` (+ one-time `secret`) |
| `POST` | `/v1/webhook_endpoints/:id` | `webhooks.manage` | `uuid` |
| `DELETE` | `/v1/webhook_endpoints/:id` | `webhooks.manage` | `uuid` |

## Ids

| Prefix | Object | Notes |
| - | - | - |
| `cs_test_…` / `cs_live_…` | Checkout session | A provider-issued id. Treat it as opaque and store the whole string |
| `re_…` | Refund | A provider-issued id. Returned by `POST /v1/refunds` and in `refund.*` webhooks. `GET /v1/refunds` lists the same id, see [Refunds](https://docs.easner.com/refunds.md#ids) |
| `pye_`, `pay_`, `crd_`, `ent_`, `bch_` | Connect objects | A payee, a payout, a credit, a ledger entry and a credit batch. The prefix, an underscore, then the id. Connect ids are not banking ids. See [Connect](https://docs.easner.com/connect.md) |
| `cus_`, `acct_`, `dest_`, `qt_`, `tr_`, `txn_`, `ors_` | Banking objects | Easner ids: the prefix, an underscore, 24 hex characters |
| `easner_sk_…`, `easner_pk_…` | Secret and publishable keys | [Authentication](https://docs.easner.com/authentication.md) |
| `easner_ta_…` | Transfer authorize secret | Customer only. Never your server key |
| `sub_…` | Subscription | The subscription id, the one webhooks and Console show |
| `easner_whsec_…` | Webhook signing secret | Shown once per endpoint |

Document ids on invoices, quotes and statements are one undashed code, for example `EINV3F2A9C1B7D4E`. Invoice routes are not on `/v1`.

> [!NOTE]
>
> A Checkout `customer` (on sessions, and in `customer.updated` for checkout) is a plain UUID such as `0b9f1c2e-5a7d-4e1b-9c3a-2f6d8e4b7a10`, not a banking `cus_`. The two are different objects. Do not pass one where the other is expected.

## Request rules

* Send JSON with `Content-Type: application/json`. Amounts are integers in the smallest currency unit (cents).
* `Idempotency-Key` (up to 255 characters; longer is `400` `invalid_idempotency_key`) is honoured on `POST /v1/transfers`, `POST /v1/checkout/sessions`, `POST /v1/refunds` and the three subscription actions (`cancel`, `pause`, `resume`). See [Authentication](https://docs.easner.com/authentication.md#idempotency).
* Responses carry `livemode`. The key decides the mode. A test key never reads live objects and the reverse.
* `/v1` has no browser CORS, except the publishable-key validate route. Call everything else from your server.
* Rate limits: [Authentication](https://docs.easner.com/authentication.md#rate-limits) and [API keys and scopes](https://docs.easner.com/api-keys.md#rate-limits-and-headers). Errors: [Errors](https://docs.easner.com/errors.md).

## Lists

Every list answers `{ "object": "list", "data": [ … ], "has_more": true, "url": "/v1/customers" }`. `data` is the array a list always returned. `object`, `has_more` and `url` are new. Read `has_more` before you assume the list ended.

The order, and the page size, depend on the endpoint:

| Endpoint | Order | Page |
| - | - | - |
| `GET /v1/customers` | Newest first | `limit` (default 20, maximum 100) and a cursor |
| `GET /v1/accounts` | Newest first | `limit` and a cursor |
| `GET /v1/destinations` | Newest first | `limit` and a cursor |
| `GET /v1/transfers` | Newest first | `limit` and a cursor |
| `GET /v1/transactions` | Newest first | `limit` and a cursor |
| `GET /v1/api_keys` | Newest first | `limit` and a cursor |
| `GET /v1/webhook_endpoints` | Newest first | `limit` and a cursor |
| `GET /v1/refunds` | **Oldest first** (`created_at` ascending) | `limit` and a cursor, over the refunds of one payment |
| `GET /v1/checkout/sessions` | Newest first | `limit` and a cursor. Filters: `status`, `customer`, `payment_link`, `created` |
| `GET /v1/customers/checkout` | Newest first | `limit` and a cursor |
| `GET /v1/payments` | Newest first | `limit` and a cursor. Filters: `status`, `created` |
| `GET /v1/subscriptions` | Newest first | `limit` and a cursor. Filters: `status`, `customer` |
| `GET /v1/payment_methods` | A fixed catalog, not time ordered | `limit` and a cursor, over the catalog |
| `GET /v1/accounts/:id/deposit_addresses` | One entry per account | One |
| `GET /v1/payees`, `GET /v1/payouts`, `GET /v1/payee_entries` | Newest first | `limit` and a cursor. Filters: `created`, and `payee` (on payouts and entries) |

## Pagination and filtering

Every list takes the same parameters:

| Parameter | Meaning |
| - | - |
| `limit` | Whole number from 1 to 100. Default 20. Anything else is `400` `invalid_request` |
| `starting_after` | The `id` of the last item you have. Returns the items after it, so the next page |
| `ending_before` | The `id` of the first item you have. Returns the page just before it. Send one cursor or the other, not both |
| `created[gte]`, `created[lte]` | Unix seconds, or an ISO 8601 date. Keeps the items created in that range, both ends included. Not on `GET /v1/payment_methods`, which has no dates |

To read every row, ask for `limit=100`, then pass the last `id` of each page as `starting_after` until `has_more` is `false`:

```text theme={null}
GET /v1/customers?limit=100
GET /v1/customers?limit=100&starting_after=cus_…
```

A cursor must be an id in this list, in your business and in this mode. An id from the other mode, from another business, or one that does not exist is `400` `invalid_request`, not an empty page. The response names the parameter in `error.fields`. An empty `data` with `has_more: false` means the list has ended.

Order is stable: items with the same `created` are ordered by `id`, so a page boundary never repeats or skips a row. A row created while you page can appear on the page you read last.

Checkout sessions, payments and subscriptions are the exception. Their `ending_before` is `400` `invalid_request` (page forward with `starting_after`), and they break ties on `created` alone: two of them created in the same instant can fall on either side of a page boundary. Use a `created[gte]` / `created[lte]` window when you need an exact range.

The filters that exist beyond paging:

| Endpoint | Filter | Notes |
| - | - | - |
| `GET /v1/accounts` | `?customer=cus_…` | Without it you get issued accounts only (accounts that belong to a customer). With it, every account of that customer |
| `GET /v1/refunds` | `?payment=…` or `?checkout_session=cs_…` | One of them is required, see [Refunds](https://docs.easner.com/refunds.md#list-refunds) |
| `GET /v1/checkout/sessions` | `?status=`, `?customer=`, `?payment_link=`, `created[gte]`, `created[lte]` | `status` is `open`, `processing`, `complete`, `expired` or `failed`. `customer` and `payment_link` are ids in your business and mode |
| `GET /v1/transactions` | `?account=`, `?customer=`, `?type=`, `?direction=`, `created[gte]`, `created[lte]` | `account` and `customer` are ids in your business and mode. `type` is `transfer`, `deposit`, `onramp`, `chain` or `checkout`. `direction` is `in` or `out`. Anything else is `400` `invalid_request` |
| `GET /v1/payments` | `?status=`, `created[gte]`, `created[lte]` | `status` is `paid`, `refunded` or `partially_refunded`. Settled payments only |
| `GET /v1/subscriptions` | `?status=`, `?customer=` | `status` is `active`, `trialing`, `ending`, `paused`, `past_due`, `incomplete` or `canceled` |
| `GET /v1/checkout/publishable-keys/validate` | `?key=easner_pk_…` | Browser check, not a list |

Other fields are filtered on your side, for example by `external_id` on a customer or by `customer` on a transaction.

## Publishable key validate

`GET /v1/checkout/publishable-keys/validate?key=easner_pk_…` is called by Checkout.js in the browser. It needs no `Authorization` header. It sends `access-control-allow-origin: *`, and answers `OPTIONS` with `204`, so any page can call it. It returns nothing secret. Success, `200`:

```json theme={null}
{
  "ok": true,
  "mode": "test",
  "publishable_key": "pk_test_…",
  "account_id": "acct_…",
  "business": {
    "name": "Acme Inc.",
    "logo_url": "https://…",
    "accent": "#0F766E",
    "accent_fallback": false
  }
}
```

| Field | Type | Notes |
| - | - | - |
| `ok` | boolean | Always `true` on success |
| `mode` | string | `test` or `live`, from the key prefix |
| `publishable_key` | string | The payment provider's publishable key for that mode. It is not your `easner_pk_…` key. Checkout.js passes it to the provider's browser SDK |
| `account_id` | string \| null | The connected payment account the SDK must load for this business. It is not an Easner `acct_` vault, even though it looks like one. `null` if it is not set up yet |
| `business.name` | string | Shown as the overlay title |
| `business.logo_url` | string \| null | |
| `business.accent` | string | Button colour, a hex value |
| `business.accent_fallback` | boolean | `true` when your colour was too light for white button text (or none is set) and Easner blue is used |

Errors use the usual envelope: `400` `missing_key`, `401` or `403` `invalid_publishable_key`, `503` `test_payments_unconfigured`. The same CORS header is on errors. See [Embed reference](https://docs.easner.com/embed-reference.md).

## Not on `/v1`

* No `GET` destination or quote by id. Store the id from create.
* No customer update. Put `email` on create before live verification.
* No session update, and no subscription create or price change on `/v1`. A subscription's price change, its "keep" (undo a pending cancel) and the refund of its unused part are Console only. `refund_unused` on the cancel route is refused with `400`.
* No automated USDC checkout. A stablecoin payment link shows your static wallet address. There is no USDC session or quote on the API.
* No delete of a product, price or promotion code. Archive a product or price with `active: false`, and turn a code off with `active: false`. A price's amount and a code's discount cannot change: make a new one.
* Payment links are created in Banking (Collections, Links). They are not in this reference.
* No refund retrieve by id. List by `checkout_session`.
* Creating an API key, and rotating a webhook signing secret, stay in Console. `/v1` can list and revoke keys and manage webhook endpoints, see [API keys](https://docs.easner.com/api-keys.md) and [Webhooks](https://docs.easner.com/webhooks.md#manage-endpoints-via-the-api).
* No test-credit endpoint. Fund test with Console **Simulate test deposit** or [test onramp](https://docs.easner.com/receive.md#card-onramp).

> [card] [Quickstart](https://docs.easner.com/quickstart.md)
>
> Integrate Checkout from the Console, then send your first transfer in test.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.