v1

latestOpenAPI 3.0.02026-07-26103425558.9 KB
Settlement Rules

Create a settlement rule

Create a new settlement rule for virtual accounts. Settlement rules define how fees are calculated and distributed when processing an onramp transaction.

post/v2/virtual-accounts/settlement-rules

Request body

requestIdstring required

Unique identifier for the request (recommend using uuid v4)

chain'BASE' | 'POLYGON' | 'ETHEREUM' | 'SOLANA' | 'TRON' required

Blockchain network for the settlement rule, this should be the same as the blockchain network of the virtual account

includeHIFIFeeboolean required

Whether to include HiFi's fee in addition to custom rules, please contact HiFi support if you want to include HiFi's fee

Example request

{
  "requestId": "{{$guid}}",
  "chain": "BASE",
  "rules": [
    {
      "type": "PERCENTAGE",
      "calculationModel": "FIXED",
      "value": 0.001,
      "tiers": [
        {
          "min": "1000",
          "max": "2000",
          "value": 0.0005
        }
      ],
      "walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b"
    }
  ]
}

Response

Success

idstring required

Unique identifier for the settlement rule

chain'BASE' | 'POLYGON' | 'ETHEREUM' | 'SOLANA' | 'TRON' required

Blockchain network for the settlement rule

includeHIFIFeeboolean required

Whether to include HiFi's fee in addition to custom rules, please contact HiFi support if you want to include HiFi's fee

Example response

{
  "id": "15c786fb-de7a-520c-a4b3-f312d4a122d2",
  "chain": "BASE",
  "rules": [
    {
      "type": "PERCENTAGE",
      "calculationModel": "FIXED",
      "value": 0.001,
      "tiers": [
        {
          "min": "1000",
          "max": "2000",
          "value": 0.0005
        }
      ],
      "walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b"
    }
  ]
}