Skip to main content
POST
Charge a user a custom fee
Read the guides before using this pageTo use this endpoint properly, make sure you are up to date on our managing users guides.
This endpoint applies one-time custom charges to individual users (like card setup fees, administrative charges, or other ad-hoc fees).

Rain-managed vs Partner-managed programs

Rain-managed programs: Rain automatically processes custom charges and applies them directly to the user’s balance. You don’t need any additional ledgering on your side. Partner-managed programs: You can’t use this endpoint. Rain returns a 403 with Partner-managed tenants cannot create charges. Handle fees in your own ledger.
Charges apply after authorizationRain applies custom charges after the authorization process, which means users may go negative if their balance is insufficient to cover the charge.
Rain handles FX/XB fees differentlyRain configures foreign exchange (FX) and cross-border (XB) fees at the tenant level and includes them during authorization. See Pricing and fees for more information.

Example

Best practicesAlways use idempotency keys to prevent duplicate charges. Provide clear descriptions for charges to help with user support. Monitor user balances to avoid excessive negative balances, and consider notifying users before applying charges when possible.

Authorizations

Api-Key
string
header
required

Path Parameters

userId
string<uuid>
required

Id of the user to create a custom fee charge for

Body

application/json

Description of the custom fee charge

amount
integer
required

The amount of the charge, in cents

Required range: 1 <= x <= 10000000
description
string
required

The description of the charge

Response

Successful operation

id
string<uuid>
required

The id of the charge

createdAt
string<date-time>
required

The time at which the charge was created

amount
integer

The amount of the charge, in cents

Required range: x >= 1
description
string

The description of the charge

currency
enum<string>

Lowercase currency code of the charge, for example usd.

Available options:
usd,
eur