Hodle API

Deposit Asset

Create a deposit for DEPIX, LBTC, or Lightning.

POST /api/deposit/asset

Create a deposit that converts BRL to the specified crypto asset and sends it to the provided address.

Request

POST /api/deposit/asset
{
  "value": 5000,
  "address": "lnbc500u1pj...",
  "asset": "LIGHTNING"
}

Parameters

FieldTypeRequiredDescription
valueintegerYesAmount in BRL cents. Must be a positive integer.
addressstringYesDestination address. Liquid address for DEPIX/LBTC, Lightning invoice or LNURL email for LIGHTNING.
assetstringYesAsset type: DEPIX, LBTC, or LIGHTNING.

Address Formats

For LIGHTNING assets, the address can be:

  • A Lightning invoice starting with lnbc, lntb, or lnbcrt
  • An LNURL email in the format user@domain.com

Response

200 OK
{
  "success": true,
  "qrCode": "lnbc500u1pj...",
  "fee": 100,
  "fxRateAtTx": 408000.50,
  "walletCharge": "charge_abc123"
}

Fields

FieldTypeDescription
successbooleanWhether the deposit was created.
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" }
  ]
}