curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK",
"mask": "4321",
"account_name": "My custom account",
"institution_name": "My custom account institution",
"account_type": "DEPOSITORY",
"account_subtype": "checking"
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/"
payload = {
"external_id": "ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK",
"mask": "4321",
"account_name": "My custom account",
"institution_name": "My custom account institution",
"account_type": "DEPOSITORY",
"account_subtype": "checking"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK',
mask: '4321',
account_name: 'My custom account',
institution_name: 'My custom account institution',
account_type: 'DEPOSITORY',
account_subtype: 'checking'
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => 'ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK',
'mask' => '4321',
'account_name' => 'My custom account',
'institution_name' => 'My custom account institution',
'account_type' => 'DEPOSITORY',
'account_subtype' => 'checking'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/"
payload := strings.NewReader("{\n \"external_id\": \"ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK\",\n \"mask\": \"4321\",\n \"account_name\": \"My custom account\",\n \"institution_name\": \"My custom account institution\",\n \"account_type\": \"DEPOSITORY\",\n \"account_subtype\": \"checking\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK\",\n \"mask\": \"4321\",\n \"account_name\": \"My custom account\",\n \"institution_name\": \"My custom account institution\",\n \"account_type\": \"DEPOSITORY\",\n \"account_subtype\": \"checking\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK\",\n \"mask\": \"4321\",\n \"account_name\": \"My custom account\",\n \"institution_name\": \"My custom account institution\",\n \"account_type\": \"DEPOSITORY\",\n \"account_subtype\": \"checking\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "Custom_Account",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK",
"mask": "4321",
"account_name": "My custom account",
"institution_name": "My custom account institution",
"account_type": "DEPOSITORY",
"account_subtype": "checking",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"description": "<string>",
"meta": {}
}{
"description": "<string>",
"meta": {}
}{
"description": "<string>",
"meta": {}
}Create custom account
Creates a custom account for a business. Custom accounts offer platforms direct control over bank account data and should be used for accounts operated directly by the platform.
curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK",
"mask": "4321",
"account_name": "My custom account",
"institution_name": "My custom account institution",
"account_type": "DEPOSITORY",
"account_subtype": "checking"
}
'import requests
url = "https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/"
payload = {
"external_id": "ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK",
"mask": "4321",
"account_name": "My custom account",
"institution_name": "My custom account institution",
"account_type": "DEPOSITORY",
"account_subtype": "checking"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK',
mask: '4321',
account_name: 'My custom account',
institution_name: 'My custom account institution',
account_type: 'DEPOSITORY',
account_subtype: 'checking'
})
};
fetch('https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => 'ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK',
'mask' => '4321',
'account_name' => 'My custom account',
'institution_name' => 'My custom account institution',
'account_type' => 'DEPOSITORY',
'account_subtype' => 'checking'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/"
payload := strings.NewReader("{\n \"external_id\": \"ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK\",\n \"mask\": \"4321\",\n \"account_name\": \"My custom account\",\n \"institution_name\": \"My custom account institution\",\n \"account_type\": \"DEPOSITORY\",\n \"account_subtype\": \"checking\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK\",\n \"mask\": \"4321\",\n \"account_name\": \"My custom account\",\n \"institution_name\": \"My custom account institution\",\n \"account_type\": \"DEPOSITORY\",\n \"account_subtype\": \"checking\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK\",\n \"mask\": \"4321\",\n \"account_name\": \"My custom account\",\n \"institution_name\": \"My custom account institution\",\n \"account_type\": \"DEPOSITORY\",\n \"account_subtype\": \"checking\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "Custom_Account",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK",
"mask": "4321",
"account_name": "My custom account",
"institution_name": "My custom account institution",
"account_type": "DEPOSITORY",
"account_subtype": "checking",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"description": "<string>",
"meta": {}
}{
"description": "<string>",
"meta": {}
}{
"description": "<string>",
"meta": {}
}Rate Limiting
This endpoint has a custom rate limit policy. Rate Limit Details:| Environment | Limit | Refill Period | Initial Size |
|---|---|---|---|
| Sandbox | 5 requests | 1 second | 10 requests |
| Production | 20 requests | 1 second | 40 requests |
- X-RateLimit-Limit: The rate limit bucket capacity
- X-RateLimit-Remaining: The number of tokens remaining in the bucket
- X-RateLimit-Reset: UTC timestamp (in seconds) when the bucket will be refilled
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Content-Type must be set to application/json.
Path Parameters
The UUID of the business to create custom account for.
Body
Unique ID of the custom account in an external system for linking and idempotency.
"ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK"
Last 4 digits of the custom account number.
"4321"
Name of the custom account.
"My custom account"
Name of the institution for the custom account.
"My custom account institution"
The type of the custom account.
DEPOSITORY, CREDIT, LOAN "DEPOSITORY"
The subtype of the custom account.
CHECKING, SAVINGS, CREDIT CARD, LOAN "checking"
Response
Show child attributes
Show child attributes