Skip to content

docs(protocol-fees): add protocol fees documentation and navigation - #68

Merged
rodrigopavezi merged 1 commit into
mainfrom
03-02-docs_api-features_add_protocol-fees_page_and_include_it_in_fee_structure_nav_introduce_a_dedicated_protocol_fees_page_using_legacy_fee_documentation_as_the_source_of_truth_and_register_it_in_api_features_navigation._-_add_api-fe
May 12, 2026
Merged

docs(protocol-fees): add protocol fees documentation and navigation#68
rodrigopavezi merged 1 commit into
mainfrom
03-02-docs_api-features_add_protocol-fees_page_and_include_it_in_fee_structure_nav_introduce_a_dedicated_protocol_fees_page_using_legacy_fee_documentation_as_the_source_of_truth_and_register_it_in_api_features_navigation._-_add_api-fe

Conversation

@aimen74

@aimen74aimen74 commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Added comprehensive documentation for protocol fees charged by Request Network API on all payment types.

What changed?

Created a new documentation page api-features/protocol-fees.mdx that explains:

  • Protocol fee structure (5 basis points with ~$25/€25 cap for major stablecoins)
  • Payment types subject to fees (ERC20, native currency, conversion, batch, crosschain, and upcoming subscription payments)
  • Default fee responsibility (payer bears the cost)
  • Method to shift fees to payee by reducing invoice amount
  • Platform fee integration and batching
  • Fee information included in API responses

Added the protocol fees page to the navigation structure under the "Fee Structure" group in docs.json.

How to test?

Review the documentation page to ensure:

  • Fee calculations and examples are accurate
  • Navigation links work properly in the documentation site
  • Content is clear and follows existing documentation standards
  • JSON response examples are properly formatted

Why make this change?

This documentation provides essential transparency about Request Network's fee model, helping developers understand costs associated with API usage and giving them options for fee management in their applications.

This was referenced Mar 2, 2026
@aimen74Graphite App

aimen74 commented Mar 2, 2026

Copy link
Copy Markdown
ContributorAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@aimen74aimen74 self-assigned this Mar 2, 2026
@aimen74aimen74 changed the title docs(api-features): add protocol-fees page and include it in Fee Structure nav Introduce a dedicated Protocol Fees page using legacy fee documentation as the source of truth, and register it in API Features navigation. - add `api-features/protocol-fees.mddocs(protocol-fees): add protocol fees documentation and navigationMar 2, 2026
@aimen74
aimen74 marked this pull request as ready for review March 2, 2026 14:34
@greptile-apps

greptile-appsBot commented Mar 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a new api-features/protocol-fees.mdx documentation page explaining Request Network's protocol fee model and registers it in the navigation under the existing "Fee Structure" group.

  • New docs page: covers the 5 bps fee rate, the ~$25/€25 stablecoin cap, who bears the fee by default, how to shift the fee to the payee by reducing the invoice, platform fee co-existence, and the fee fields returned in API responses.
  • Navigation update: docs.json inserts api-features/protocol-fees between platform-fees and fee-breakdowns in the Fee Structure group — correct placement with no structural issues.

Confidence Score: 5/5

Documentation-only change with no runtime code; safe to merge once the open prose gaps are addressed.

Both changed files are documentation. The navigation update in docs.json is a straightforward addition. The new MDX page is self-contained with no executable code paths — the only open items are content clarity gaps that don't break anything.

api-features/protocol-fees.mdx — the fee-cap coverage for native-currency payments and the missing related-pages navigation both warrant a quick pass before publishing.

Important Files Changed

FilenameOverview
api-features/protocol-fees.mdxNew documentation page covering protocol fees; fee cap coverage for non-stablecoin payment types (ETH, POL) is undocumented, and a related-pages navigation section is missing.
docs.jsonAdds protocol-fees to the Fee Structure navigation group in the correct position between platform-fees and fee-breakdowns; no issues.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Payment initiated] --> B{Payment currency}
B -->|USD/EUR stablecoin| C[Apply 0.05% fee]
B -->|Native currency ETH/POL| D[Apply 0.05% fee]
B -->|Conversion / Batch / Crosschain| E[Apply 0.05% fee]
C --> F{Fee > $25 cap?}
F -->|Yes| G[Cap fee at ~$25/€25]
F -->|No| H[Use calculated fee]
D --> I[Cap behavior undocumented]
E --> J[Cap behavior undocumented]
G --> K{Who bears the fee?}
H --> K
I --> K
J --> K
K -->|Default: payer| L[Fee added on top of invoice]
K -->|Shifted: payee| M[Reduce invoice by ~0.05% before request creation]
L --> N[Payer pays invoice + fee
Payee receives invoice amount]
M --> O[Payer pays ~original amount
Payee receives reduced invoice amount]
Loading

Reviews (2): Last reviewed commit: "docs(api-features): add protocol-fees pa..." | Re-trigger Greptile

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment threadapi-features/protocol-fees.mdx
Comment threadapi-features/protocol-fees.mdx
Comment threadapi-features/protocol-fees.mdx
rodrigopavezi added a commit that referenced this pull request May 11, 2026
Bundles two passes of Greptile feedback:
(A) PR #96 follow-up — the fixes PR itself attracted two new comments:
- use-cases/programmatic-payment-links.mdx: cURL language tag bash → curl
- RN_API_KEY → RN_CLIENT_ID and X-Api-Key → x-client-id renamed across
api-setup/integration-tutorial.mdx, api-setup/getting-started.mdx,
api-features/create-requests.mdx for stack-wide consistency. Zero
RN_API_KEY / X-Api-Key references remain.
(B) Older PRs (51-87) — 23 still-applicable comments out of 51 total.
The other 28 are stale (resolved by the revamp rewriting or removing
the relevant sections/files); those will be resolved on GitHub with a
note explaining staleness.
PR #53 — getting-started.mdx
- Added Express setup (express + app.use(express.json())) before the
webhook handler example so the snippet is runnable.
PR #54 — integration-tutorial.mdx
- Added missing `import { eq } from 'drizzle-orm';`.
- Fixed spelling "succesfully" → "successfully".
PR #55 — create-requests.mdx
- v2 pay endpoint takes requestId, not paymentReference (mermaid +
code sample updated to `${requestId}/pay`).
PR #56 + #87 — crosschain-payments.mdx
- Boundary wording: "under \$1" → "of \$1 or less" to align with the
"greater than 1 USD" half of the sentence.
- viem snippet now imports createPublicClient + http and instantiates
publicClient so `publicClient.waitForTransactionReceipt(...)` works.
PR #57 — batch-payments.mdx
- Code samples now use x-client-id (consistent with rest of docs),
dropped legacy x-platform-id, added `if (!response.ok)` error handling
on both examples.
PR #59 — crypto-to-fiat-payments.mdx
- "I**mportant:" → "**Important:"
- mermaid: {payerId} → {clientUserId} (twice).
- Endpoint paths: /payer → /v2/payer for consistency.
- mermaid: declared "Payee Bank" as a participant (was used but never
declared, breaking the diagram).
PR #66 — query-payments.mdx
- Frontmatter description: /payments → /v2/payments.
PR #67 — platform-fees.mdx
- Clarified query- vs body-param scope: GET /v2/request/{id}/pay uses
query params; POST /v2/payouts and /payouts/batch use body params.
PR #68 — protocol-fees.mdx
- Grammar: "protocol fees applies" → "protocol fee applies".
- Typo: "simple reduce" → "simply reduce".
- Math: payee receives 999.50 USDC (not 999.95). Added intermediate
invoice/fee lines for transparency.
PR #77 — faq.mdx
- On-ramp question now explicitly answered: "Fiat-to-crypto (on-ramp)
payments are not currently supported by the API."
PR #86 — payouts.mdx
- "ERC-712" → "EIP-712" (correct EIP designation).
PR #86 — api-reference/secure-payments.mdx
- expiresAt example: 15 minutes → 7 days, matching the documented
default expiry.
PR #87 — payouts.mdx
- Added "500" row to error-handling table.
mintlify broken-links: zero.
@rodrigopaveziGraphite App

rodrigopavezi commented May 12, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • May 12, 4:02 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 12, 4:36 PM UTC: Graphite rebased this pull request as part of a merge.
  • May 12, 4:37 PM UTC: @rodrigopavezi merged this pull request with Graphite.

@rodrigopavezi
rodrigopavezi changed the base branch from 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_ to graphite-base/68May 12, 2026 16:34
@rodrigopavezi
rodrigopavezi changed the base branch from graphite-base/68 to mainMay 12, 2026 16:35
…cture nav
Introduce a dedicated Protocol Fees page using legacy fee documentation as the source of truth, and register it in API Features navigation.
- add `api-features/protocol-fees.mdx` with legacy-aligned protocol fee content
- preserve legacy fee structure details (rate, cap, covered payment types)
- keep legacy “Who Pays the Fee?” and “Shifting the Fee to the Payee” explanations and examples
- include protocol + platform fee coexistence section and metadata response example
- update `docs.json` to add `api-features/protocol-fees` under Fee Structure
This separates protocol-fee policy from platform-fee implementation and improves Fee Structure discoverability.
@rodrigopavezi
rodrigopaveziforce-pushed the 03-02-docs_api-features_add_protocol-fees_page_and_include_it_in_fee_structure_nav_introduce_a_dedicated_protocol_fees_page_using_legacy_fee_documentation_as_the_source_of_truth_and_register_it_in_api_features_navigation._-_add_api-fe branch from c0b0763 to 047f11fCompareMay 12, 2026 16:36
@rodrigopavezi
rodrigopavezi merged commit bfc8e15 into mainMay 12, 2026
@rodrigopavezi
rodrigopavezi deleted the 03-02-docs_api-features_add_protocol-fees_page_and_include_it_in_fee_structure_nav_introduce_a_dedicated_protocol_fees_page_using_legacy_fee_documentation_as_the_source_of_truth_and_register_it_in_api_features_navigation._-_add_api-fe branch May 12, 2026 16:37
rodrigopavezi added a commit that referenced this pull request May 12, 2026
Bundles two passes of Greptile feedback:
(A) PR #96 follow-up — the fixes PR itself attracted two new comments:
- use-cases/programmatic-payment-links.mdx: cURL language tag bash → curl
- RN_API_KEY → RN_CLIENT_ID and X-Api-Key → x-client-id renamed across
api-setup/integration-tutorial.mdx, api-setup/getting-started.mdx,
api-features/create-requests.mdx for stack-wide consistency. Zero
RN_API_KEY / X-Api-Key references remain.
(B) Older PRs (51-87) — 23 still-applicable comments out of 51 total.
The other 28 are stale (resolved by the revamp rewriting or removing
the relevant sections/files); those will be resolved on GitHub with a
note explaining staleness.
PR #53 — getting-started.mdx
- Added Express setup (express + app.use(express.json())) before the
webhook handler example so the snippet is runnable.
PR #54 — integration-tutorial.mdx
- Added missing `import { eq } from 'drizzle-orm';`.
- Fixed spelling "succesfully" → "successfully".
PR #55 — create-requests.mdx
- v2 pay endpoint takes requestId, not paymentReference (mermaid +
code sample updated to `${requestId}/pay`).
PR #56 + #87 — crosschain-payments.mdx
- Boundary wording: "under \$1" → "of \$1 or less" to align with the
"greater than 1 USD" half of the sentence.
- viem snippet now imports createPublicClient + http and instantiates
publicClient so `publicClient.waitForTransactionReceipt(...)` works.
PR #57 — batch-payments.mdx
- Code samples now use x-client-id (consistent with rest of docs),
dropped legacy x-platform-id, added `if (!response.ok)` error handling
on both examples.
PR #59 — crypto-to-fiat-payments.mdx
- "I**mportant:" → "**Important:"
- mermaid: {payerId} → {clientUserId} (twice).
- Endpoint paths: /payer → /v2/payer for consistency.
- mermaid: declared "Payee Bank" as a participant (was used but never
declared, breaking the diagram).
PR #66 — query-payments.mdx
- Frontmatter description: /payments → /v2/payments.
PR #67 — platform-fees.mdx
- Clarified query- vs body-param scope: GET /v2/request/{id}/pay uses
query params; POST /v2/payouts and /payouts/batch use body params.
PR #68 — protocol-fees.mdx
- Grammar: "protocol fees applies" → "protocol fee applies".
- Typo: "simple reduce" → "simply reduce".
- Math: payee receives 999.50 USDC (not 999.95). Added intermediate
invoice/fee lines for transparency.
PR #77 — faq.mdx
- On-ramp question now explicitly answered: "Fiat-to-crypto (on-ramp)
payments are not currently supported by the API."
PR #86 — payouts.mdx
- "ERC-712" → "EIP-712" (correct EIP designation).
PR #86 — api-reference/secure-payments.mdx
- expiresAt example: 15 minutes → 7 days, matching the documented
default expiry.
PR #87 — payouts.mdx
- Added "500" row to error-handling table.
mintlify broken-links: zero.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation - Merge Mintlify docs and replace legacy docs

2 participants

@aimen74@rodrigopavezi