Cards
All the APIs to issue and manage a card
Use this endpoint to create a card for a verified cardholder.
In the sandbox environment, you'll need to fund your sandbox-issuing wallet before you'll be able to create a card or fund one. You can use this endpoint to fund your issuing wallet with some large amount that can cover you through your test.
cURL
Python
Nodejs
PHP
Go
curl --location --request POST 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/create_card' \
--header 'token: Bearer *****' \
--header 'Content-Type: application/json' \
--data-raw '{
"cardholder_id": "d0658fedf8284207866d96183fa",
"card_type": "virtual" || "physical",
"card_brand": "Visa",
"card_currency": "USD",
"meta_data": {"user_id": "d0658fedf828420786e4a7083fa"}
}'
import requests
import json
url = "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/create_card"
payload = json.dumps({
"cardholder_id": "d0658fedf8284207866d96183fa",
"card_type": "virtual",
"card_brand": "Visa",
"card_currency": "USD",
"meta_data": {
"user_id": "d0658fedf828420786e4a7083fa"
}
})
headers = {
'token': 'Bearer *****',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/create_card',
'headers': {
'token': 'Bearer *****',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"cardholder_id": "d0658fedf8284207866d96183fa",
"card_type": "virtual",
"card_brand": "Visa",
"card_currency": "USD",
"meta_data": {
"user_id": "d0658fedf828420786e4a7083fa"
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/create_card');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'token' => 'Bearer *****',
'Content-Type' => 'application/json'
));
$request->setBody('{\n "cardholder_id": "d0658fedf8284207866d96183fa",\n "card_type": "virtual",\n "card_brand": "Visa",\n "card_currency": "USD",\n "meta_data": {"user_id": "d0658fedf828420786e4a7083fa"}\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/create_card"
method := "POST"
payload := strings.NewReader(`{
"cardholder_id": "d0658fedf8284207866d96183fa",
"card_type": "virtual",
"card_brand": "Visa",
"card_currency": "USD",
"meta_data": {"user_id": "d0658fedf828420786e4a7083fa"}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("token", "Bearer *****")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
🟢 200 : card creation is successful.
{
"status": "success",
"message": "The Visa USD card was created successfully",
"data": {
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"currency": "USD"
}
}
🔴 400: Invalid Cardholder ID
{
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 401: Cardholder has been deactivated
{
"message": "This cardholder has been deactivated please contact admin before requesting a card."
}
🔴 401: Cardholder didn't pass ID verification and so can't be issued a card
{
"message": "This cardholder has not had their ID verified yet and so cannot be issued a card."
}
🔴 401: Insufficient balance in your issuing wallet
{
"message": "Please top up your USD issuing wallet, you have insufficient balance to perform this operation"
}
🔴 400: The requested card type is currently unavailable
{
"message": "This card type is currently unavailable, but we're working on it."
}
🔴 504: We ran into an error creating the card
{
"message": "We ran into an error running this operation, please try again."
}
Note: Only for physical USD cards.
Use this endpoint to activate a physical card for a verified cardholder.
cURL
Python
Nodejs
PHP
Go
curl --location --request POST 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/activate_physical_card' \
--header 'token: Bearer *****' \
--header 'Content-Type: application/json' \
--data-raw '{
"cardholder_id": "37383839939030",
"card_type": "physical",
"card_brand": "Visa",
"card_currency": "USD",
"card_token_number": "37383839939030",
"meta_data": {}
}'
import requests
import json
url = "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/activate_physical_card"
payload = json.dumps({
"cardholder_id": "37383839939030",
"card_type": "physical",
"card_brand": "Visa",
"card_currency": "USD",
"card_token_number": "37383839939030",
"meta_data": {}
})
headers = {
'token': 'Bearer *****',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/activate_physical_card',
'headers': {
'token': 'Bearer *****',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"cardholder_id": "37383839939030",
"card_type": "physical",
"card_brand": "Visa",
"card_currency": "USD",
"card_token_number": "37383839939030",
"meta_data": {}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
pyth
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/activate_physical_card');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'token' => 'Bearer *****',
'Content-Type' => 'application/json'
));
$request->setBody('{\n "cardholder_id": "d0658fedf8284207866d96183fa",\n "card_type": "physical",\n "card_brand": "Visa",\n "card_currency": "USD",\n "card_token_number: "38393030303030" \n"meta_data": {"user_id": "d0658fedf828420786e4a7083fa"}\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/activate_physical_card"
method := "POST"
payload := strings.NewReader(`{
"cardholder_id": "37383839939030",
"card_type": "physical",
"card_brand": "Visa",
"card_currency": "USD",
"
": "37383839939030",
"meta_data": {}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("token", "Bearer *****")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
- cardholder_id : String *required
- card_type (can either be "virtual" or "physical") : String *required
- card_brand (can either be "Mastercard" or "Visa") : String *required
- card_currency (can either be "USD" or "NGN") : String *required
- card_token_number: 13 digit number attached to card envelope.
- meta_data : Dictionary *Optional
{
"status": "success",
"message": "The Visa USD card creation is currently being processed, please listen to the webhook notification.",
"data": {
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"currency": "USD"
}
}
🔴 400: Invalid Cardholder ID
{
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 401: Cardholder has been deactivated
{
"message": "This cardholder has been deactivated please contact admin before requesting a card."
}
🔴 401: Cardholder didn't pass ID verification and so can't be issued a card
{
"message": "This cardholder has not had their ID verified yet and so cannot be issued a card."
}
🔴 401: Insufficient balance in your issuing wallet
{
"message": "Please top up your USD issuing wallet, you have insufficient balance to perform this operation"
}
🔴 400: The requested card type is currently unavailable
{
"message": "This card type is currently unavailable, but we're working on it."
}
🔴 504: We ran into an error creating the card
{
"message": "We ran into an error running this operation, please try again."
}
Use this endpoint to fetch the details for a card you created.
Because a card's data contains sensitive information like the card number, CVV, and expiry date the details are encrypted when they're sent over to you but are decrypted automatically when they get to your server.
We strongly advise that you do not store the card data on your server except if you're PCI-DSS certified.
We have provided you with two endpoints to keep you compliant.
- 1.Use these endpoints below when the user doesn't really need to see the card details, for example in a screen where you show them the list of cards they have, or where you display general information about the card like the last 4 digits etc.
sandbox:
http://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_details
production:
http://issuecards.api.bridgecard.co/v1/issuing/cards/get_card_details
- 2.You can also use this other endpoint when you need to display the card details to the user may be at the point when they need to make a payment or when they click the view card details button on your app
sandbox:
https://issuecards-api-bridgecard-co.relay.evervault.com/v1/issuing/sandbox/cards/get_card_details
production:
https://issuecards-api-bridgecard-co.relay.evervault.com/v1/issuing/cards/get_card_details
cURL
Python
Nodejs
PHP
Go
curl --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_details?card_id=216ef11a58bf468baeb9cdbb97777777' \
--header 'token: Bearer *****' \
--data-raw ''
import requests
url = "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_details?card_id=216ef11a58bf468baeb9cdbb97777777"
payload = ""
headers = {
'token': 'Bearer *****'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_details?card_id=216ef11a58bf468baeb9cdbb97777777',
'headers': {
'token': 'Bearer *****'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_details?card_id=216ef11a58bf468baeb9cdbb97777777');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'token' => 'Bearer *****'
));
$request->setBody('');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_details?card_id=216ef11a58bf468baeb9cdbb97777777"
method := "GET"
payload := strings.NewReader(``)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("token", "Bearer *****")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
🟢 200: card details fetched successfully.
{
"status": "success",
"message": "Card details was fetched successfully",
"data": {
"billing_address": {
"billing_address1": "256 Chapman Road STE 105-4",
"billing_city": "Newark",
"billing_country": "US",
"billing_zip_code": "19702",
"country_code": "US",
"state": "Delaware",
"state_code": "DE"
},
"brand": "Visa",
"card_currency": "USD",
"card_id": "216ef11a58bf468baeb9cdbb947",
"card_name": "John Doe",
"card_number": "ev:RFVC:x9Fyh+9rI0BekZ5i:AgQHRjIQa7BzqhGXYuZwV/lXqiTb8Uq07nBYWWbuu46I:XXbJWyrBwDicifdA3exFewXRLSnR71whuMYKMhj5FVA:$",
"card_type": "virtual",
"cardholder_id": "d0658fedf8284207866d961e4a7083fa",
"created_at": 1659958652,
"cvv": "ev:RFVC:b9Qu3KGE+LBIhZEo:AgQHRjIQa7BzqhGXYuZwV/lXqiTb8Uq07nBYWWbuu46I:BJhJBGa/87QT8YCCLoCWvh9STg:$",
"expiry_month": "ev:RFVC:f24e5mMw/sVAQxtl:AgQHRjIQa7BzqhGXYuZwV/lXqiTb8Uq07nBYWWbuu46I:i05HSrBrHf2hKfn0cUDTcYnX:$",
"expiry_year": "ev:RFVC:2b0lTiBTfLcht3ju:AgQHRjIQa7BzqhGXYuZwV/lXqiTb8Uq07nBYWWbuu46I:JtZ1xVK3hJnFrW+sMjC1P7BP2LY:$",
"is_active": true,
"issuing_app_id": "842352f4-8a6f-4a19-89c6-4e8a240a2355",
"last_4": "8649",
"livemode": false,
"meta_data": {
"user_id": "d0658fedf8284207866d961e4a7083fa"
},
"balance": "0",
"pin_3ds_activated": true
}
}
🔴 400: Invalid Cardholder ID
{
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 504: We ran into an error creating the card
{
"message": "We ran into an error running this operation, please try again."
Use this API to fetch the balance of a card
cURL
Python
Nodejs
PHP
Go
curl --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_balance?card_id=216ef11a999f468baeb9cdbb94765865' \
--header 'token: Bearer *****' \
--data-raw ''
import requests
url = "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_balance?card_id=216ef11a58bf468baeb9cdbb94765865"
payload = ""
headers = {
'token': 'Bearer *****'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_balance?card_id=216ef11a58bf468baeb9cdbb94765865',
'headers': {
'token': 'Bearer *****'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_balance?card_id=216ef11a58bf468baeb9cdbb94765865');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'token' => 'Bearer *****'
));
$request->setBody('');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_balance?card_id=216ef11a58bf468baeb9cdbb94765865"
method := "GET"
payload := strings.NewReader(``)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("token", "Bearer *****")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
🟢 200: card balance fetched successfully.
{
"status": "success",
"message": "Card balance was fetched successfully",
"data": {
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"balance": "0"
}
}
🔴 400: Invalid Cardholder ID
{
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 504: We ran into an error fetching card balance
{
"message": "We ran into an error running this operation, please try again."
You can use this endpoint to fund a card.
In the sandbox environment, you'll need to fund your sandbox-issuing wallet before you'll be able to create a card or fund one. You can use this endpoint to fund your issuing wallet with some large amount that can cover you through your test.
cURL
Python
Nodejs
PHP
Go
curl --location --request PATCH 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/fund_card_asynchronously' \
--header 'token: Bearer *****' \
--header 'Content-Type: application/json' \
--data-raw '{
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"amount": "100",
"transaction_reference": "216ef11a58bf468baeb9cdbb94765865",
"currency": "USD"
}'
import requests
import json
url = "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/fund_card_asynchronously"
payload = json.dumps({
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"amount": "100",
"transaction_reference": "216ef11a58bf468baeb9cdbb94765865",
"currency": "USD"
})
headers = {
'token': 'Bearer *****',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/fund_card_asynchronously',
'headers': {
'token': 'Bearer *****',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"amount": "100",
"transaction_reference": "216ef11a58bf468baeb9cdbb94765865",
"currency": "USD"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/fund_card_asynchronously');
$request->setMethod('PATCH');
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'token' => 'Bearer *****',
'Content-Type' => 'application/json'
));
$request->setBody('{\n "card_id": "216ef11a58bf468baeb9cdbb94765865",\n "amount": "100",\n "transaction_reference": "216ef11a58bf468baeb9cdbb94765865",\n "currency": "USD"\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/fund_card_asynchronously"
method := "PATCH"
payload := strings.NewReader(`{
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"amount": "100",
"transaction_reference": "216ef11a58bf468baeb9cdbb94765865",
"currency": "USD"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("token", "Bearer *****")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
🟡 202: card funding in progress.
{
"status": "success",
"message": "Card funding in progress",
"data": {
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"transaction_reference": "216ef11a58bf468baeb9cdbb94765865"
}
}
🔴 400: Invalid Cardholder ID
{
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 400: Funding Limit Exceeded
{
"message": "This card can only hold a maximum balance of 5000 USD at a time."
}
🔴 400: Transaction reference already exists