---
url: /docs/integrations/v0.md
description: >-
  Add stablecoin payments to a v0 (Vercel) Next.js app: payout, on-ramp, and
  virtual-account flows via the BlindPay API and a copy-paste prompt.
---

[v0](https://v0.dev) by Vercel generates Next.js apps from prompts. This guide adds **stablecoin payments** to a v0 project: payouts, on-ramps, and virtual accounts: via the BlindPay REST API and Next.js route handlers.

## Copy-paste prompt

```text [v0 prompt]
Add stablecoin payments to this Next.js app using the BlindPay API.

- Create a route handler at app/api/payout/route.ts that POSTs to
  https://api.blindpay.com/v1/instances/${BLINDPAY_INSTANCE_ID}/payouts/evm/quote
  and /payouts/evm, authenticating with
  Authorization: Bearer ${BLINDPAY_API_KEY}.
- Read BLINDPAY_API_KEY and BLINDPAY_INSTANCE_ID from process.env (server only).
- Build a client form: amount in USDC, destination, a "Get quote" button that
  calls the route handler, and a "Send payout" button.
- Keep the API key server-side in the route handler.

Docs: https://blindpay.com/docs/getting-started/overview
```

## Setup

### Get your credentials

Grab your API key and instance ID from the [BlindPay dashboard](https://app.blindpay.com/sign-up).

### Add Vercel env vars

```bash [.env.local]
BLINDPAY_API_KEY=your-api-key
BLINDPAY_INSTANCE_ID=your-instance-id
```

Add the same vars in your Vercel project settings for production.

### Paste the prompt

Paste the prompt into v0, then deploy. Verify the generated route against the [API reference](https://api.blindpay.com/reference).

## Example route handler

```ts [app/api/payout/route.ts]
export async function POST(req: Request) {
  const { request_amount } = await req.json()
  const res = await fetch(
    `https://api.blindpay.com/v1/instances/${process.env.BLINDPAY_INSTANCE_ID}/payouts/evm/quote`,
    {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${process.env.BLINDPAY_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ currency_type: 'sender', request_amount }),
    },
  )
  return Response.json(await res.json())
}
```

The secret key must only be read in server code (route handlers, server actions). Never ship it to the client.

## Next steps

* [Quick start: stablecoin to fiat](/stablecoin/quickstart)
* [All AI builder integrations](/integrations/)
* [BlindPay for AI agents](/build-with-ai)
