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

StablecoinFiat CurrencyCountryWithdrawal Rails
MXNBMXNMexicoCLABE
DIPEARSArgentinaCBU, Alias

How It Works

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   Stablecoin    │────▶│   Sell Order    │────▶│  Customer Bank  │
│    (MXNB/DIPE)  │     │   + Fiat Instr  │     │    Account      │
└─────────────────┘     └─────────────────┘     └─────────────────┘
  1. Customer holds stablecoins (MXNB or DIPE) in their Lirium account
  2. You create a sell order with a fiat_instructions destination
  3. Lirium converts the stablecoins to fiat at market rate
  4. Fiat is transferred to the customer's registered bank account

Prerequisites

Before creating a sell order with fiat instructions:

  1. Customer must be verified - Complete KYC verification
  2. 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}/confirm

Request Fields

FieldTypeRequiredDescription
reference_idstringNoYour unique reference for idempotency
operationstringYesMust be sell
asset.currencystringYesStablecoin to sell (MXNB or DIPE)
asset.amountstringYesAmount of stablecoins to sell
sell.payment.destination.typestringYesMust be fiat_instructions
sell.payment.destination.valuestringYesThe 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

CountryMethodTypical Processing
MexicoCLABE (SPEI)Minutes to same day
ArgentinaCBU1-2 business hours
ArgentinaAlias1-2 business hours

Error Handling

Error CodeDescriptionResolution
invalid_instructionFiat instruction ID not foundVerify the instruction ID exists
instruction_inactiveFiat instruction is not activeCheck instruction status
currency_mismatchStablecoin doesn't match instruction currencyUse matching stablecoin (MXNB→MXN, DIPE→ARS)
insufficient_balanceNot enough stablecoinsCheck customer balance

Related