---
url: /docs/stablecoin/payout-solana.md
description: >-
  Fund a payout from an external Solana wallet, delegate the tokens to BlindPay,
  then create the payout.
---

This tutorial funds a [payout](/stablecoin/payouts) from an external [blockchain wallet](/stablecoin/blockchain-wallets) on Solana. Solana payouts need a token delegation before the payout executes: the sender delegates the quoted amount to BlindPay, then BlindPay pulls it during payout processing.

If the funds live in a BlindPay-custodied wallet instead, skip the delegation entirely: see [Payout with managed wallet](/stablecoin/payout-managed-wallet).

The examples below use `solana_devnet` and `USDB` since they're the development network and test token. Swap in the production network and token (`USDC` or `USDT`) when you go live.

## Prerequisites

You also need a [customer](/learn/customers) with `kyc_status: "approved"`, a [bank account](/stablecoin/bank-accounts) (`ba_...`), and an unexpired [payout quote](/stablecoin/payout-quotes) (`qu_...`) created with a Solana `network`.

### Prepare the delegation transaction

```bash [cURL]
curl --request POST \
  --url https://api.blindpay.com/v1/instances/in_000000000000/prepare-delegate-solana \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "owner_address": "YOUR_SOLANA_WALLET_ADDRESS",
    "token_address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "50000000"
  }'
```

This returns a serialized transaction to sign:

```json
{
  "success": true,
  "transaction": "AQAAA..."
}
```

### Sign and submit the delegation

Install the Solana dependencies:

```bash
npm install @solana/web3.js bs58
```

```js [index.js]
import { Connection, VersionedTransaction } from '@solana/web3.js'
import { Buffer } from 'node:buffer'

const RPC_URL = 'https://api.devnet.solana.com' // Use a mainnet RPC in production
const connection = new Connection(RPC_URL, 'confirmed')

// Serialized transaction from the previous step
const serializedTransaction = 'AQAAA...'

async function signAndSubmitDelegation() {
  const transactionBuffer = Buffer.from(serializedTransaction, 'base64')
  const transaction = VersionedTransaction.deserialize(transactionBuffer)

  // Sign with the sender's wallet (a browser wallet like Phantom, or a local Keypair server-side)
  const signedTransaction = await window.solana.signTransaction(transaction)

  const signature = await connection.sendTransaction(signedTransaction)
  await connection.confirmTransaction(signature, 'confirmed')

  console.log('Delegation signature:', signature)
  return signature
}

signAndSubmitDelegation()
```

Run it:

```bash
node solana-delegate.js
```

### Create the payout

Once the delegation transaction confirms, create the payout the same way as EVM, at `/payouts/evm`.

```bash [cURL]
curl --request POST \
  --url https://api.blindpay.com/v1/instances/in_000000000000/payouts/evm \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "quote_id": "qu_000000000000",
  "sender_wallet_address": "YOUR_SOLANA_WALLET_ADDRESS"
}'
```

Repeat the delegation (prepare, sign, submit) for every Solana payout. Each delegation only authorizes the amount tied to that specific quote.

## Related

* [Payouts](/stablecoin/payouts): status lifecycle, cover\_fees, testing sentinels, and webhooks
* [Payout quotes](/stablecoin/payout-quotes): full request and response fields
* [Mint USDB](/stablecoin/mint-usdb): mint to any Solana Devnet address via REST
* [Payout with managed wallet](/stablecoin/payout-managed-wallet): the no-signing alternative
