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

# Server SDK — Client & payments

> merchant profile (me), create/get/list/cancel payments, verify, and fetch transaction signatures.

The SDK is installed; this page walks through **`unseen.me()`** and every **`unseen.payments.*`** helper that maps to [session states](/concepts/payment-lifecycle).

## Merchant profile

```ts theme={null}
const merchant = await unseen.me();
// { id, name, email, walletAddress, apiKeyPrefix, network, webhookUrl, ... }
```

## Payments resource

Accessible as `unseen.payments`.

| Method                       | Description                                                                                                                          |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `create(input)`              | Create a payment session (`amount`, `reference`, optional `mint`, `expiresIn`, `successUrl`, `cancelUrl`, `webhookUrl`, `metadata`). |
| `get(paymentId)`             | Fetch session by ID.                                                                                                                 |
| `verify(paymentId)`          | Ask Unseen to confirm on-chain state.                                                                                                |
| `getTxSignatures(paymentId)` | List associated transaction signatures.                                                                                              |
| `list(filters?)`             | Cursor-paginated list (`status`, `reference`, `limit`, `cursor`).                                                                    |
| `cancel(paymentId)`          | Cancel a **pending** session.                                                                                                        |

### Create

```ts theme={null}
const payment = await unseen.payments.create({
  amount: 50_000_000,
  reference: "order_123",
  description: "Premium Plan",
});
console.log(payment.checkoutUrl);
```

Amounts use **raw token units** (e.g. smallest USDC units). Optionally pass `mint` to override default USDC for the configured network.

### Verify

Use after checkout or alongside webhooks:

```ts theme={null}
const result = await unseen.payments.verify(payment.id);
if (result.status === "confirmed") {
  console.log(result.txSignature, result.reference);
}
```

### List

```ts theme={null}
const { data, pagination } = await unseen.payments.list({
  status: "confirmed",
  limit: 20,
});

if (pagination.hasMore && pagination.nextCursor) {
  const nextPage = await unseen.payments.list({
    status: "confirmed",
    cursor: pagination.nextCursor,
  });
}
```

**Next:** [Webhook signatures](/sdk/server/webhooks-verify)
