> ## 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.

# Quickstart

> Integrate Checkout from the Console, send your first transfer in test, or pay a person with Connect.

Three paths, all in **Test**, where nothing real moves:

* [Integrate Checkout from the Console](#integrate-checkout-from-the-console): take a payment on your website. About 15 to 25 minutes.
* [Banking: first send](#banking-open-console): customer, destination, quote, transfer.
* [Connect](https://docs.easner.com/connect.md#quickstart): a payee, earnings, and the connect sheet.

Every public method is on the [v1 reference](https://docs.easner.com/reference.md), grouped like the Guides (Banking, Checkout, Connect, API) in the API reference tab.

## Keys and mode

Mint a **test** secret key in Console → Settings → API keys. Copy it once into `EASNER_SECRET_KEY` on your server. The prefix (`easner_sk_test_…` or `easner_sk_live_…`) decides test vs live; there is no sandbox host. One key can call every route its scopes allow across Banking, Checkout and Connect. Tick only the scopes you need when you create the key (or use the defaults for your business mode). See [Authentication](https://docs.easner.com/authentication.md), [API keys and scopes](https://docs.easner.com/api-keys.md) and [Test and live](https://docs.easner.com/test-and-live.md).

## Integrate Checkout from the Console

Open Console, **Checkout, Integrate**. It walks the same six steps below and writes the code for your language and your choices. Before you start: stay in **Test** and add your website. Test needs no business verification or payment setup; you do those before going live.

```bash theme={null}
export EASNER_SECRET_KEY=easner_sk_test_…
export EASNER_WEBHOOK_SECRET=easner_whsec_…
```

**1. What and where**

Choose what customers pay for (one-time payments, subscriptions, or both), where they pay (an overlay on your page, inline in your checkout, or a hosted page Easner serves), your website, the return URL and your webhook URL. Console shows a summary and an honest time estimate. Adding your website here is what makes your `success_url` and `cancel_url` allowed. Mint a test key in Settings → API keys and copy the secret once into your server environment.

**2. Create a session**

On your server, call [`POST /v1/checkout/sessions`](https://docs.easner.com/checkout#create-a-session) with your secret key, the line items in cents, the return URLs, your own order id in `metadata`, and an `Idempotency-Key` per order. Hand the browser only the session `url` (hosted) or `client_secret` (overlay and inline).

```bash theme={null}
curl https://api.easner.com/v1/checkout/sessions \
  -H "Authorization: Bearer $EASNER_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: checkout-ord_1042" \
  -d '{
    "mode": "payment",
    "currency": "usd",
    "line_items": [{ "name": "House blend, 1 kg", "amount": 2400, "quantity": 2 }],
    "customer_email": "ada@example.com",
    "success_url": "https://yoursite.com/thanks?session_id={CHECKOUT_SESSION_ID}",
    "cancel_url": "https://yoursite.com/cart",
    "metadata": { "order_id": "ord_1042" }
  }'
```

Expected: `201` with `url`, `client_secret` and `status: "open"`.

**3. Open checkout**

Hosted: redirect to `url`. Overlay: load `https://js.easner.com/v1/checkout.js` and call `EasnerCheckout.openOverlay({ publishableKey, clientSecret })`. Inline: `EasnerCheckout.mount("#checkout", { publishableKey, clientSecret })`. Browser code only ever holds the test publishable key (`easner_pk_test_…`). For a plain page with no server code, [`button.js`](https://docs.easner.com/checkout#website-button) opens a session from a `data-easner-button` element.

**4. Make a test payment**

Open checkout from your site and pay with `4242 4242 4242 4242`, any future date and any CVC. Nothing is charged. Console shows "Test payment received" by itself.

**5. Handle the result**

Add your webhook endpoint in Settings → Webhooks (a public `https://` address), tick `checkout.completed`, `checkout.async_succeeded`, `checkout.failed` and `refund.created`, plus the subscription events for subscriptions. Copy the signing secret once into `EASNER_WEBHOOK_SECRET`. Verify `easner-signature` ([Webhooks](https://docs.easner.com/webhooks.md#verify-easner-signature)), then fulfil the order on `checkout.completed`. Press **Send test event** in Console. Your server should answer `200`.

**6. Go live**

Console shows four checks: business verified, branding set, a test payment went through, your webhook answered 200. When all are done, turn on live payments, then swap in your live keys and a live webhook endpoint. See the [go-live checklist](https://docs.easner.com/test-and-live.md#go-live-with-checkout).

### Building with an AI assistant?

The Integrate page has a **Building with an AI assistant?** card with **Preview prompt**. It writes one prompt from your choices that you paste into your coding assistant, or download as `AGENTS.md`. The prompt holds only the test publishable key. It names your secret key and webhook secret as environment variables (`EASNER_SECRET_KEY`, `EASNER_WEBHOOK_SECRET`) for the assistant to read from your server, and Console replaces anything that looks like a secret with the variable name.

An example, for one-time payments in an overlay with Node:

```text theme={null}
Add Easner Checkout to my site, yoursite.com (Node.js server).

What customers pay for: one-time payments.
Where they pay: an overlay on my page (EasnerCheckout.openOverlay).
Site: https://yoursite.com
Return URL: https://yoursite.com/thanks?session_id={CHECKOUT_SESSION_ID}
Webhook URL: https://yoursite.com/api/easner-webhook

1. Server: add POST /api/checkout that calls POST https://api.easner.com/v1/checkout/sessions
   with Authorization: Bearer <process.env.EASNER_SECRET_KEY> and an Idempotency-Key header (one per order).
   - One-time: mode "payment", currency "usd", line_items with name, amount (in cents) and quantity.
   - success_url: https://yoursite.com/thanks?session_id={CHECKOUT_SESSION_ID}
   - Put your own order or signup id in metadata.
   Return only session.client_secret to the browser.
2. Page: load https://js.easner.com/v1/checkout.js, then call
   EasnerCheckout.openOverlay({ publishableKey: "easner_pk_test_…", clientSecret }) when "Check out" is clicked.
3. Webhook: POST /api/easner-webhook. Verify the easner-signature header (t=…,v1=…): v1 is the
   HMAC-SHA256 of "{t}.{raw body}" with process.env.EASNER_WEBHOOK_SECRET. Answer 200 quickly.
   Fulfil on checkout.completed (checkout.async_succeeded is informational); also handle checkout.failed, refund.created.
4. On the return page, read the session from GET https://api.easner.com/v1/checkout/sessions?id=… on the server
   before showing success.

Keys: the publishable key above is public. Read EASNER_SECRET_KEY and EASNER_WEBHOOK_SECRET from the
server's environment. Never put them in browser code, a repository or a chat. Use test mode keys only.
```

Give the assistant this documentation too. [Checkout](https://docs.easner.com/checkout.md), [Webhooks](https://docs.easner.com/webhooks.md) and [Errors](https://docs.easner.com/errors.md) are the pages it needs. Before you trust the result, check three things: the secret key is only read from the environment, the browser only gets `url` or `client_secret`, and the order is fulfilled in the webhook, not in `onSuccess`.

> [!WARNING]
>
> Never paste a real secret key or webhook secret into an AI chat, a prompt or a repository. Test keys included.

## Banking: open Console

Stay in **Test**. Settings is API keys, webhooks, logs, and Workbench.

**1. Mint a test key**

Settings → API keys. The list is the **current** Test or Live mode only. Create as many keys as you need. Copy the secret once into your server env.

```bash theme={null}
export EASNER_SECRET_KEY=easner_sk_test_…
```

**2. Add a webhook URL**

Settings → Webhooks. Create as many URLs as you need. Default ticks are Banking: `customer.updated`, `account.updated`, `transfer.completed`, `transaction.created`. Add Checkout events if you take payments on a site. In Connect mode the list also offers Connect events, including `payee.linked` and `payout.completed`.

You need Dev Platform enabled on the business and that test secret.

## First send

> [!NOTE]
>
> **The customer authorizes every send.** Your key creates a transfer, but only the customer can approve it. In live, they enter a 6-digit code Easner emails to them, either on a page Easner emails them or on one you open from your app ([In your own app](https://docs.easner.com/transfers.md#in-your-own-app)). Test needs no code. Plan this step into your app before anything else on the send path.

> [!NOTE]
>
> Sending **live** money over the API is **off by default**. In Test everything below works. With a live key, creating a destination, creating a transfer and confirming one all return `403 payouts_disabled` until Easner enables money-out API keys for your environment. It is a setting Easner turns on (not something you can switch in Console), so contact Easner support and say you want Send over the API. Customers, accounts, receive, quotes, transactions and all of Checkout work without it.

**1. Create a customer**

A customer is your end user. Creating one opens their USD vault (USDC) and issues `acct_`.

```bash theme={null}
curl https://api.easner.com/v1/customers \
  -H "Authorization: Bearer $EASNER_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"individual","email":"ada@example.com","name":"Ada","external_id":"user_42"}'
```

`type` is `individual` (a person, KYC) or `business` (a company, KYB). It decides which verification they go through and which corridors they can send to, and it cannot change later. Save `id` (`cus_…`) and the issued `accounts[0].id` (`acct_…`).

**2. Fund the test vault**

A new `acct_` is `available: 0`. In Console, open Accounts → **Simulate test deposit** (session API, **not** `/v1`, test only). Or `POST /v1/accounts/acct_…/onramp_sessions` and complete the hosted test page. Wait for `account.updated`.

**3. Add a destination**

A payment method. A wallet is the simplest test destination, because it needs no corridor. For bank or mobile money, see [Send](https://docs.easner.com/send.md).

```bash theme={null}
curl https://api.easner.com/v1/destinations \
  -H "Authorization: Bearer $EASNER_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"wallet","customer":"cus_…","details":{"address":"…","network":"solana","currency":"USDC"}}'
```

Save `id` (`dest_…`).

**4. Quote**

Lock send and receive. `source` is required. Amounts are cents. Quotes expire in 15 minutes.

```bash theme={null}
curl https://api.easner.com/v1/quotes \
  -H "Authorization: Bearer $EASNER_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount":4900,"currency":"usd","source":"acct_…","destination":"dest_…"}'
```

Save `id` (`qt_…`). In test, send and receive are 1:1 unless a live wallet destination is priced.

**5. Transfer**

Create the send. Always send `Idempotency-Key`.

```bash theme={null}
curl https://api.easner.com/v1/transfers \
  -H "Authorization: Bearer $EASNER_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"quote":"qt_…"}'
```

Expected: `status` is `requires_action`. Save `id` and `client_secret`.

**6. Confirm**

In your app the customer reviews, then you confirm with the `client_secret` — not the secret key. Or open `next_action.url`. See [Transfers](https://docs.easner.com/transfers.md#confirm).

```bash theme={null}
curl https://api.easner.com/v1/transfers/tr_…/confirm \
  -H "Content-Type: application/json" \
  -d '{"client_secret":"easner_ta_test_…"}'
```

Expected: `status` is `completed`. The test vault is debited. A `txn_` row is written.

Listen for `transfer.completed` and `transaction.created` on your webhook.

**7. Read activity**

```bash theme={null}
curl https://api.easner.com/v1/transactions \
  -H "Authorization: Bearer $EASNER_SECRET_KEY"
```

A new test account starts at `available: 0`. Fund it before the first send (step above). For live-sized sends, use [Receive](https://docs.easner.com/receive.md).

## Take a payment on your website

To accept online payments, go to [Checkout](https://docs.easner.com/checkout.md). Those funds land on **your** business balance, not this customer `acct_`.

> [card] [Receive money](https://docs.easner.com/receive.md)
>
> Verify the customer (KYC or KYB), then fetch bank details, chain addresses, and onramp onto their account.


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