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 Payin Quotes resource provides methods to create quotes for fiat-to-crypto conversions and retrieve foreign exchange rates.

create

Create a quote for a payin transaction. The quote locks in an exchange rate and fee structure for a limited time.
const response = await blindpay.payins.quotes.create({
  blockchain_wallet_id: 'bw_1234567890',
  currency_type: 'sender',
  payment_method: 'pix',
  request_amount: 1000,
  token: 'USDC',
  cover_fees: true,
  partner_fee_id: null,
  is_otc: false
});

if (response.error) {
  console.error(response.error.message);
} else {
  console.log(response.data.id);
  console.log(`Rate: ${response.data.commercial_quotation}`);
  console.log(`Expires at: ${new Date(response.data.expires_at * 1000)}`);
}

Parameters

blockchain_wallet_id
string
required
ID of the blockchain wallet that will receive the stablecoins.
currency_type
'sender' | 'receiver'
required
Whether the request_amount is in fiat currency (sender) or stablecoin (receiver).
payment_method
'ach' | 'wire' | 'pix' | 'spei' | 'transfers' | 'pse'
required
Payment method to be used for the transaction.
  • ach: Automated Clearing House (US)
  • wire: Wire transfer (US)
  • pix: Instant payment (Brazil)
  • spei: SPEI transfer (Mexico)
  • transfers: Bank transfer (Argentina)
  • pse: PSE payment (Colombia)
request_amount
number
required
The amount to quote. Interpreted based on currency_type.
token
'USDC' | 'USDT' | 'USDB'
required
The stablecoin token to receive.
cover_fees
boolean
required
Whether fees should be covered by the sender (true) or deducted from the receiver amount (false).
partner_fee_id
string | null
required
ID of the partner fee configuration to apply, or null for no partner fee.
is_otc
boolean
Whether this is an over-the-counter transaction.
payer_rules
PayerRules
Rules and restrictions for the payer.
pix_allowed_tax_ids
string[]
Allowed tax IDs for PIX payments.
transfers_allowed_tax_id
string
Allowed tax ID for transfers (Argentina).
pse_allowed_tax_ids
string[]
Allowed tax IDs for PSE payments.
pse_full_name
string
Full name for PSE payments.
pse_document_type
'CC' | 'NIT'
Document type for PSE payments (CC: Citizenship Card, NIT: Tax ID).
pse_document_number
string
Document number for PSE payments.
pse_email
string
Email for PSE payments.
pse_phone
string
Phone number for PSE payments.
pse_bank_code
string
Bank code for PSE payments.

Response

data
CreatePayinQuoteResponse
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 exchange rate for the transaction.
blindpay_quotation
number
The BlindPay exchange rate including fees.
receiver_amount
number
Amount that will be received in stablecoin.
sender_amount
number
Amount that needs to be sent in fiat currency.
partner_fee_amount
number | null
Partner fee amount if applicable.
flat_fee
number
Flat fee charged for the transaction.
is_otc
boolean
Whether this is an OTC transaction.

getFxRate

Retrieve the current foreign exchange rate between currencies without creating a quote.
const response = await blindpay.payins.quotes.getFxRate({
  currency_type: 'sender',
  from: 'BRL',
  to: 'USDC',
  request_amount: 5000
});

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(`Result amount: ${response.data.result_amount}`);
}

Parameters

currency_type
'sender' | 'receiver'
required
Whether the request_amount is in the source currency (sender) or destination currency (receiver).
from
'USDC' | 'USDT' | 'USDB' | 'BRL' | 'USD' | 'MXN' | 'COP' | 'ARS'
required
Source currency for the conversion.
to
'USDC' | 'USDT' | 'USDB' | 'BRL' | 'USD' | 'MXN' | 'COP' | 'ARS'
required
Destination currency for the conversion.
request_amount
number
required
The amount to convert. Interpreted based on currency_type.

Response

data
GetPayinFxRateResponse
Foreign exchange rate information.
commercial_quotation
number
The commercial market exchange rate.
blindpay_quotation
number
The BlindPay exchange rate including fees.
result_amount
number
The resulting amount after conversion.
instance_flat_fee
number
Flat fee charged by your instance.
instance_percentage_fee
number
Percentage fee charged by your instance.

Build docs developers (and LLMs) love