Bond Studio

The Bond Developer Hub

Welcome to the Bond Studio Developer Hub.

Get up and running fast with documentation, guides, and support.

Let's get started!

Get Started    API Reference

Creating a card and card account

Introduction

After you create a customer resource and they have passed KYC verification, you can use the cards API to create a card which simultaneously also creates an associated card account.

A card and its card account are closely coupled but logically distinct, the difference is what is being managed. The card resource contains information about the actual physical or virtual card, while the card account resource stores broader account information, such as what bank accounts are connected to the card. For card type details, see Card types.

When a physical card is issued it is inactive and must be activated before it can be used.

The distinction between a credit and debit card is determined by the program_id used when creating the card.

Creating a card and card account

A card and card account are simultaneously created from a single POST request to the /cards endpoint. The program_id contains your card program settings with Bond. The customer must have passed the KYC verification.

Use the POST /cards operation and provide the parameters as shown in the following table.

Parameter

Type

Description

customer_id
required

String

The unique ID used to reference a customer resource.

program_id
required

String

Program ID ythat represents the card program offered to customers by your brand in partnership with a bank.

An example of a request to create a card is shown below.

curl --request POST \
  --url https://sandbox.bond.tech/api/v0/cards \
  --header 'Identity: YOUR-IDENTITY' \
  --header 'Authorization: YOUR-AUTHORIZATION' \
  --header 'Content-Type: application/json' \
  --data '{"customer_id":"094cd49b-6412-429f-a396-314097a6c3b9", 
  "program_id":"2742ff6a-7455-4066-8b45-ae12d3acca34"}'
import requests

url = "https://sandbox.bond.tech/api/v0/core/card"

payload = {
  "customer_id":"094cd49b-6412-429f-a396-314097a6c3b9", 
  "program_id":"2742ff6a-7455-4066-8b45-ae12d3acca34"
}
headers = {
  "Content-Type": "application/json",
  "Identity": YOUR-IDENTITY,
  "Authorization": YOUR-AUTHORIZATION
}

response = requests.request("POST", url, json=payload, headers=headers)

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

url = URI("https://sandbox.bond.tech/api/v0/core/card")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Identity"] = YOUR-IDENTITY
request["Authorization"] = YOUR-AUTHORIZATION
request.body = "{\"customer_id\":\"094cd49b-6412-429f-a396-314097a6c3b9\",\"program_id\":\"2742ff6a-7455-4066-8b45-ae12d3acca34\"}"

response = http.request(request)
puts response.read_body
const data = JSON.stringify({
  "customer_id":"094cd49b-6412-429f-a396-314097a6c3b9", 
  "program_id":"2742ff6a-7455-4066-8b45-ae12d3acca34"
});

const xhr = new XMLHttpRequest();

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.bond.tech/api/v0/core/card");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Identity", YOUR-IDENTITY);
xhr.setRequestHeader("Authorization", YOUR-AUTHORIZATION);

xhr.send(data);
var client = new RestClient("https://sandbox.bond.tech/api/v0/core/card");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Identity", YOUR-IDENTITY);
request.AddHeader("Authorization", YOUR-AUTHORIZATION);
request.AddParameter("application/json", "{\"customer_id\":\"094cd49b-6412-429f-a396-314097a6c3b9\",\"program_id\":\"2742ff6a-7455-4066-8b45-ae12d3acca34\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"customer_id\":\"094cd49b-6412-429f-a396-314097a6c3b9\",\"program_id\":\"2742ff6a-7455-4066-8b45-ae12d3acca34\"}");
Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0/core/card")
  .post(body)
  .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 card is shown below.

{
    "card_id": "2742ff6a-7455-4066-8b45-ae12d3acca34",
    "last_four": 6169,
    "status": "Active",
    "card_account_id": "8d8b0aa0-5eec-4eab-923d-2bd777c9a07d",
    "customer_id": "094cd49b-6412-429f-a396-314097a6c3b9"
}

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

Updated 5 days ago



Creating a card and card account


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.