Opening a credit account
Overview of opening a credit for a customer.
Opening a credit account involves the following procedures:
- Creating a credit application
- Submitting the credit application
Note: This article relates to creating a credit account. For details related to creating a debit account, see Creating a debit account.
Overview
Once you've created a customer or business, you can open a credit account for them.
The response to a request to create a credit account contains information regarding the newly created account, including an account_id
. This is the UUID used to reference this account in subsequent API calls.
To open a credit account for a customer, use the POST /accounts
operation and provide parameters as shown in the table below.
Parameter | Type | Description |
---|---|---|
customer_id either customer_id or business_id is required | string | The unique ID used to reference a customer resource. For example, 6f0e7dcb-6073-42df-bf02-ce71bd5fac3b . |
business_id either business_id or customer_id is required | string | Unique ID used to reference a business. For example, 6f0e7dcb-6073-42df-bf02-ce71bd5fac3b . |
program_id required | string | Unique ID that represents the card program offered to customers by your brand in partnership with a bank. |
type required | string | Type of account to be created. Currently only deposit is supported. |
description | string | Optional, free-form field to enter a description of the account to be created. |
An example of a request to create a consumer credit account is shown below.
curl --request POST \
--url https://sandbox.bond.tech/api/v0.1/accounts \
--header 'Accept: application/json' \
--header 'Authorization: YOUR-AUTHENTICATION' \
--header 'Content-Type: application/json' \
--header 'Identity: YOUR-IDENTITY' \
--data '
{
"type": "credit",
"customer_id": "c976768c-2258-4f1c-8abc-e88bac75dedf",
"description": "HSA Account"
}
'
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-AUTHENTICATION'
request.body = "{\"type\":\"credit\",\"customer_id\":\"c976768c-2258-4f1c-8abc-e88bac75dedf\",\"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-AUTHENTICATION'
},
body: JSON.stringify({
type: 'credit',
customer_id: 'c976768c-2258-4f1c-8abc-e88bac75dedf',
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));
import requests
url = "https://sandbox.bond.tech/api/v0.1/accounts"
payload = {
"type": "credit",
"customer_id": "c976768c-2258-4f1c-8abc-e88bac75dedf",
"description": "HSA Account"
}
headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Identity": "YOUR-IDENTITY",
"Authorization": "YOUR-AUTHENTICATION"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
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-AUTHENTICATION");
request.AddParameter("application/json", "{\"type\":\"credit\",\"customer_id\":\"c976768c-2258-4f1c-8abc-e88bac75dedf\",\"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, "{\"type\":\"credit\",\"customer_id\":\"c976768c-2258-4f1c-8abc-e88bac75dedf\",\"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-AUTHENTICATION")
.build();
Response response = client.newCall(request).execute();
The following is an example of a response to a successful request to create a credit account.
{
"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": "credit",
"status": "active",
"description": "string",
"routing_number": "547897762",
"account_number": "574771265",
"balance": {
"current_balance": 1000,
"available_balance": 950,
"previous_statement_balance": 17312,
"currency": "USD"
},
"cards": [
"7c45101a-82de-49e5-b01d-50151b54312d"
],
"deposit": {}
}
For a complete specification and interactive examples, see Create an account in the Bond API Reference.
Updated about 1 year ago