Stablecoins
Stablecoins are digital assets pegged to the value of the US Dollar (USD) at a 1:1 ratio. Attrus supports stablecoin transactions, allowing you to convert local currencies into stablecoins, exchange between stablecoins, or move funds between stablecoins and fiat currencies — all using the same transaction endpoint you already use for traditional FX operations.
Supported stablecoins:
| Stablecoin | Description |
|---|---|
USDT | Tether USD — the most widely used stablecoin |
USDC | USD Coin — issued by Circle |
USDG | Global Dollar — a regulated stablecoin |
RLUSD | Ripple USD — issued by Ripple |
How Stablecoins Work
Stablecoin transactions use the same POST /transactions endpoint as all other Attrus operations. You specify the source currency in the currency field and the destination stablecoin (or vice versa) in the exchange_currency field.
Key concepts:
- Stablecoin exchange rates are derived from the corresponding USD spot rate. For example, the BRL → USDT rate is the same as the BRL → USD rate
- Exchanges between stablecoins (e.g., USDT → USDC) and between stablecoins and USD use a
1.0spot rate. Attrus's FX margin is applied on top of this base rate - Exchanges between stablecoins and other fiat currencies (e.g., USDT → EUR) use the corresponding USD-based rate
- Each stablecoin has its own internal bank accounts within Attrus (cash-in and cash-out), similar to fiat currency accounts
- Stablecoin accounts are provided during onboarding and can be found in the Bank Accounts section of the Attrus Portal
Allowed Currency Pairs
Below is a summary of the allowed exchange directions for stablecoin transactions:
| Direction | Example | Allowed |
|---|---|---|
| Local currency ↔ Stablecoin | BRL → USDT, USDT → BRL | Yes |
| Fiat currency ↔ Stablecoin | USD → USDT, USDT → EUR | Yes |
| Stablecoin ↔ Stablecoin | USDT → USDC, USDG → RLUSD | Yes |
Pay-In: Local Currency to Stablecoin
curl -X POST "https://api.facilitapay.com/api/v1/transactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"transaction": {
"subject_id": "customer id",
"from_bank_account_id": "your physical BRL bank account id",
"to_bank_account_id": "your internal USDT cash-in id",
"currency": "BRL",
"exchange_currency": "USDT",
"value": "5000.00"
}
}'
This example simulates a pay-in transaction where your customer pays 5,000 BRL via PIX or TED, and the funds are converted to USDT. The exchange rate used is the same as the BRL → USD rate, since USDT is pegged 1:1 to USD.
The same flow applies to all supported local currencies (MXN, COP, CLP) — just change the currency and from_bank_account_id to match the respective country.
HTTP Request
POST /transactions
Body Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
transaction | An object containing all the required values | object | true |
subject_id | The ID of the registered customer | UUID | true |
from_bank_account_id | The ID of your local currency bank account (e.g., BRL) | UUID | true |
to_bank_account_id | The ID of your internal stablecoin cash-in account (e.g., USDT) | UUID | true |
currency | Source currency — must be a local currency: BRL, MXN, COP or CLP | string | true |
exchange_currency | Destination stablecoin: USDT, USDC, USDG or RLUSD | string | true |
value | Amount in the source currency with two decimal places, e.g., "5000.00" | string | true |
Conversion: Fiat Currency to Stablecoin
curl -X POST "https://api.facilitapay.com/api/v1/transactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"transaction": {
"currency": "USD",
"exchange_currency": "USDT",
"value": "1000.00",
"from_bank_account_id": "your internal USD cash-in id",
"to_bank_account_id": "your internal USDT cash-in id",
"subject_id": "your partner_id"
}
}'
Since stablecoins are pegged 1:1 to USD, the spot rate between USD and any stablecoin is 1.0. For other fiat currencies (e.g., EUR), the rate is derived from the corresponding USD rate. Attrus's FX margin (operational cost) is applied on top of the base rate, just like any other currency pair. You can use any supported fiat currency (USD, EUR, etc.) in the currency field.
Conversions are only allowed between accounts of the same flow type — cash-in to cash-in, or cash-out to cash-out.
HTTP Request
POST /transactions
Body Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
transaction | An object containing all the required values | object | true |
currency | Source fiat currency (e.g., USD, EUR) | string | true |
exchange_currency | Destination stablecoin: USDT, USDC, USDG or RLUSD | string | true |
value | Amount in the source fiat currency with two decimal places, e.g., "1000.00" | string | true |
from_bank_account_id | Your internal fiat currency account ID (must match the currency field) | UUID | true |
to_bank_account_id | Your internal stablecoin cash-in account ID | UUID | true |
subject_id | Your partner ID with Attrus | UUID | true |
Conversion: Stablecoin to Stablecoin
curl -X POST "https://api.facilitapay.com/api/v1/transactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"transaction": {
"currency": "USDT",
"exchange_currency": "USDC",
"value": "500.00",
"from_bank_account_id": "your internal USDT cash-in id",
"to_bank_account_id": "your internal USDC cash-in id",
"subject_id": "your partner_id"
}
}'
All supported stablecoins share the same underlying USD-pegged value, so conversions between any combination of stablecoins use a 1.0 spot rate. Attrus's FX margin is applied on top of this base rate.
HTTP Request
POST /transactions
Body Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
transaction | An object containing all the required values | object | true |
currency | Source stablecoin: USDT, USDC, USDG or RLUSD | string | true |
exchange_currency | Destination stablecoin: USDT, USDC, USDG or RLUSD | string | true |
value | Amount with two decimal places, e.g., "500.00" | string | true |
from_bank_account_id | Your internal source stablecoin account ID | UUID | true |
to_bank_account_id | Your internal destination stablecoin account ID | UUID | true |
subject_id | Your partner ID with Attrus | UUID | true |
Conversion: Stablecoin to Fiat Currency
curl -X POST "https://api.facilitapay.com/api/v1/transactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"transaction": {
"currency": "USDT",
"exchange_currency": "USD",
"value": "2000.00",
"from_bank_account_id": "your internal USDT cash-in id",
"to_bank_account_id": "your internal USD cash-in id",
"subject_id": "your partner_id"
}
}'
Converting from a stablecoin to a fiat currency uses the corresponding exchange rate (e.g., 1.0 for USD, or the USD-derived rate for EUR and other currencies), with Attrus's FX margin applied. This is useful when you want to consolidate stablecoin holdings into fiat currency before settling to your international bank account.
HTTP Request
POST /transactions
Body Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
transaction | An object containing all the required values | object | true |
currency | Source stablecoin: USDT, USDC, USDG or RLUSD | string | true |
exchange_currency | Destination fiat currency (e.g., USD, EUR) | string | true |
value | Amount with two decimal places, e.g., "2000.00" | string | true |
from_bank_account_id | Your internal stablecoin account ID | UUID | true |
to_bank_account_id | Your fiat currency account ID (must match the exchange_currency field) | UUID | true |
subject_id | Your partner ID with Attrus | UUID | true |
Exchange Rates for Stablecoins
The exchange rates endpoint (GET /exchange_rates) also returns rates for stablecoin pairs. Stablecoin rates follow these rules:
For local currency → stablecoin pairs:
The rate is the same as the corresponding local currency → USD rate. For example, brlusdt and brlusd will return the same value, since USDT is pegged 1:1 to USD. The same applies to brlusdc, brlusdg, and brlusdrlusd.
For stablecoin ↔ USD and stablecoin ↔ stablecoin pairs:
The spot rate is always 1.0, reflecting the 1:1 peg. For example: usdtusdcspot, usdtusdspot, usdcusdgspot — all return 1.0. The final rates returned by the endpoint already include Attrus's FX margin (operational cost) applied on top of the spot rate.
For stablecoin ↔ other fiat currency pairs (EUR, GBP, etc.):
The rate is derived from the corresponding USD rate. For example, the USDT → EUR rate will match the USD → EUR rate, since the stablecoin is pegged to USD.
Tax Treatment
Exchanges between fiat currencies and stablecoins, or between different stablecoins, are treated as withdrawal operations for tax purposes (IOF calculation). This means the IOF rate applied to these transactions follows the withdrawal IOF rate rather than the standard FX IOF rate.
Business Rules Summary
Important requirements:
- Stablecoin transactions use the same
POST /transactionsendpoint as all other Attrus transactions - You must have stablecoin internal bank accounts set up during onboarding — check the Bank Accounts section of the Attrus Portal
from_bank_account_idis not required for stablecoin or foreign currency transactions — the system will automatically select the appropriate source account when applicable- Conversions between internal accounts are only allowed between accounts of the same flow type: cash-in to cash-in, or cash-out to cash-out
- Attrus's FX margin (operational cost) applies to all stablecoin transactions, including stablecoin-to-stablecoin and stablecoin-to-fiat conversions
Common Mistakes