Sell with Fiat Instructions
Withdraw stablecoins directly to customer bank accounts
You can create a sell order that sends the resulting fiat directly to a customer's registered bank account using Fiat Instructions. This enables a complete off-ramp flow from stablecoins to local bank accounts.
Supported Stablecoins
| Stablecoin | Fiat Currency | Country | Withdrawal Rails |
|---|---|---|---|
| MXNB | MXN | Mexico | CLABE |
| DIPE | ARS | Argentina | CBU, Alias |
How It Works
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Stablecoin │────▶│ Sell Order │────▶│ Customer Bank │
│ (MXNB/DIPE) │ │ + Fiat Instr │ │ Account │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- Customer holds stablecoins (MXNB or DIPE) in their Lirium account
- You create a sell order with a
fiat_instructionsdestination - Lirium converts the stablecoins to fiat at market rate
- Fiat is transferred to the customer's registered bank account
Prerequisites
Before creating a sell order with fiat instructions:
- Customer must be verified - Complete KYC verification
- Bank account must be registered - Create an Outgoing Fiat Instruction with the customer's bank details
Creating a Sell Order with Fiat Withdrawal
Step 1: Register the Bank Account
First, register the customer's bank account:
POST /customers/{customer_id}/outgoing_fiat_instructions{
"currency": "MXN",
"type": "mx_clabe",
"label": "Customer's BBVA Account",
"data": {
"clabe": "123456789012345678",
"beneficiary_name": "Juan Perez"
}
}Save the returned id (e.g., 39c98c5ae53941449539074a2645dd85).
Step 2: Create the Sell Order
Use the instruction ID in the sell order:
POST /customers/{customer_id}/orders{
"reference_id": "withdrawal-123",
"operation": "sell",
"asset": {
"currency": "MXNB",
"amount": "101.00"
},
"sell": {
"payment": {
"destination": {
"type": "fiat_instructions",
"value": "39c98c5ae53941449539074a2645dd85"
}
}
}
}Step 3: Confirm the Order
After the order is created, confirm it to execute the withdrawal:
POST /customers/{customer_id}/orders/{order_id}/confirmRequest Fields
| Field | Type | Required | Description |
|---|---|---|---|
reference_id | string | No | Your unique reference for idempotency |
operation | string | Yes | Must be sell |
asset.currency | string | Yes | Stablecoin to sell (MXNB or DIPE) |
asset.amount | string | Yes | Amount of stablecoins to sell |
sell.payment.destination.type | string | Yes | Must be fiat_instructions |
sell.payment.destination.value | string | Yes | The outgoing fiat instruction ID |
Example: Argentina (DIPE to ARS)
Register CBU Account
{
"currency": "ARS",
"type": "ar_cbu",
"label": "Banco Galicia",
"data": {
"cbu": "1234567890123456789012",
"cuit": "20123456789"
}
}Create Sell Order
{
"reference_id": "ars-withdrawal-456",
"operation": "sell",
"asset": {
"currency": "DIPE",
"amount": "50000.00"
},
"sell": {
"payment": {
"destination": {
"type": "fiat_instructions",
"value": "abc123def456789012345678901234ab"
}
}
}
}Processing Times
| Country | Method | Typical Processing |
|---|---|---|
| Mexico | CLABE (SPEI) | Minutes to same day |
| Argentina | CBU | 1-2 business hours |
| Argentina | Alias | 1-2 business hours |
Error Handling
| Error Code | Description | Resolution |
|---|---|---|
invalid_instruction | Fiat instruction ID not found | Verify the instruction ID exists |
instruction_inactive | Fiat instruction is not active | Check instruction status |
currency_mismatch | Stablecoin doesn't match instruction currency | Use matching stablecoin (MXNB→MXN, DIPE→ARS) |
insufficient_balance | Not enough stablecoins | Check customer balance |
Related
Updated 4 months ago
