Funding Accounts

POST: Create the funding source using /accounts when it is a linked account

HTTP Request: POST https://sandbox.alloy.co/v1/accounts

Sample request body:

{
  "account_number": "12394905",
  "routing_number": "194035029",
  "external_account_id": "u49454030jj49030j50",
  "is_linked_account": true, // identify that this is a linked account
  "link_timestamp": "2021-05-20 12:22:16+00", // timestamp of when account was linked
  "account_type": "checking account",
  "account_class": "deposit",
  "meta": {
    "is_linked_account": true, // required for now
    "link_timestamp": "2021-05-20 12:22:16+00"
  },
  "entities": [{
    "external_entity_id": "u49200f0ad0f0a" // id of the entity linking this account,
    "account_holder_type": "primary",
  }],
  "account_snapshot": {
    "timestamp": "2021-05-20 18:26:53+00",
    "details": {
            "status_description": "registered", // the client status for linked accounts
      "name_first": "Frank",
      "name_last": "Abagnale",
      "email_address": "[email protected]",
      "phone_number": "+15555555555",
      "primary_address_line1": "10 Test Dr.",
      "primary_address_line2": "Apt. 3",
      "primary_address_city": "New York",
      "primary_address_state": "New York",
      "primary_address_postal_code": "10001",
      "primary_address_country_code": "USA",
    },
    "account_view": {
      "account_balance": 5634128000,
      "date_last_activity": "2021-05-20"
    }
  }
}

POST: Create the funding source using /evaluations

HTTP Request:GET https://sandbox.alloy.co/v1/evaluations

Ensure that is_linked_account is set to true, under destination.

Sample Request Body:

{
    "transaction_id": "trx-1938bc8f",
    "amount": 900,
    "transaction_date": "2021-05-20 18:26:53",
    "currency": "USD",
    "source": {
        "external_account_id": "a9293bd2f1"
    },
    "destination": {
        "external_account_id": "u49454030jj49030j50",
        "is_linked_account": true,
        "link_timestamp": "2021-05-20 12:22:16+00"
    }
}

PATCH: Unlink a Funding Source

HTTP Request: PATCH https://sandbox.alloy.co/v1/accounts/$account_token

{
  "account_class": "deposit",
  "unlink_timestamp": "2021-10-24 18:00:00+00"
}

Note: is_linked_account should always be true for external bank accounts, even if the link is not currently active. Additionally, when you unlink an account, you should not pass in link_timestamp as null and leave the value as is.

PATCH: Relink Previously Unlinked Source

HTTP Request: PATCH https://sandbox.alloy.co/v1/accounts/$account_token

{
  "account_class": "deposit",
  "unlink_timestamp": null,
  "link_timestamp": "2021-11-13 18:26:53+00"
}