---
title: v0 + BlindPay
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.'
navigation:
  order: 2
faq:
  - q: How do I add stablecoin payments to a v0 app?
    a: Paste the BlindPay prompt below into v0. It generates a Next.js route handler that calls the BlindPay REST API for quotes and payouts, plus a client form. Add BLINDPAY_API_KEY and BLINDPAY_INSTANCE_ID to your Vercel environment variables.
  - q: Can v0 build a USDC-to-fiat payout form?
    a: Yes. v0 generates the UI and a Next.js API route; BlindPay converts USDC or USDT to local fiat and settles over ACH, PIX, SPEI, SEPA, or SWIFT. The secret key stays server-side in the route handler.
  - q: Where do BlindPay credentials go in a Vercel project?
    a: Add BLINDPAY_API_KEY and BLINDPAY_INSTANCE_ID as Vercel environment variables and read them only inside server-side route handlers or server actions, never in client components.
howto:
  name: "Add stablecoin payments to a v0 app"
  steps:
    - name: "Get your credentials"
      text: "Copy your API key and instance ID from the BlindPay dashboard."
    - name: "Add Vercel env vars"
      text: "Add BLINDPAY_API_KEY and BLINDPAY_INSTANCE_ID to .env.local and your Vercel project settings."
    - name: "Paste the prompt"
      text: "Paste the BlindPay prompt into v0. It generates a Next.js route handler and client form for payouts."
---

[v0](https://v0.dev){target="_blank"} 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

::c-steps

### Get your credentials

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

### 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){target="_blank"}.

::

## 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())
}
```

::c-alert{icon="circle-info"}
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](/docs/getting-started/quick-start)
- [All AI builder integrations](/docs/integrations)
- [BlindPay for AI agents](/ai)
