Creating a debit account

How to create a debit account for a customer

Note: This article relates to creating a debit account. For details related to creating a credit account, see Opening a credit account.

Overview

Once you've created a customer, you need to create a debit account for them. A debit account is synonymous with a regular bank account and a customer may have multiple accounts.

You create a consumer account for a regular customer and you create a business account for a commercial customer.

Details of the account created depend on the program_id used when you create the account.

You must create an account before you can create a card for the customer.

Creating an account

To create an instance of a customer account, use the POST /accounts operation and provide the parameters as shown in the table below.

▶ Run in Postman

ParameterTypeDescription
customer_id
required for a consumer accounts
stringThe unique ID used to reference a customer resource, for example 931e2341-c3eb-4681-97d4-f6e09d90da14.
business_id
required for commercial aqccounts
stringThe unique ID used to reference a business resource, for example ee1ce096-3c5f-411a-a789-3c5635acbae4.
program_id
required
stringProgram ID that represents the card program offered to customers by your brand in partnership with a bank. For example, 2742ff6a-7455-4066-8b45-ae12d3acca34.
type
required
Select one of: deposit, credit, security_deposit, external.
descriptionstringFreeform description field, for example HSA Account.

An example of a request to create a customer account is shown below.

curl --request POST \
     --url https://sandbox.bond.tech/api/v0.1/accounts \
     --header 'Accept: application/json' \
     --header 'Authorization: YOUR-AUTHORIZATION' \
     --header 'Content-Type: application/json' \
     --header 'Identity: YOUR-IDENTITY' \
     --data '
{
     "customer_id": "c976768c-2258-4f1c-8abc-e88bac75dedf",
     "program_id": "dcdb9663-65c8-48e4-bc12-aa092642dfd8",
     "type": "deposit",
     "description": "HSA Account"
}
'
import requests

url = "https://sandbox.bond.tech/api/v0.1/accounts"

payload = {
    "customer_id": "c976768c-2258-4f1c-8abc-e88bac75dedf",
    "program_id": "dcdb9663-65c8-48e4-bc12-aa092642dfd8",
    "type": "deposit",
    "description": "HSA Account"
}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHORIZATION"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0.1/accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHORIZATION'
request.body = "{\"customer_id\":\"c976768c-2258-4f1c-8abc-e88bac75dedf\",\"program_id\":\"dcdb9663-65c8-48e4-bc12-aa092642dfd8\",\"type\":\"deposit\",\"description\":\"HSA Account\"}"

response = http.request(request)
puts response.read_body
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    Identity: 'YOUR-IDENTITY',
    Authorization: 'YOUR-AUTHORIZATION'
  },
  body: JSON.stringify({
    customer_id: 'c976768c-2258-4f1c-8abc-e88bac75dedf',
    program_id: 'dcdb9663-65c8-48e4-bc12-aa092642dfd8',
    type: 'deposit',
    description: 'HSA Account'
  })
};

fetch('https://sandbox.bond.tech/api/v0.1/accounts', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/accounts");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHORIZATION");
request.AddParameter("application/json", "{\"customer_id\":\"c976768c-2258-4f1c-8abc-e88bac75dedf\",\"program_id\":\"dcdb9663-65c8-48e4-bc12-aa092642dfd8\",\"type\":\"deposit\",\"description\":\"HSA Account\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"customer_id\":\"c976768c-2258-4f1c-8abc-e88bac75dedf\",\"program_id\":\"dcdb9663-65c8-48e4-bc12-aa092642dfd8\",\"type\":\"deposit\",\"description\":\"HSA Account\"}");
Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/accounts")
  .post(body)
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHORIZATION")
  .build();

Response response = client.newCall(request).execute();

An example of a response to a successful request to create a customer account is shown below.

{
  "account_id": "057c6074-a02d-4a5a-bad9-bbc64b047df7",
  "date_updated": "2020-08-16T19:39:34Z",
  "date_created": "2020-08-15T19:39:34Z",
  "program_id": "e242686d-3bb7-4543-8438-0aa682e14696",
  "customer_id": "1114ae62-5fe1-4b21-b4fb-f2b158d8e21e",
  "type": "deposit",
  "status": "active",
  "description": "string",
  "routing_number": 547897762,
  "account_number": 574771265,
  "balance": {
    "current_balance": 1000,
    "ledger_balance": 950,
    "currency": "USD"
  },
  "cards": [
    "7c45101a-82de-49e5-b01d-50151b54312d"
  ],
  "deposit": {}
}

