---
url: /docs/stablecoin/payin-quotes.md
description: >-
  Lock the fiat amount, fee split, delivery network, and stablecoin destination
  before creating an on-ramp payin.
---

A payin quote locks in the numbers for an on-ramp before you commit to it: how much fiat the sender pays, how much stablecoin the destination wallet receives, the fee split, and the wallet the funds settle to. You create a payin quote first, then create the [payin](/stablecoin/payins) itself by referencing the quote's id. The quote is what enforces amount limits, currency rules, and payer requirements, so most of the validation happens here rather than at payin creation.

```
payin quote -> payin (create within 5 minutes)
```

## Destination

The destination is a stablecoin wallet, never a bank account. Pass exactly one of:

| Field | Points to | Prefix |
| --- | --- | --- |
| `blockchain_wallet_id` | An external blockchain wallet the customer controls | `bw_` |
| `wallet_id` | A BlindPay-managed wallet | `bl_` |

You cannot pass both, and you cannot pass neither: BlindPay rejects the request if either rule is violated. BlindPay reads the network directly off the destination wallet, so you never pass a network on the quote itself. See [wallets](/stablecoin/wallets) and [blockchain wallets](/stablecoin/blockchain-wallets) for how to register each type.

## Token and delivery network

`token` is the stablecoin the destination wallet receives. The network is implied by the wallet you pass as the destination, and only certain token and network combinations have a deployed contract:

| Chain | Tokens |
| --- | --- |
| Ethereum, Base, Polygon, Arbitrum (EVM) | USDC, USDT (USDT only on Polygon and Ethereum) |
| Stellar | USDC |
| Solana | USDC, USDT |
| Tron | USDT only |

## currency\_type

`currency_type` tells BlindPay which side `request_amount` is denominated in. On a payin quote, `sender` means fiat, which is the opposite convention from a payout quote (where `sender` means stablecoin), so read it carefully:

| `currency_type` | `request_amount` is denominated in |
| --- | --- |
| `sender` | The fiat currency the sender sends (determined by `payment_method`) |
| `receiver` | The stablecoin the destination wallet receives |

## cover\_fees

Fees can be paid by either party:

| `cover_fees` | Who pays | Fee is deducted from |
| --- | --- | --- |
| `false` | The customer | The stablecoin amount the destination wallet receives (most common) |
| `true` | The sender | Added on top of the fiat amount the sender sends |

## request\_amount

`request_amount` is an integer in minor units and does not accept floats. To send `$123.45`, pass `12345`.

Minimum and maximum amounts vary by currency, and the quote enforces them for you: if `request_amount` falls outside the allowed range for that currency, the request fails with a dynamic error naming the min and max. Most currencies allow amounts as low as roughly $10 equivalent, but some (for example COP) require a much higher minimum in raw minor units because of the currency's smaller nominal value. Don't hardcode a single minimum across currencies; read the error if you hit the floor.

## Prerequisites

You also need a customer with a [blockchain wallet](/stablecoin/blockchain-wallets) or a [managed wallet](/stablecoin/wallets).

## Create a payin quote

```bash [🇺🇸 ACH]
curl https://api.blindpay.com/v1/instances/in_000000000000/payin-quotes \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "blockchain_wallet_id": "bw_000000000000",
  "currency_type": "sender",
  "cover_fees": true,
  "request_amount": 10000,
  "payment_method": "ach",
  "token": "USDB"
}'
```

```bash [🇺🇸 Wire]
curl https://api.blindpay.com/v1/instances/in_000000000000/payin-quotes \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "blockchain_wallet_id": "bw_000000000000",
  "currency_type": "sender",
  "cover_fees": true,
  "request_amount": 10000,
  "payment_method": "wire",
  "token": "USDB"
}'
```

```bash [🇧🇷 Pix]
curl https://api.blindpay.com/v1/instances/in_000000000000/payin-quotes \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "blockchain_wallet_id": "bw_000000000000",
  "currency_type": "sender",
  "cover_fees": false,
  "request_amount": 10000,
  "payment_method": "pix",
  "token": "USDB",
  "payer_rules": {
    "pix_allowed_tax_ids": [
      "14747677786"
    ]
  }
}'
```

```bash [🇲🇽 SPEI]
curl https://api.blindpay.com/v1/instances/in_000000000000/payin-quotes \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "blockchain_wallet_id": "bw_000000000000",
  "currency_type": "sender",
  "cover_fees": false,
  "request_amount": 100000,
  "payment_method": "spei",
  "token": "USDB"
}'
```

