Bank

Overview

The following endpoints provide APIs to allow you to manage a user's bank connections and perform actions with those bank accounts, for example, ACH transactions.

To understand how we link bank accounts with Plaid, check out our documentation on Plaid Bank Linking.

There are three steps to linking a user's bank account:

  1. Requesting a Plaid Link token

  2. Presenting the Plaid Link modal to the user by passing it the link token (see docs).

  3. Capturing the public token from the Plaid Link modal and activating their account with Ratio.

You will need to provide us with a redirect URI so that we can add it to Plaid

If you are building an Android app, you also need to provide us with the Android Package Name

These values you send to Ratio need to match what you send in your requestLink calls.

Request Bank Link

{
  "redirectUri": "https://your.redirecturi.com",
  "androidPackageName": "com.example"
}
curl --location -g --request POST 'https://api.ratio.me/v1/users/<USER_ID>/banks:requestLink' \
--header 'ratio-client-id: <YOUR_CLIENT_ID>' \
--header 'ratio-client-secret: <YOUR_CLIENT_SECRET>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
  "redirectUri": "<YOUR_REDIRECT_URI>",
  "androidPackageName": "<YOUR_ANDROID_PACKAGE_NAME>"
}'

Activate Bank Link

{
  "publicToken": "public-sandbox-72ffcabb-7eb1-4ac7-b7e4-d2261e3fa78f"
}
curl --location -g --request POST 'https://api.ratio.me/v1/users/<USER_ID>/banks:activateLink' \
--header 'ratio-client-id: <YOUR_CLIENT_ID>' \
--header 'ratio-client-secret: <YOUR_CLIENT_SECRET>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
  "redirectUri": "<YOUR_REDIRECT_URI>",
  "androidPackageName": "<YOUR_ANDROID_PACKAGE_NAME>"
}'

Update Link Token (re-login)

Note: Sometimes bank accounts can become disconnected and require the user to log in once more. We provide an update link token endpoint for this exact reason.

Unlink Bank Account

Retrieve Bank Account

Initiate ACH

Once a bank has been linked and verified, use the following endpoint to make a crypto purchase via ACH. You can obtain the verification status from the GET /banks/{id} call above, or by subscribing to the appropriate webhook.

Please see our list of supported currencies or our Currency enum for reference on formatting and network support.

Last updated