Quick start
Start building with UnblockPay APICopied!
1. Get your API KeysCopied!
Before you begin, you'll need API keys to authenticate your requests.
Contact our team to receive:
-
Your sandbox API keys
-
The complete Postman collection for testing our API
2. Set up your environmentCopied!
Start with our sandbox environment for testing:
https://api.sandbox.unblockpay.com
For mocked transaction states and webhooks, please visit our Sandbox mocks section.
3. Create a USDC/BRL quoteCopied!
First, create a quote to lock in the exchange rate:
curl https://api.sandbox.unblockpay.com/quote \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: YOUR_SECRET_TOKEN' \
--data '{
"symbol": "USDC/BRL"
}'
You will receive a response like:
{
"id": "0a411450-013f-11f0-9a14-5b6e00793f09",
"quotation": "5.7494",
"symbol": "USDC/BRL",
"expires_at": 1742003371
}
4. Move USDC to Brazilian ReaisCopied!
Use the quote ID to create a payout, along with amount
, sender
, and receiver
information.
curl https://api.sandbox.unblockpay.com/payout \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: YOUR_SECRET_TOKEN' \
--data '{
"amount": 5,
"quote_id": "550e8400-e29b-41d4-a716-446655440000",
"sender": {
"currency": "USDC",
"payment_rail": "solana",
"address": "3fFnisw8zsFhyQopBH1hLLshJEPs8tCysESSLTvTGjWk"
},
"receiver": {
"currency": "BRL",
"payment_rail": "pix",
"pix_key": "12311112312",
"document": "12311112312"
}
}'
After initiating the payout, you'll receive a response with the transaction details and deposit instructions for the stablecoins.
{
"id": "c6003140-040e-11f0-975f-5db311bbdd36",
"status": "awaiting_deposit",
"type": "off_ramp",
"partner_id": "b30578dc-20a4-4332-9eac-4643dc4ebbf0",
"quotation": "5.6689",
"sender_deposit_instructions": {
"amount": 5,
"currency": "USDC",
"payment_rail": "solana",
"deposit_address": "7PWWVJ3qLTacd4ucxpKXyfoZt39thmbzrnKqA9NnoGn5"
},
"sender": {
"currency": "USDC",
"payment_rail": "solana",
"address": "GvjfJUVea4fEyprqsDUaAvbJ6riFcgoh2v8qqjLJbJU5"
},
"receiver": {
"amount": 28.34,
"currency": "BRL",
"payment_rail": "pix",
"pix_key": "12311112312",
"pix_key_type": "CPF",
"pix_end_to_end_id": "E3513612020250217162700000888283",
"bank_account": {
"bank_name": "TESTE BANCO S.A",
"bank_code": null,
"bank_account_number": null,
"beneficiary": {
"document": "12311112312",
"name": "Testando Teste"
}
}
},
"receipt": {
"initial_crypto_amount": 5,
"final_fiat_amount": 28.34,
"unblockpay_fee": 0.15
},
"created_at": "2025-03-18T15:36:34.644Z",
"updated_at": "2025-03-18T15:36:34.644Z",
"finished_at": null
}
Upon successful deposit, the fiat payout will be processed and the receiver will get the funds in their bank account.
For more information about Payouts, please visit our Stablecoin to fiat payout (crypto off-ramp) section.
Congratulations! You've successfully completed your first stablecoin-to-fiat payout. Explore our additional guides to deepen your understanding about our API.
Talk to our team so we can provide an API key and set our sandbox enviroment for you.