```bash [🇦🇷 Transfers]
curl https://api.blindpay.com/v1/instances/in_000000000000/payin-quotes \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "blockchain_wallet_id": "bw_000000000000",
  "currency_type": "sender",
  "cover_fees": false,
  "request_amount": 2000000,
  "payment_method": "transfers",
  "token": "USDB",
  "payer_rules": {
    "transfers_allowed_tax_id": "30-27383762-7"
  }
}'
```

```bash [🇨🇴 PSE]
curl https://api.blindpay.com/v1/instances/in_000000000000/payin-quotes \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "blockchain_wallet_id": "bw_000000000000",
  "currency_type": "sender",
  "cover_fees": false,
  "request_amount": 20000000,
  "payment_method": "pse",
  "token": "USDB",
  "payer_rules": {
    "pse_full_name": "<Replace with payer full name>",
    "pse_document_type": "NIT",
    "pse_document_number": "<Replace with payer document number>",
    "pse_email": "<Replace with payer email>",
    "pse_phone": "<Replace with payer phone number>",
    "pse_bank_code": "<Replace with payer bank code>"
  }
}'
```

To target a managed wallet instead of a blockchain wallet, replace `blockchain_wallet_id` with `wallet_id` (`bl_000000000000`) in any of the payloads above.

### payer\_rules

Some payment methods require payer identity fields so BlindPay can match and screen the incoming deposit:

| `payment_method` | `payer_rules` field | Notes |
| --- | --- | --- |
| `pix` | `pix_allowed_tax_ids` | Array of CPF/CNPJ tax ids allowed to send this Pix |
| `transfers` | `transfers_allowed_tax_id` | CUIT/CUIL tax id, required for `transfers` |
| `pse` | `pse_full_name`, `pse_document_type`, `pse_document_number`, `pse_email`, `pse_phone`, `pse_bank_code` | Full payer details, required for `pse` |

## Response

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string (`qu_`) | Pass this as `payin_quote_id` when creating the payin |
| `expires_at` | number | Epoch milliseconds. The quote is valid for 5 minutes |
| `sender_amount` | number | Fiat amount, in minor units, the sender must pay |
| `receiver_amount` | number | Stablecoin amount the destination wallet receives |
| `commercial_quotation` | number | Raw market exchange rate |
| `blindpay_quotation` | number | Exchange rate including BlindPay's fee |
| `flat_fee` | number | Flat-fee component of the quote |
| `partner_fee_amount` | number | Nonzero only when `partner_fee_id` is set |

The stablecoins themselves aren't sent yet at this point: creating the quote only locks the numbers. The [payin](/stablecoin/payins) you create from this quote is what triggers the fiat collection and the on-chain delivery to the destination wallet.

### What the payin shows the payer

The payin quote's `id` doesn't carry payer-facing instructions; those appear once you create the [payin](/stablecoin/payins) from the quote. Depending on `payment_method`, the payin response returns:

| `payment_method` | Field | Notes |
| --- | --- | --- |
| `ach`, `wire` | `memo_code` and `blindpay_bank_details` | Include the memo code with the transfer so BlindPay can match it. Ignored when the customer has an approved virtual account, since the payer sends to their own dedicated account instead |
| `pix` | `pix_code` | The Pix code (copia e cola) for the payer to complete the transfer |

See [payins](/stablecoin/payins) for the full response reference and field descriptions.

## Expiry

A payin quote expires **5 minutes** after creation. Create the payin before then; an expired quote is rejected when you try to use it. Generate a new quote if the window has passed.

## Partner fees

Pass `partner_fee_id` (prefix `pf_`) to attribute a payin to a partner fee configured in the dashboard. The fee is snapshotted at quote time and reflected in `partner_fee_amount` on the response. See [partner fees](/learn/partner-fees) for how the fee is calculated and collected.

## Testing

On development instances, the amount you request determines the outcome once the resulting payin is created:

| Amount | Result |
| --- | --- |
| 666.00 | Failed |
| 777.00 | Refunded |
| Any other amount | Completes automatically, about 30 seconds after initiation, and delivers `USDB` to the destination wallet on the matching testnet |

## Related

* [Payins](/stablecoin/payins): create the payin from a quote and track the on-chain delivery to completion
* [Blockchain wallets](/stablecoin/blockchain-wallets): register the external wallet a payin quote can target
* [Wallets](/stablecoin/wallets): the BlindPay-managed wallet alternative to a blockchain wallet
* [Supported chains](/kb/supported-chains): full chain and token compatibility matrix
* [Partner fees](/learn/partner-fees): how `partner_fee_id` is calculated and paid out
