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 an offramp payment route or a quote, 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 as a payout destination.
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.
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):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.
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, callGET /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}.
How payment routes use payment accounts
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.