/get_accounts

Returns details on linked bank accounts for a specified entity.

👍

This doc has been updated with Priority specifications.

Endpoint returns an array of all external bank accounts linked via /link_account to the provided user_handle. Does NOT return information on wallets.

Request includes an optional search filter for account_number.

Returned bank account information includes (see response attributes for full list):

  • payment instrument uuid
  • last four of account number
  • routing number
  • wire routing number
  • account name
  • account status
  • fuzzy name match score
  • RTP / FedNow capabilities
    • These are generally true, but be aware we are sometimes unable to express nuance from the end user's banking institution.

Request

The request body at this endpoint is the get_accounts_msg JSON object.

Authorization / Authentication

Apps using Access Token Authorization

Use a valid access token in an Authorization: Bearer request header.

See Authenticating with an Access Token for more details.

Apps using ECDSA Authentication

Both authsignature and usersignature headers are required for this request. The usersignature header should be generated with a keypair registered to the user (either registered from the /register endpoint or the /register_wallet endpoint).

See the section on ECDSA Authentication for more detail about ECDSA signature generation.

POST /0.2/get_accounts HTTP/1.1
sandbox.silamoney.com
Content-Type: application/json
// if using OAuth2
Authorization: Bearer [GENERATED JWT TOKEN HERE]
// if using ECDSA
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]

{
  "header": {
    "created": 1234567890, 
    "app_handle": "app_handle", 
    "user_handle":"user_handle", 
    "version": "0.2",
    "reference": "<your unique id>"
  }, 
  // optional filter
  "search_filters": {
    "account_number": "0123456543210"
  }
}

***

HTTP/1.1 200 OK

[
  {
    "account_number": "*1234",
    "routing_number": "123456789",
    "account_name": "default",
    "wire_routing_number": "<wire_routing_number>",
    "account_type": "CHECKING",
    "active": true,
    "account_status": "active",
    "account_link_status": "processor_token",
    "match_score": 0.825,
    "account_owner_name": "Test User",
    "entity_name": "Test User",
    "web_debit_verified":true,
    "provider_name": "PLAID",
    "payment_instrument_uuid": "<uuid string>",
    "capabilities": {
      "aba_routing_number": "123456780",
      "fednow": {
          "credit_enabled": false,
          "debit_enabled": false
      },
      "rtp": {
          "credit_enabled": false,
          "debit_enabled": false
      }
    }
  }
]
const res = await Sila.getAccounts(userHandle, walletPrivateKey);

// Success Response Object
console.log(res.statusCode); // 200
console.log(res.data[0].account_name); // Account name
console.log(res.data[0].account_number); // Account number
console.log(res.data[0].account_status); // Account status
console.log(res.data[0].account_type); // Account type
console.log(res.data[0].routing_number);
console.log(res.data[0].active);
console.log(res.data[0].account_link_status);
console.log(res.data[0].match_score);
console.log(res.data[0].account_owner_name);
console.log(res.data[0].entity_name);
console.log(res.data[0].web_debit_verified); // true/false
payload={

        "user_handle": "user_handle"    #Required
    }

User.getAccounts(silaApp,payload,user_private_key) # users_private_key (256 bits) associated with ethereum address                  


### Success Response Object
[
  {
    "account_number": "*1234",
    "routing_number": "123456789",
    "account_name": "default",
    "account_type": "CHECKING",
    "account_status": "active",
    "active": true/false,
    "account_link_status": "microdeposit_automatically_verified",
    "match_score": 0.825,
    "account_owner_name": "Test User",
    "entity_name": "Test User",
    "web_debit_verified":True
  }
]

### Failure Response Object
{
    status: 'FAILURE'
}
ApiResponse response = api.getAccounts("userHandle", "userPrivateKey");

// Success Response Object
System.out.println(response.getStatusCode()); // 200
System.out.println(((List<Account>) response.getData()).get(0).accountName); // Account name
System.out.println(((List<Account>) response.getData()).get(0).accountNumber); // Account Number
System.out.println(((List<Account>) response.getData()).get(0).accountStatus); // Account Status 
System.out.println(((List<Account>) response.getData()).get(0).accountType); // Account Type
System.out.println(((List<Account>) response.getData()).get(0).accountListStatus); // Account Link Status.
System.out.println(((List<Account>) response.getData()).get(0).routingNumber);
System.out.println(((List<Account>) response.getData()).get(0).active);
System.out.println(((List<Account>) response.getData()).get(0).matchScore);
System.out.println(((List<Account>) response.getData()).get(0).accountOwnerName);
System.out.println(((List<Account>) response.getData()).get(0).entityName);
System.out.println(((List<Account>) response.getData()).get(0).getWebDebitVerified()); // true/false
$userHandle = 'user.silamoney.eth';
$userPrivateKey = 'some private key'; // Hex format
$response = $client->getAccounts($userHandle, $userPrivateKey);

