| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
What does this endpoint do?
The purpose of this endpoint is to simulate a ramp process and generate a quote. It validates your payload, calculates the exchange rate, and estimates the blockchain fees.
Flow Configuration:
The flow is determined by the properties you include in the request:
- On-ramp: Include
cryptoWithdrawalInformationto ensure the cryptocurrency is sent to the correct wallet. - Off-ramp: Include
fiatWithdrawalInformation. You must provide either aKey(PIX Key) or aQrCodeto ensure the funds are sent to the correct destination.
QR Code Payout Logic (Off-ramp)
When using a PIX QrCode within fiatWithdrawalInformation, the validation of the quoteRequest depends on whether the code has an embedded value:
- QR Code without value: You act as the definer of the amount. You must provide either
BaseAmountorQuoteAmountin thequoteRequest.
{
"taxId": "33821597035",
"name": "José",
"email": "[email protected]",
"externalId": "123",
"taxIdCountry": "BRA",
"DepositBlockchain": "Polygon",
"fiatWithdrawalInformation": {
"QrCode": "000201..." // Generic QR Code
},
"quoteRequest": {
"Side": "Sell",
"BaseAmount": 10, // Amount is REQUIRED
"QuoteAmount": 0,
"BaseCurrency": "USDC",
"QuoteCurrency": "BRL"
}
}- QR Code with value: The amount is fixed by the QR Code itself. You must set both
BaseAmountandQuoteAmountto0in thequoteRequest. The API will automatically extract the amount from the QR Code string.
{
"taxId": "33821597035",
"name": "José",
"email": "[email protected]",
"externalId": "123",
"taxIdCountry": "BRA",
"DepositBlockchain": "Polygon",
"fiatWithdrawalInformation": {
"QrCode": "000201..." // QR Code with embedded value (e.g., R$ 50.00)
},
"quoteRequest": {
"Side": "Sell",
"BaseAmount": 0, // Must be 0
"QuoteAmount": 0, // Must be 0
"BaseCurrency": "USDC",
"QuoteCurrency": "BRL"
}
}Refund Configuration & Auto-Refunds
To enable automatic refunds in case of an error during the flow, you must provide the refundCryptoAddress property in this request.
Refund Constraints
The eligibility for an automatic refund depends on when the error occurs:
- Before Trade: If the error happens before the exchange takes place, the refund can be processed for any currency pair.
- After Trade: If the error happens after the exchange, the automatic refund is supported only for equivalent currency pairs (e.g., BRL-BRZ).
Quote Information
To generate a valid preview, you must provide the quoteRequest object containing the specific trade details (such as amount, side, and currencies).
Note: Unlike the v1 endpoint, passing a pre-existing quoteId is not supported here, as this endpoint is responsible for calculating the quote.
Response Data
The response will include a previewId and a blockchainFee.
previewId: Required to call the Create Swap Order (Accept) endpoint.blockchainFee: specifically refers to the fee charged by the blockchain network to process the transaction, unrelated to service fees.
401Unauthorized