Deposit Asset

Create a deposit via Lightning, USDT, USDC, USDCE, BRLA, BRS, DEPIX, or LBTC.

POST /api/deposit/asset

Create a deposit that converts BRL to the specified crypto asset. For BRS, the asset is minted to the user's own Hodle Solana wallet; the other assets are sent to the provided address.

Request

curl --request POST \
  --url https://api.hodle.com.br/api/deposit/asset \
  --header "Authorization: Bearer $API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "value": 5000,
    "address": "lnbc500u1pj...",
    "asset": "LIGHTNING",
    "externalId": "my-order-123"
  }'
const res = await fetch('https://api.hodle.com.br/api/deposit/asset', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HODLE_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    value: 5000,
    address: 'lnbc500u1pj...',
    asset: 'LIGHTNING',
    externalId: 'my-order-123',
  }),
})
const data = await res.json()
import os, requests

res = requests.post(
    "https://api.hodle.com.br/api/deposit/asset",
    headers={
        "Authorization": f"Bearer {os.environ['HODLE_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "value": 5000,
        "address": "lnbc500u1pj...",
        "asset": "LIGHTNING",
        "externalId": "my-order-123",
    },
)
data = res.json()

Body example

POST /api/deposit/asset
{
  "value": 5000,
  "address": "lnbc500u1pj...",
  "asset": "LIGHTNING",
  "externalId": "my-order-123"
}

Parameters

FieldTypeRequiredDescription
valueintegerYesAmount in BRL cents. Must be a positive integer.
addressstringCond.Destination address. Required for LIGHTNING, USDT, USDC, USDCE, BRLA, DEPIX, and LBTC; omit for BRS, which is minted to the account's own Hodle Solana wallet.
assetstringYesAsset type: LIGHTNING, USDT, USDC, USDCE, BRLA, BRS, DEPIX, or LBTC.
networkstringCond.On-chain network for the asset. Required for USDT, USDC, USDCE, and BRLA; BRS only supports solana and defaults to it when omitted. Not needed for LIGHTNING, DEPIX, or LBTC. See Assets & Networks.
externalIdstringNoYour own ID for reconciliation. Must be unique per deposit (idempotency key). A UUID is generated if not provided.
subAccountIdstringNoCreate the deposit on behalf of this subaccount (scoped to your API key). Defaults to the main account.
taxIdstringNoCPF/CNPJ of the payer, when the payer is not the account holder. Digits only or masked. Rejected with 403 when third-party operations are not enabled for the account. On its own it does not let a third party pay the charge — see Who can pay the PIX.

Who can pay the PIX

The PIX charge returned by this endpoint can only be paid by the CPF/CNPJ that owns the account the deposit belongs to (the subaccount holder when subAccountId is used). A PIX sent by anyone else is refused by the bank at payment time and no crypto is delivered.

To accept a PIX paid by a third party — for example when you charge your own end customer on your account — ask support to enable DEPOSIT_THIRD_PARTY on the account.

Assets & Networks

AssetNetworksAddress format
LIGHTNINGlightningLightning invoice or LNURL email
USDTpolygon, arbitrumEVM address (0x...)
USDCpolygon, base, gnosisEVM address (0x...)
USDCEgnosisEVM address (0x...)
BRLApolygon, baseEVM address (0x...)
DEPIXliquidLiquid address
LBTCliquidLiquid address
BRSsolanaOwn Hodle Solana wallet

Available networks per asset can depend on your account configuration and KYC level. For the full matrix across every endpoint see Assets & Networks.

BRS requires the NORA_RAIL flag and is always minted to the user's own Hodle Solana wallet. It does not accept a third-party destination. See BRS.

Address Formats

For LIGHTNING assets, the address can be:

  • A Lightning invoice starting with lnbc, lntb, or lnbcrt
  • An LNURL email in the format [email protected]

For USDT, USDC, USDCE, and BRLA assets, the address is an EVM address (0x...) on the selected network.

For DEPIX and LBTC assets, the address is a Liquid address.

For BRS, omit address; the asset is minted to the account's own Hodle Solana wallet.

Response

200 OK
{
  "success": true,
  "externalId": "my-order-123",
  "qrCode": "lnbc500u1pj...",
  "fee": 100,
  "fxRateAtTx": 408000.50,
  "walletCharge": "charge_abc123"
}

Fields

FieldTypeDescription
successbooleanWhether the deposit was created.
externalIdstringThe external ID for reconciliation (your value or auto-generated UUID).
qrCodestring | nullQR code for the deposit.
feenumberFee charged for the deposit.
fxRateAtTxnumberBTC/BRL exchange rate at the time of transaction.
walletChargestring | nullWallet charge identifier.

Errors

400 Bad Request
{
  "success": false,
  "error": "Validation failed",
  "details": [
    { "field": "value", "message": "Expected number, received string" }
  ]
}
409 Conflict
{
  "success": false,
  "error": "A deposit with this externalId already exists"
}