curl --request POST \
--url https://production.hifibridge.com/v2/virtual-accounts/settlement-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "{{$guid}}",
"chain": "BASE",
"includeHIFIFee": false,
"rules": [
{
"type": "PERCENTAGE",
"calculationModel": "FIXED",
"walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b",
"value": 0.001,
"tiers": [
{
"min": "1000",
"max": "2000",
"value": 0.0005
}
]
}
]
}
'{
"id": "15c786fb-de7a-520c-a4b3-f312d4a122d2",
"chain": "BASE",
"includeHIFIFee": false,
"rules": [
{
"type": "PERCENTAGE",
"calculationModel": "FIXED",
"value": 0.001,
"tiers": null,
"walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b"
},
{
"type": "FIXED",
"calculationModel": "FIXED",
"value": 0.5,
"tiers": null,
"walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b"
},
{
"type": "PERCENTAGE",
"calculationModel": "TIERED",
"value": null,
"tiers": [
{
"max": "1000",
"min": "",
"value": 0.0007
},
{
"max": "2000",
"min": "1000",
"value": 0.0005
},
{
"max": "",
"min": "2000",
"value": 0.0002
}
],
"walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b"
}
]
}Create a new settlement rule for virtual accounts. Settlement rules define how fees are calculated and distributed when processing an onramp transaction.
curl --request POST \
--url https://production.hifibridge.com/v2/virtual-accounts/settlement-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "{{$guid}}",
"chain": "BASE",
"includeHIFIFee": false,
"rules": [
{
"type": "PERCENTAGE",
"calculationModel": "FIXED",
"walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b",
"value": 0.001,
"tiers": [
{
"min": "1000",
"max": "2000",
"value": 0.0005
}
]
}
]
}
'{
"id": "15c786fb-de7a-520c-a4b3-f312d4a122d2",
"chain": "BASE",
"includeHIFIFee": false,
"rules": [
{
"type": "PERCENTAGE",
"calculationModel": "FIXED",
"value": 0.001,
"tiers": null,
"walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b"
},
{
"type": "FIXED",
"calculationModel": "FIXED",
"value": 0.5,
"tiers": null,
"walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b"
},
{
"type": "PERCENTAGE",
"calculationModel": "TIERED",
"value": null,
"tiers": [
{
"max": "1000",
"min": "",
"value": 0.0007
},
{
"max": "2000",
"min": "1000",
"value": 0.0005
},
{
"max": "",
"min": "2000",
"value": 0.0002
}
],
"walletAddress": "0x15FB50680fEB2f726413416665c25f9B397b047b"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier for the request (recommend using uuid v4)
"{{$guid}}"
Blockchain network for the settlement rule, this should be the same as the blockchain network of the virtual account
BASE, POLYGON, ETHEREUM, SOLANA "BASE"
Whether to include HiFi's fee in addition to custom rules, please contact HiFi support if you want to include HiFi's fee
false
Array of settlement rules
1Show child attributes
Type of fee calculation
PERCENTAGE, FIXED "PERCENTAGE"
Model for calculating the fee
FIXED, TIERED "FIXED"
Wallet address to receive the fee
"0x15FB50680fEB2f726413416665c25f9B397b047b"
Fixed fee value (omit for tiered calculation model)
0.001
Tiered fee structure (omit for fixed calculation model)
Show child attributes
Success
Unique identifier for the settlement rule
"15c786fb-de7a-520c-a4b3-f312d4a122d2"
Blockchain network for the settlement rule
BASE, POLYGON, ETHEREUM, SOLANA "BASE"
Whether to include HiFi's fee in addition to custom rules, please contact HiFi support if you want to include HiFi's fee
false
Array of settlement rules
Show child attributes
Type of fee calculation
PERCENTAGE, FIXED "PERCENTAGE"
Model for calculating the fee
FIXED, TIERED "FIXED"
Wallet address to receive the fee
"0x15FB50680fEB2f726413416665c25f9B397b047b"
Fixed fee value (omit for tiered calculation model)
0.001
Tiered fee structure (omit for fixed calculation model)
Show child attributes