Skip to main content
A payment account is a record of an external funding source, like a bank account, that Rain stores so you can reuse it across payment routes. Registering a payment account doesn’t move money. It only saves the account details for later use.

What a payment account is

When you register a payment account, Rain validates and stores the external bank account details and returns an account id. You then reference that id when you create a payment route, instead of resending the full bank details each time.
1PartnerPOST /payment-accounts
2RainValidates and stores the account
3ResponseReturns id
  • POST /payment-accounts: the partner submits the bank account details.
  • Validate and store: Rain validates the details and stores the account.
  • Return id: Rain returns the account with an id to reference later when creating a payment route.
Today, payment accounts support external fiat accounts, which are bank accounts that receive fiat. Use a payment account as the destination when you create an offramp payment route.

Before you begin

Make sure you have:
  • API access to the payment accounts endpoints.
  • Bank account details for the destination account, including the account number, routing number, and beneficiary information.

Register a bank account

To register a bank account, call POST /payment-accounts with the externalFiatAccount type and the bank details.
The response includes the stored account and its id, which you reference when you create a payment route.

Bank account fields

Provide the following required bank account fields for both US rails, ACH (US) and Wire (US):
  • accountNumber
  • routingNumber
  • beneficiaryType
  • beneficiaryAddress
  • bankName
  • bankAddress
  • bankAccountType

Beneficiary type and name fields

Set beneficiaryType to either individual or business. The name fields you must provide depend on this value:
  • Individual: provide beneficiaryFirstName and beneficiaryLastName.
  • Business: provide beneficiaryBusinessName.

Bank account type

Set bankAccountType to either checking or savings. International rails used for quote-based transfers (co_ach, mx_spei, br_pix, and others) require different fields, such as clabeNumber or pixCode. See that page for the full field requirements by country.
Rain supports both first-party and third-party destinations. The party who receives the funds doesn’t have to be the customer who owns the account.
  • First-party (thirdParty: false): the bank account belongs to the same user who set up the route.
  • Third-party (thirdParty: true): the bank account belongs to a different party, for example a vendor or another individual.

Manage payment accounts

After you register payment accounts, you can list them, retrieve a single account, or delete an account you no longer need. To retrieve all payment accounts for your team, call GET /payment-accounts.
To retrieve a single payment account, call GET /payment-accounts/{paymentAccountId}.
To remove a payment account, call DELETE /payment-accounts/{paymentAccountId}.
You cannot delete a payment account that an active payment route references. Delete the payment route first, then delete the payment account.

How payment accounts are used in payment routes

Registering and managing accounts is only half the picture. A payment account only becomes useful once you reference its id as the destination of an offramp payment route. Creating the route still doesn’t move money: Rain returns an onchain deposit address, and funds convert only after a sender sends stablecoin to it. See What a payment route is for how Rain picks a direction and what each one returns.

What’s next

Create a payment route

Reference this account’s ID as the destination of an offramp payment route.

Onramps

Let users convert fiat to crypto through a payment route.

Offramps

Let users convert crypto to fiat into a registered payment account.