Skip to main content

Overview

Sender fees let you set a custom fee that Rain charges the end user on transfers and payment routes. The sender fee is the total fee deducted from the source amount. Rain doesn’t add it on top of the Rain fee. This gives you control over your pricing and revenue model. If you don’t set a sender fee, it defaults to 0. The end user pays no fee, including the Rain fee.

How Fees Work

Fee Types

Fee Economics

The sender fee is the only fee deducted from the source amount. Rain calculates the destination amount as:
(source amount - sender fee) × exchange rate = destination amount
The 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
  • Sender fee < Rain fee: You are subsidizing the transaction, and Rain invoices you for the difference (this is the default, with a sender fee of 0)
Rain must enable sender fees for your account. Contact your Rain representative for details and to configure fee limits.

Transfers

For transfers, you set a single senderFee 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

Add a senderFee object to the Create a quote request, with a type of flat and an amount, for example 2.00. The rest of the request is a standard quote.

Quote Response

The response reflects the sender fee as set in the request:
In this example, the source amount is 100 USDC. Rain deducts the 2 USDC sender fee and converts the remaining 98 USDC at 4200 COP/USDC, resulting in a destination amount of 411,600 COP. The 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

Create the transfer from the quote as usual. You don’t need any additional fee configuration. Create the transfer with Create a transfer, passing the quoteId and an optional transferMessage.

Transfer Response

Payment Routes

For payment routes, you don’t know the source amount in advance, since users can send any amount at any time. To support granular fee configuration, payment routes use a senderFees 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

Add a senderFees array to the Create a payment route request. Each entry has a type of flat or variable and an amount. For example, you can configure the payment route with two sender fee components:
  • 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, Rain applies both sender fee components: The resulting transfer transaction reflects both fee components combined:
Since the total sender fee (2.00 USDC) exceeds the Rain fee (1.00 USDC), you receive 1.00 USDC as a payout.

Summary

Next Steps

  • Learn about Transfers for the full transfer flow
  • Learn about Offramps for USD payment route-based withdrawals
  • Learn about Onramps for fiat deposits