What a payment account is
When you register a payment account, Rain validates and stores the external bank account details and returns an accountid. You then reference that id
when you create a payment route, instead of resending the full bank details
each time.
- 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 anidto reference later when creating a 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, callPOST /payment-accounts
with the externalFiatAccount type and the bank details.
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):accountNumberroutingNumberbeneficiaryTypebeneficiaryAddressbankNamebankAddressbankAccountType
Beneficiary type and name fields
SetbeneficiaryType to either individual or business. The name fields you
must provide depend on this value:
- Individual: provide
beneficiaryFirstNameandbeneficiaryLastName. - Business: provide
beneficiaryBusinessName.
Bank account type
SetbankAccountType 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, callGET /payment-accounts.
GET /payment-accounts/{paymentAccountId}.
DELETE /payment-accounts/{paymentAccountId}.
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 itsid 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.