An example of a request to create a commercial account is shown below.

OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"program_id\":\"dcdb9663-65c8-48e4-bc12-aa092642dfd8\",\"type\":\"deposit\",\"description\":\"HSA Account\",\"business_id\":\"002e0f0e-e39d-4351-876c-afcad30d9c37\"}");
Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/accounts")
  .post(body)
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHORIZATION")
  .build();

Response response = client.newCall(request).execute();
import requests

url = "https://sandbox.bond.tech/api/v0.1/accounts"

payload = {
    "program_id": "dcdb9663-65c8-48e4-bc12-aa092642dfd8",
    "type": "deposit",
    "description": "HSA Account",
    "business_id": "002e0f0e-e39d-4351-876c-afcad30d9c37"
}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHORIZATION"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0.1/accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHORIZATION'
request.body = "{\"program_id\":\"dcdb9663-65c8-48e4-bc12-aa092642dfd8\",\"type\":\"deposit\",\"description\":\"HSA Account\",\"business_id\":\"002e0f0e-e39d-4351-876c-afcad30d9c37\"}"

response = http.request(request)
puts response.read_body
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    Identity: 'YOUR-IDENTITY',
    Authorization: 'YOUR-AUTHORIZATION'
  },
  body: JSON.stringify({
    program_id: 'dcdb9663-65c8-48e4-bc12-aa092642dfd8',
    type: 'deposit',
    description: 'HSA Account',
    business_id: '002e0f0e-e39d-4351-876c-afcad30d9c37'
  })
};

fetch('https://sandbox.bond.tech/api/v0.1/accounts', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/accounts");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHORIZATION");
request.AddParameter("application/json", "{\"program_id\":\"dcdb9663-65c8-48e4-bc12-aa092642dfd8\",\"type\":\"deposit\",\"description\":\"HSA Account\",\"business_id\":\"002e0f0e-e39d-4351-876c-afcad30d9c37\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"program_id\":\"dcdb9663-65c8-48e4-bc12-aa092642dfd8\",\"type\":\"deposit\",\"description\":\"HSA Account\",\"business_id\":\"002e0f0e-e39d-4351-876c-afcad30d9c37\"}");
Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/accounts")
  .post(body)
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHORIZATION")
  .build();

Response response = client.newCall(request).execute();

XXXXXX check the following example is correct XXXXX

An example of a response to a successful request to create a customer account is shown below.

{
  "account_id": "979e14cd-6fe4-4765-b7a4-d4eff102cc4a",
  "program_id": "3c23ab0e-cdef-47b5-aa7c-769bf6a3c1c9",
  "business_id": "590f65b1-98c7-4d22-bc90-4024023d4f3f",
  "type": "deposit",
  "status": "active",
  "description": "bus_01",
  "routing_number": "547897762",
  "account_number": "574771265",
  "cards": [
    "a0cdca3b-e667-4ead-b8d8-27f171406216"
  ],
  "date_updated": "2020-08-15T19:39:34Z",
  "date_created": "2020-08-15T19:39:34Z",
  "balance": {
    "current_balance": 454.12,
    "ledger_balance": 483.12,
    "currency": "USD"
  },
  "credit": {
    "credit_limit": 1000,
    "security_deposit_account_id": "46352399-d005-451a-b988-27b8c878503e",
    "statement": {
      "close_date": "2020-08-05",
      "balance": 187575
    },
    "apr": {
      "purchase": 11.99,
      "cash_advance": 19.99,
      "penalty": 2.99,
      "balance_transfer": 14.99
    },
    "payment": {
      "due_date": "2020-08-05",
      "minimum_payment_percent": 9.99,
      "minimun_payment": 35
    }
  },
  "deposit": {},
  "security_deposit": {
    "credit_account": "string"
  }
}

For a complete specification and interactive examples, see Creating a debit account in the Bond API Reference.

Trying to create a customer with a missing field

If you try to create a customer with a missing field, you receive a JSON error message similar to the one shown below.

{
  "Error": "Not allowed"
}