Developer Fees

Introduction

Inflow Connect allows developers to collect custom, per-transaction fees from their users. These developer fees are automatically withheld from the customer's transaction amount and tracked for settlement.

Developer fees are automatically withheld from transactions and tracked in your account ledger. Contact Inflow Support to configure fee collection and settlement.

Note: Fees are optional. Leaving the developerFee field blank is treated as a fee of 0.

Supported Transaction Types

You can apply developer fees to eligible payments:

  • Fiat-to-Stablecoin (Payments/Onramp)
  • Stablecoin-to-Fiat (Payouts)
  • Stablecoin-to-Stablecoin (Payouts)

Fee Structure

Fees are defined in the developerFee object and support:

Fixed Amount

A specific amount in cents (e.g., $1 = 100 cents)

Percentage Rate

A rate per 1000 units (e.g., 25 = 2.5%)

Combined Fees (Hybrid)

You can specify both fixed and percentage fees for a hybrid model


Payments (Fiat-to-Stablecoin)

Request Example

curl --location --request POST 'https://api.inflowpay.com/v1/onramp/{customerId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data-raw '{
  "currency": "EUR",
  "amountInCents": 10000,
  "destinationAccountId": "acc_1234567890abcdef",
  "developerFee": {
    "ratePer1000": 25,
    "amountInCents": 100
  },
  "successUrl": "https://yourapp.com/success",
  "cancelUrl": "https://yourapp.com/cancel"
}'

Payouts (Stablecoin-to-Fiat/Stablecoin)

Payouts support developer fees in two main scenarios:

Stablecoin-to-Fiat Payouts

Use case: Customer cashes out crypto to their bank account

  • Source: External wallet (customer's MetaMask, etc.)
  • Destination: External bank account
  • Your fee opportunity: Commission on crypto → fiat conversion

Stablecoin-to-Stablecoin Payouts

Use case: Cross-chain transfers or wallet-to-wallet movements

  • Source: External wallet or managed wallet
  • Destination: External wallet account
  • Examples:
    • USDC Ethereum → USDC Polygon (cross-chain)
    • Customer managed wallet → Customer's external wallet

Request Examples

External Wallet Source:

curl --location --request POST 'https://api.inflowpay.com/v1/payout/{customerId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data-raw '{
  "source": {
    "fromExternalWalletDetails": {
      "fromWalletAddress": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
      "fromChain": "ethereum"
    },
    "amountInCents": 5000000
  },
  "destination": {
    "destinationAccountId": "acc_b2c3d4e5f6g7h8i9"
  },
  "developerFee": {
    "ratePer1000": 15,
    "amountInCents": 50
  }
}'

Managed Wallet Source:

curl --location --request POST 'https://api.inflowpay.com/v1/payout/{customerId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data-raw '{
  "source": {
    "fromManagedWalletDetails": {
      "accountId": "acc_a1b2c3d4e5f6g7h8"
    },
    "amountInCents": 5000000
  },
  "destination": {
    "destinationAccountId": "acc_b2c3d4e5f6g7h8i9"
  },
  "developerFee": {
    "ratePer1000": 15,
    "amountInCents": 50
  }
}'

Note: The destinationAccountId determines the payout type - bank account for fiat conversion, or external wallet account for stablecoin transfers.

Developer Fee Object

FieldTypeRequiredDescriptionExample
ratePer1000numberNoPercentage fee (1-1000)25 = 2.5%
amountInCentsnumberNoFixed fee in cents100 = $1.00

Validations

  • Rate Range: ratePer1000 must be between 1 and 1000 (0.1% to 100%)
  • Fixed Amount: amountInCents must be a number (validation occurs at business logic level)
  • Minimum Transaction: After fee deduction, sufficient amount must remain for transaction minimums
  • Currency: Fixed fees are denominated in the source currency
  • Business Rule: Developer fee cannot exceed 10% of transaction amount

Response Format

Onramp (Payment) Response

{
  "id": "onramp_x1y2z3a4b5c6d7e8",
  "customerId": "cust_a1b2c3d4e5f6g7h8",
  "status": "PENDING",
  "source": {
    "amountInCents": 10000,
    "currency": "EUR"
  },
  "destination": {
    "accountId": "acc_1234567890abcdef",
    "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "chain": "POLYGON",
    "currency": "EUR"
  },
  "developerFee": {
    "ratePer1000": 25,
    "amountInCents": 100
  },
  "deposit": null,
  "receipt": null,
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-01T00:00:00.000Z",
  "expiresAt": "2024-01-02T00:00:00.000Z"
}

Payout Response

{
  "id": "payout_x1y2z3a4b5c6d7e8",
  "customerId": "cust_a1b2c3d4e5f6g7h8",
  "status": "AWAITING_FUNDS",
  "source": {
    "amountInWei": "5000000000000000000000",
    "currency": "USDC",
    "currencyAddress": "0xa0b86a33e6ba2e0dbfa0b8f8b3b0f8b9b0e8c0d1",
    "currencyChain": "POLYGON",
    "fromAddress": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
    "accountId": null
  },
  "destination": {
    "accountId": "acc_b2c3d4e5f6g7h8i9",
    "currency": "USD"
  },
  "developerFee": {
    "ratePer1000": 15,
    "amountInCents": 50
  },
  "protocolFeeAmountInCents": 50,
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-01T00:00:00.000Z"
}

Important Notes

Fee Settlement

  • Fees are automatically calculated and withheld during transaction processing
  • Fee tracking and settlement options available - contact support for configuration
  • Detailed fee reporting available via API and developer dashboard

Precision

  • All amounts are specified in cents for precision
  • Rate calculations are performed with high precision and rounded appropriately
  • Final amounts maintain currency-appropriate decimal places

Start earning from your first transaction! 💰