-
Notifications
You must be signed in to change notification settings - Fork 1
docs(protocol-fees): add protocol fees documentation and navigation #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 03-02-docs_api-features_rewrite_platform-fees_as_implementation-focused_guide_refactor_api-features_platform-fees.mdx_to_document_platform-fee_configuration_clearly_and_accurately_for_v2_api_consumers._-_remove_ai_placeholder_framing_
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,81 @@ | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| title: "Protocol Fees" | ||||||||||||||||||||||||||
| description: "Protocol fee model applied by Request Network API payments" | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Protocol Fee | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Request Network charges a protocol fee on all payments processed through the API. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Fee Structure | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| | Fee Type | Rate | Cap | | ||||||||||||||||||||||||||
| | ------------ | ---------------------- | ------------------------------------------------- | | ||||||||||||||||||||||||||
| | Protocol Fee | 5 basis points (0.05%) | ~$25/€25 for main USD and EUR backed stablecoins | | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| The protocol fees applies to all the payment types | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - ERC20 token payments | ||||||||||||||||||||||||||
| - Native currency payments (ETH, POL, etc.) | ||||||||||||||||||||||||||
| - Conversion payments | ||||||||||||||||||||||||||
| - Batch payments | ||||||||||||||||||||||||||
| - Crosschain payments | ||||||||||||||||||||||||||
| - Subscription (coming soon) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Who Pays the Fee? | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| By default, the payer bears the protocol fee. The fee is added on top of the invoice amount. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Example | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Invoice amount: 1000 USDC | ||||||||||||||||||||||||||
| - Protocol fee: 1000 x 0.05% = 0.50 USDC | ||||||||||||||||||||||||||
| - Total paid by payer: 1000.50 USDC + gas fee | ||||||||||||||||||||||||||
| - Amount received by payee: 1000 USDC | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| For larger payments with stablecoins, the fee is capped: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Payment of 100,000 USDC -> Fee capped at 25 USDC (not 50 USDC) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Shifting the Fee to the Payee | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| If you want the payee to bear the protocol fee instead of the payer, simple reduce the invoice amount by 5bps (0.05%) before creating the request. | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "simple reduce" should be "simply reduce"
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Example: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Original intended payment: 1000 USDC | ||||||||||||||||||||||||||
| - Reduce by 0.05%: 1000 - (1000 x 0.05%) = 999.50 USDC | ||||||||||||||||||||||||||
| - Total paid by the payer: 1000 USDC + gas fee | ||||||||||||||||||||||||||
| - Amount received by payee: 999.95 USDC | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This way, the payer pays approximately the original amount while the payee effectively absorbs the fee. | ||||||||||||||||||||||||||
|
Comment on lines
+46
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. incorrect calculation - if invoice is reduced to 999.50 USDC, the payee receives 999.50 USDC, not 999.95 USDC The math should be:
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Platform Fees | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| You can add your own platform fee on top of the protocol fee. Both fees are handled automatically when you configure a platform fee in your request. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| To set up platform fees, include the following parameters in your payment request: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - `feePercentage`: Your platform fee percentage (e.g., "2.5"). | ||||||||||||||||||||||||||
| - `feeAddress`: The wallet address to receive your platform fees. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| When both protocol and platform fees are configured, the API automatically batches them into a single transaction for the payer. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Fee Information In Responses | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Every API response includes the fee details in the metadata: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```json | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "metadata": { | ||||||||||||||||||||||||||
| "protocolFee": { | ||||||||||||||||||||||||||
| "percentage": "0.05", | ||||||||||||||||||||||||||
| "address": "0x..." | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "platformFee": { | ||||||||||||||||||||||||||
| "percentage": "2.5", | ||||||||||||||||||||||||||
| "address": "0x..." | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grammar: "fees applies" is incorrect - use "fee applies" (singular) or "fees apply" (plural)