Skip to main content
A payment account is a record of an external bank account that Rain stores so you can reuse it as a payout destination. 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 an offramp payment route or a quote, 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 as a payout destination.
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. Send the account details in the externalFiatAccount object: the currency and rail, whether the account is thirdParty, the beneficiary’s name, type and address, and the bank’s name, address, account number, routing number and account type. See Create a payment account for the full request. 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.

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 payment accounts, call GET /payment-accounts. Pass userId or companyId to return the accounts for one user or company. To retrieve a single payment account, call GET /payment-accounts/{paymentAccountId}. To remove a payment account, call DELETE /payment-accounts/{paymentAccountId}.
After you delete a payment account, you can no longer use it as the destination of a new payment route or quote.

How payment routes use payment accounts

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.