Sending fees
You have the option to charge sending fees, on top of any estimated network fees, for facilitating transfers. Each asset you support can have a different fee structure and you can specify both fixed and variable fees per asset. The fee amount is added on top of the quote that is generated after the ILP rate probe completes.
Set fees using the setFee
GraphQL mutation
setFee mutation
Example
Let’s assume your asset scale is 2. You’ll charge a fixed fee of 100 ($1.00) and a variable fee of 100 (1%).
Example JSON request
Variable | Description |
---|---|
assetId | The asset’s unique ID assigned by Rafiki when the asset was created. |
type | SENDING indicates the sender will incur the fee. Note that the API spec shows RECEIVING as a possible value; however, it’s not been implemented. |
fixed | The amount of the flat, fixed fee to charge. Assuming USD with an asset scale of 2 in the example above, the value of 100 equals $1.00. |
basisPoints | The amount of the variable fee to charge based on the total amount. One basis point is equal to 0.01% of the total amount. 100 basis points equals 1%, and 10000 basis points equals 100%. In the example above, the fee is 1%. |
Example JSON response
Set fees using Rafiki Admin
After an asset is created, select to edit the asset within the Rafiki Admin application, then add a fixed fee and/or basis point for the asset.