Overview
Platform fees enable service providers to collect their own fees from payment requests. The Request Network API supports percentage-based fees that are automatically calculated and collected during payment.How It Works
Fee Collection:- Automatic: Fees calculated and collected during payment
- Percentage-Based: Platform defines
feePercentageat payment time - Smart Contract Level: API converts percentage to fixed
feeAmountfor smart contract - Separate Recipient: Fees sent to specified
feeAddress
Fee Configuration
Platform fees are configured when initiating a payment via:POST /v2/request/{requestId}/pay- For request-based paymentsPOST /v2/payouts- For direct payouts
Fee Parameters
Fee percentage to apply at payment time (e.g., ‘2.5’ for 2.5%)
Ethereum address to receive the platform fee
Implementation
Request-Based Payment with Fee
Direct Payout with Fee
Fee Calculation
The API automatically handles the conversion from percentage to fixed amount:- Platform specifies:
feePercentage: '2.5'(2.5%) - API calculates: For 2.50 fee
- Smart contract receives:
feeAmount: '2500000'(in token decimals) - Total transaction: 100, platform gets $2.50)
Use Cases
SaaS Platforms
Collect commission on customer payments processed through your platform
Payment Processors
Add processing fees to cover operational costs and generate revenue
Marketplaces
Collect marketplace fees from vendor transactions
Service Platforms
Monetize payment infrastructure for your users
Fee Transparency
Fee amounts are included in payment responses and can be queried for complete transparency:- Payment calldata includes calculated fee amount
- Payment status includes fee breakdown
- Fee amounts shown in both crypto and USD equivalents (where applicable)
Important Notes
API vs Smart Contract Level
- API Level: You specify
feePercentage(e.g., “2.5”) andfeeAddress - Smart Contract Level: API calculates and sends fixed
feeAmountin token units - Your integration: Only needs to handle percentage-based fees via API