Create a PaymentIntent with transfer_data.destination set to the connected account ID and application_fee_amount set in the smallest currency unit (e.g., cents).
Confirm the PaymentIntent; Stripe automatically routes the charge through the connected account and deducts application_fee_amount before transferring the remainder.
Retrieve the ApplicationFee object via GET /v1/application_fees/{id} to confirm the platform received the fee.
To issue a partial or full refund, call POST /v1/refunds with payment_intent and optionally reverse_transfer: true and refund_application_fee: true to claw back the fee.
Subscribe to application_fee.created and charge.refunded webhooks to reconcile fee income and refund adjustments.
Use balance transactions to reconcile the fee — each ApplicationFee generates a balance transaction with type 'application_fee' on the platform account.
Known gotchas
application_fee_amount cannot exceed the charge amount; Stripe will reject the request with a validation error if it does.
Destination charges settle to the connected account's Stripe balance, not the platform's — the platform only receives application_fee_amount.
Reversing application fees via refund_application_fee: true only works if the fee has not already been paid out to the platform's bank account.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp