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

# Quickstart

> Accept your first deposit in 5 minutes

This guide gets a working deposit flow running. You'll create a session on your
server, then embed Daimo's hosted deposit flow in your app.

## Step 1: Create a session (server-side)

Create a session with your API key on the server - never expose it to the client. The response includes a `clientSecret` you provide to your frontend.

For details on credential handling, see Daimo's [Credential Model](/guides/sessions#credential-model).

```typescript theme={null}
// In your API route handler:
const response = await fetch("https://api.daimo.com/v1/sessions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.DAIMO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    destination: {
      type: "evm",
      address: "0xYourAddress",
      chainId: 8453, // Base
      tokenAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC
      amountUnits: "10.00", // $10 USDC
    },
    display: {
      title: "Deposit to Acme",
      verb: "Deposit",
      paymentMethods: { mode: "auto" }, // localized payment methods per user
    },
  }),
});

const { session } = await response.json();
// Return session.clientSecret and session.sessionId to the frontend
```

## Step 2: Embed the deposit flow (client-side)

### Web apps

Install the SDK and render `<DaimoFrame layout="modal" />`. It loads the hosted
deposit flow in a dimmed, full-screen overlay and sizes itself to the content,
with no wallet libraries or providers to set up.

```bash theme={null}
npm install @daimo/sdk
```

```tsx theme={null}
import { DaimoFrame } from "@daimo/sdk/web";

function Deposit({ sessionId, clientSecret, onClose }) {
  return (
    <DaimoFrame
      layout="modal"
      sessionId={sessionId}
      clientSecret={clientSecret}
      onClose={onClose}
    />
  );
}
```

<Info>
  `DaimoFrame` handles the overlay, iOS safe areas, and content sizing for you.
  To render the flow inside your own modal or page layout instead, use
  `layout="embed"`; see the [Web guide](/guides/modal).
</Info>

### Mobile apps

For **React Native**, install the SDK and render `<DaimoFrameRN layout="modal" />`.
It loads the same hosted flow in a `react-native-webview`.

```bash theme={null}
npm install @daimo/sdk react-native-webview
```

```tsx theme={null}
import { DaimoFrameRN } from "@daimo/sdk/native";

function Deposit({ sessionId, clientSecret, onClose }) {
  return (
    <DaimoFrameRN
      layout="modal"
      sessionId={sessionId}
      clientSecret={clientSecret}
      onClose={onClose}
    />
  );
}
```

<Info>
  See the [React Native guide](/guides/webview) for the embed layout and
  deeplink-scheme setup. On native iOS / Android (Swift / Kotlin), embed the
  same `/webview` URL directly; see [Native WebView](/guides/webview-native).
</Info>

## Step 3: Handle completion

`DaimoFrame` reports dismissal through `onClose`. To detect a completed deposit and read its on-chain details, poll [`GET /v1/sessions/{id}`](/api-reference/retrieve-session).

The session's `destination.delivery.txHash` contains the on-chain transaction which delivers the funds to the destination address.

## Next steps

* [Sessions](/guides/sessions) - understand the full session lifecycle
* [Payment Methods](/guides/payment-methods) - control which payment methods users see
* [Web](/guides/modal) - embed the deposit flow in your web app with `DaimoFrame`
* [React Native](/guides/webview) - embed in a React Native app with `DaimoFrameRN`
* [Native WebView](/guides/webview-native) - raw iOS / Android WebView, no SDK
* [Custom Integration](/guides/custom-integration) - build your own UI with the API
