Commission fee

Harbor provides support for setting transaction commissions to ensure revenue generation on every Transfer.


Columns

FieldTypeDescription
percentageStringThe commission rate as a percentage (e.g., 1.05 = 1.05%).
amountStringThe fixed commission fee (e.g., 1.00 for $1).
commission_fee = (total * percentage) + amount

Example Calculation:

  • Commission: Specifies the fee structure for the transfer, supporting both percentage-based (1.05%) and fixed (1.00 USD) fees.
  • Source: Defines the asset being transferred (USD) and the amount (100.00).
  • Destination: Specifies the target asset (USDC), blockchain network (Ethereum), and recipient address (0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db).
100 * 1.05 + 1.00 = 2.05

Example Code:

curl --location 'https://harbor-sandbox.owlpay.com/applications/v1/transfer' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-API-KEY: {{API_KEY}}' \
--header 'Idempotency-Key: {{Idempotency-Key}}' \
--data-raw '{
    "commission": {
        "percentage": "1.05",
        "amount": "1.00",
    },
    "source": {
        "asset": "USD",
        "amount": "100.00",
    },
    "destination": {
        "asset": "USDC",
        "chain": "ethereum",
        "address": "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db"
    },
    "application_transfer_uuid": "{{YOUR_APPLICATION_TRANSFER_UUID}}"
}'


{
    "source": {
        "asset": "USD",
        "amount": "100.00",
    },
    "destination": {
        "asset": "USDC",
        "payment_rail": "ethereum",
        "address": "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db",
        "amount": "98.00",
    },
    ...
    "commission": {
        "rate": "1.05",
        "price": "1.00",
    },
    "receipt": {
      "initial_amount": "100.00",
      "commission_fee": "2.05",
      "harbor_fee": "0.5",
      "final_amount": "97.00",
      ...
    },
    ...
}