// Success 200
echo $response->getStatusCode();    // 200
$accounts = $response->getData();   // Array of Silamoney\Client\Domain\Account
if (count($accounts)) {
    echo $accounts[0]->accountName;     // Account Name
    echo $accounts[0]->accountNumber;   // Account Number
    echo $accounts[0]->accountStatus;   // Account Status
    echo $accounts[0]->accountType;     // Account Type
    echo $accounts[0]->matchScore;     // Match Score
    echo $accounts[0]->accountOwnerName;     // Account Owner Name
    echo $accounts[0]->entityName;     // Entity Name
}
ApiResponse<object> response = api.GetAccounts(userHandle, walletPrivateKey);

// Success Object Response

Console.WriteLine(response.StatusCode); // 200
Console.WriteLine(((List<Account>)response.Data)[0].AccountLinkStatus); // Account Link Status
Console.WriteLine(((List<Account>)response.Data)[0].AccountName); // Account Name
Console.WriteLine(((List<Account>)response.Data)[0].AccountNumber); // Account Number
Console.WriteLine(((List<Account>)response.Data)[0].AccountStatus); // Account Status
Console.WriteLine(((List<Account>)response.Data)[0].AccountType); // Account Type
Console.WriteLine(((List<Account>)response.Data)[0].Active); // Active
Console.WriteLine(((List<Account>)response.Data)[0].RoutingNumber); // Routing Number
Console.WriteLine(((List<Account>)response.Data)[0].MatchScore); // Match Score
Console.WriteLine(((List<Account>)response.Data)[0].AccountOwnerName); // Account Owner Name
Console.WriteLine(((List<Account>)response.Data)[0].EntityName); // Entity Name
Console.WriteLine(((List<Account>)response.Data)[0].WebDebitVerified); // true

Request Attributes

KeyTypeDescription
headerJSON objectRequired.

Required keys:

created - Unix epoch timestamp in seconds. Must not be future-dated and must not be dated more than 5 minutes in the past.
app_handle - your app handle
user_handle - the user_handle to pull bank account information for

Optional keys:

reference: Can be any value for your own reference. If not provided, one will be assigned.
version: Cannot be null if key is present. Valid values: 0.2, v0.2, V0.2
search_filtersJSON objectOptional.
search_filters.account_numberStringExternal bank account number; only one account number can be searched for in a single request.

Responses

Status CodeDescription
200Successfully fetched array of accounts.
400Bad request format - check validation_details for more information.
401authsignature or usersignature header was absent or incorrect.

Response Attributes

KeyDatatypeDescription
account_numberstring or nullMasked bank account number, last 4 digits visible
routing_numberstring or nullBank account ACH routing number
wire_routing_numberstring or nullBank account wire routing number
account_namestringOptional nickname
account_typestringCHECKING or SAVINGS
activebooleanAccount is active or inactive (frozen)
account_statusstringactive or inactive (frozen)
account_link_statusstringPlaid or MX link status

Options:

processor_token - account linked via Plaid or MX
unverified_manual_input - account linked manually
match_scorestring or nullFuzzy name match score
entity_namestringEnd user's name in Sila environment, provided with /register
account_owner_namestringAccount owner name provided with Plaid or MX
web_debit_verifiedbooleanAccount will have a new property which denotes if the account satisfies the “account validation” aspect of the Web Debit Rule
provider_namestringOptions:

PLAID - account linked via Plaid
MX - account linked via MX
MANUAL - account manually linked
payment_instrument_idstringUUID of payment instrument (bank account)
capabilitiesJSON objectRTPCreditEnabled - institution (bank) supports accepting RTP push

RTPDebitEnabled - institution (bank) supports accepting RTP RequestForPayment (RfP) - rpt_pull

FedNowCreditEnabled - institution (bank) supports accepting FedNow push

FedNowDebitEnabled - institution (bank) supports accepting FedNow RequestForPayment (RfP) - fednow_pull