Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/blindpaylabs/blindpay-node/llms.txt

Use this file to discover all available pages before exploring further.

The Quotes resource provides methods to create quotes for crypto-to-fiat conversions (payouts) and retrieve foreign exchange rates.

create

Create a quote for a payout transaction. The quote locks in an exchange rate, fee structure, and payment details for a limited time.
const response = await blindpay.quotes.create({
  bank_account_id: 'ba_1234567890',
  currency_type: 'receiver',
  cover_fees: false,
  request_amount: 1000,
  network: 'base',
  token: 'USDC',
  description: 'Invoice payment #12345',
  transaction_document_file: 'https://example.com/invoice.pdf',
  transaction_document_type: 'invoice',
  transaction_document_id: 'INV-12345',
  partner_fee_id: null
});

if (response.error) {
  console.error(response.error.message);
} else {
  console.log(`Quote ID: ${response.data.id}`);
  console.log(`Rate: ${response.data.commercial_quotation}`);
  console.log(`Sender amount: ${response.data.sender_amount} ${response.data.token || 'USDC'}`);
  console.log(`Receiver amount: ${response.data.receiver_amount}`);
  console.log(`Expires at: ${new Date(response.data.expires_at * 1000)}`);
}

Parameters

bank_account_id
string
required
ID of the beneficiary’s bank account that will receive the fiat funds.
currency_type
'sender' | 'receiver'
required
Whether the request_amount is in stablecoin (sender) or fiat currency (receiver).
cover_fees
boolean
required
Whether fees should be covered by the sender (true) or deducted from the receiver amount (false).
request_amount
number
required
The amount to quote. Interpreted based on currency_type.
network
Network
required
Blockchain network to use for the transaction. Supported networks:
  • EVM: base, arbitrum, polygon, ethereum, sepolia, arbitrum_sepolia, base_sepolia, polygon_amoy
  • Stellar: stellar, stellar_testnet
  • Other: tron, solana, solana_devnet
token
'USDC' | 'USDT' | 'USDB'
The stablecoin token to send. If not specified, defaults to the network’s primary stablecoin.
description
string
Description of the transaction purpose.
partner_fee_id
string
ID of the partner fee configuration to apply, or null for no partner fee.
transaction_document_file
string
required
URL or base64-encoded document supporting the transaction (e.g., invoice, contract).
transaction_document_id
string
Document identifier or number (e.g., invoice number).
transaction_document_type
TransactionDocumentType
Type of supporting document:
  • invoice: Commercial invoice
  • purchase_order: Purchase order
  • delivery_slip: Delivery receipt
  • contract: Legal contract
  • customs_declaration: Customs documentation
  • bill_of_lading: Shipping document
  • others: Other document types

Response

data
CreateQuoteResponse
The created quote details.
id
string
Unique identifier for the quote.
expires_at
number
Unix timestamp (in seconds) when the quote expires.
commercial_quotation
number
The commercial market exchange rate for the transaction.
blindpay_quotation
number
The BlindPay exchange rate including fees and spread.
receiver_amount
number
Amount that will be received in fiat currency.
sender_amount
number
Amount that needs to be sent in stablecoin.
receiver_local_amount
number
Local amount in the beneficiary’s currency (if different from receiver_amount).
partner_fee_amount
number | null
Partner fee amount if applicable.
flat_fee
number | null
Flat fee charged for the transaction.
description
string
Transaction description.
contract
object | null
Smart contract details for EVM networks (required for approve transactions).
abi
object[]
Contract ABI definition.
address
string
Token contract address.
functionName
'approve'
Function to call (approve).
blindpayContractAddress
string
BlindPay’s contract address to approve.
amount
string
Amount to approve (in wei/smallest unit).
network
object
Network details including name and chainId.

getFxRate

Retrieve the current foreign exchange rate between currencies without creating a quote. This is useful for displaying approximate rates to users before they commit to a transaction.
const response = await blindpay.quotes.getFxRate({
  currency_type: 'sender',
  from: 'USDC',
  to: 'BRL',
  request_amount: 1000
});

if (response.error) {
  console.error(response.error.message);
} else {
  console.log(`Commercial rate: ${response.data.commercial_quotation}`);
  console.log(`BlindPay rate: ${response.data.blindpay_quotation}`);
  console.log(`You'll receive approximately: ${response.data.result_amount} BRL`);
  console.log(`Flat fee: ${response.data.instance_flat_fee}`);
  console.log(`Percentage fee: ${response.data.instance_percentage_fee}%`);
}

Parameters

currency_type
'sender' | 'receiver'
required
Whether the request_amount is in the source currency (sender) or destination currency (receiver).
from
'USDC' | 'USDT' | 'USDB'
required
Source stablecoin for the conversion.
to
'BRL' | 'USD' | 'MXN' | 'COP' | 'ARS'
required
Destination fiat currency for the conversion.
  • BRL: Brazilian Real
  • USD: US Dollar
  • MXN: Mexican Peso
  • COP: Colombian Peso
  • ARS: Argentine Peso
request_amount
number
required
The amount to convert. Interpreted based on currency_type.

Response

data
GetFxRateResponse
Foreign exchange rate information.
commercial_quotation
number
The commercial market exchange rate without fees.
blindpay_quotation
number
The BlindPay exchange rate including fees and spread.
result_amount
number
The resulting amount after conversion and fees.
instance_flat_fee
number | null
Flat fee charged by your instance (if applicable).
instance_percentage_fee
number
Percentage fee charged by your instance.