Overview
Sender fees allow you to set a custom fee on transfers and payment routes that is charged to the end user. The sender fee is the total fee deducted from the source amount — it is not added on top of the Rain fee. This gives you control over your pricing and revenue model. When not set, the sender fee automatically defaults to be equal to the Rain fee — meaning the end user is charged the Rain fee and no additional margin is applied.How Fees Work
Fee Types
Fee Economics
The sender fee is the only fee deducted from the source amount. The destination amount is calculated as:(source amount - sender fee) × exchange rate = destination amountThe
rain returned in the response is informational — it represents Rain’s cost for the transaction. The net between the sender fee and the Rain fee determines your economics:
- Sender fee > Rain fee: You receive the difference as a payout (your margin)
- Sender fee = Rain fee: No margin — the user pays exactly the Rain fee (this is the default)
- Sender fee < Rain fee: You are subsidising the transaction — you will be invoiced for the difference
Sender fees must be enabled for your account. Contact your Rain representative for details and to configure fee limits.
Transfers
For transfers, you set a singlesenderFee on the quote request. Quote requests accept flat fees only — since you know the source amount at quote time, you can calculate a percentage-based fee on your end and pass it as a flat amount.
senderFee was previously named developerFee. You can still pass developerFee for backward compatibility, but it is deprecated, so use senderFee instead. If you provide both, senderFee takes precedence. In responses, the fee appears under fees.sender.Quote Request with Sender Fee
Quote Response
The response reflects the sender fee as set in the request:rain of 1 USDC is informational — it represents Rain’s cost. Since the sender fee (2 USDC) exceeds the Rain fee (1 USDC), you receive 1 USDC as a payout.
Transfer Request
The transfer is created using the quote as usual — no additional fee configuration is needed:Transfer Response
Payment Routes
For payment routes, the source amount is not known in advance — users can send any amount at any time. To support granular fee configuration, payment routes use asenderFees field which accepts an array of fee definitions. This allows you to configure both a flat and a variable fee component together.
senderFees was previously named developerFees. You can still pass developerFees for backward compatibility, but it is deprecated, so use senderFees instead. If you provide both, senderFees takes precedence.Payment Route Request with Sender Fees
- A flat fee of 1.00 USDC per transfer
- A variable fee of 0.5% of the source amount
Payment Route Response
Example Transfer Through a Payment Route
When a user sends 200 USDC to the payment route’s deposit address, both sender fee components are applied:
The resulting transfer transaction reflects both fee components combined: