docs(payouts): document platform-assessed fees - #830
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Live preview of the new page: https://ramps-08-13-grid-platform-assessed-fees-docs.mintlify.site/payouts-and-b2b/payment-flow/assessing-fees CI is green and the hosted build renders all sections correctly. |
a586cab to
dc74741
Compare
|
Pushed revision 2 with the fee-mechanics corrections — thanks, these were all substantive and two of them were things the page got wrong:
An automated review pass also caught a fourth error of the same kind: I'd written that the fee is "deducted from what the recipient gets," which only holds for sending-locked quotes. Now split by Re-rendered and verified after each change. Live preview: https://ramps-08-13-grid-platform-assessed-fees-docs.mintlify.site/payouts-and-b2b/payment-flow/assessing-fees |
Greptile SummaryThe PR adds a public guide explaining how platforms configure, assess, reconcile, and test platform fees, and adds it to the Payouts & B2B navigation.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| mintlify/payouts-and-b2b/payment-flow/assessing-fees.mdx | Adds the platform-fee guide and resolves the previously reported inconsistency by aligning the quote’s sending amount and fee fields with the worked example. |
| mintlify/docs.json | Adds the new guide to the intended Payouts & B2B navigation group. |
Reviews (2): Last reviewed commit: "docs(payouts): fix quote example, note R..." | Re-trigger Greptile
|
📌 Bolt Status 2026-08-14 21:52:05 UTC — ⚡ Agent |
|
⚡ Revision log — updated in place, latest first. Revision 1
|
dc74741 to
dad1dfd
Compare
|
@greptile review |

Summary
Approach
Written against the shipped API contract in this repo —
FeeConfig,FeeType,PlatformFeeOverride,Quote.platformFeesIncluded,OutgoingTransaction.platformFees, andPlatformConfigUpdateRequest.feeConfigs— and against the current server behavior, so the page documents what the API does today rather than what was proposed. The worked example (30 bps + $0.50 on a $10.00 payment = 53 cents) is taken from an existing end-to-end test of this path.Two points where the page deliberately documents current behavior, both raised with the feature owner for confirmation before publishing:
PlatformFeeOverridereplaces any configured platform fee with no ceiling relative to it, and an override is accepted even when no standing config exists. The page describes it that way.platformFeeson the transaction object, since no dedicated fee-listing endpoint exists in the spec.The page also notes that platform fees are not yet supported on every payment flow, and that an affected quote is rejected at creation rather than failing at settlement, without enumerating flows — that list is still changing.
Revision 2 — review feedback
Four corrections, three from reviewer feedback on the fee mechanics and one caught by an automated review pass:
COMPLETED. It is credited as one step of settlement and can land earlier, so a refund after that point reverses the credit — pulling the fee back out of the platform account and returning it to the customer. Now documented, with the guidance to treat a fee as earned only atCOMPLETED, and the accrued-balance and webhook sections reworded to match.total_variable_fee = (sending_amount - platform_fixed_fee - grid_fixed_fee) x (platform_variable_fee + grid_variable_fee). The worked example now shows Grid's fixed fee in the subtraction.lockedCurrencySide: lock sending and the recipient receives less; lock receiving and the sender pays more.Revision 3 — Greptile review + remaining feedback
Fixed — inconsistent quote example (Greptile P1, valid). The quote response showed
totalSendingAmount: 10000while carrying the 53-cent fee computed for a 1,000-cent send,so the figures didn't reproduce. The block is now internally consistent at the 1,000-cent
send (
totalReceivingAmount: 863,feesIncluded: 63), with a lead-in tying it back to theworked calculation.
Fixed — two points from the earlier review that hadn't landed yet. A
RAILfee typeand stablecoin sending currencies (USDC) are now flagged as planned rather than implying
today's single fee type and USD-only limit are permanent; and the page now states that a fee
can only be charged when the platform holds an internal account in the transaction's sending
currency.
Fixed — two consistency issues from an automated review pass. The component table said
the variable fee applies to the sending amount, contradicting the formula section (it
applies after fixed fees); and a capability-discovery suggestion pointed at
GET /config,which returns active configs rather than supported types — now points at the changelog.
Declined — relative internal links (Greptile P2). Root-relative paths are this repo's
actual convention: 94 root-relative internal links across
mintlify/**/*.mdxversus 2 using../, including the neighbouring pages in this same nav group.mintlify/CLAUDE.mdisself-contradictory on this point, and its enforceable "Do not" line prohibits absolute URLs,
which
/payouts-and-b2b/...is not. Converting only this page would make it the outlier;reasoning is in the review thread.
Not a defect — receiving-amount arithmetic. An automated pass flagged
totalReceivingAmount: 863as wrong, modelling it as(1000 - 63) x 0.92 = 862. The enginesubtracts fixed fees, applies the summed rate, then converts, rounding each component
independently — which yields 863. Verified against the pricing code; left as-is.
Verification
mint broken-linksreports no broken links from this page (the 24 it finds are pre-existing in other files).docs.jsonre-parsed as valid JSON.$characters on one line put the fee example into LaTeX math mode. Escaped as\$, matching the convention on existing pages.make lint-markdownfails onmainas well — it invokes an npm script that does not exist. Not touched here.Changes: 2 files
mintlify/payouts-and-b2b/payment-flow/assessing-fees.mdx— new pagemintlify/docs.json— one nav entryRequested by @pengying