This documentation explains how you can issue USD cards to your customers, your customers can make payments worth $5,000 or $10,000 monthly (depending on the card's limit) using this card. We'll also be assuming that you have finished the integration process of creating a cardholder to continue this implementation.
Create 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.
Mastercard Cards
The Mastercard product also has two card limits, $5,000 and $10,000. To create a card with a $5,000 limit you must pre-fund the card at creation with at least $3 and to create a card with a limit of $10,000 you'll need to fund the card with at least $4 at creation.
These minimum funds are held down and will be used to pay the card's Monthly maintenance fee in subsequent months.
If the customer doesn't doesn't do a transaction for three months the card eventually gets deleted and the get card details data carries an is_deleted
value of true
. Before a card gets deleted we send a webhook notification some days before to remind the user to fund his card to avoid deletion
The cards are also PIN-secured cards, so the user has to select a PIN on their card at the point of card creation. If you send an empty pin field the card's pin is defaulted to the 7th and 10th digit of the card PAN number.
The pin value in the create card payload must be 4 digits and encrypted before passing it as a parameter to call the API, we use an open-source package called AES-Anywhere for this. The encryption key is the live or test secret key for your account, you can find these keys on the homepage of your dashboard.
See Examples Below
Python Nodejs PHP Go
Copy $ pip install aes-everywhere
from AesEverywhere import aes256
# encryption
encrypted = aes256.encrypt('4 digit pin', 'Bridgecard Secret Key')
encrypted = encrypted.decode()
print(encrypted)
Copy $ npm install aes-everywhere
var AES256 = require('aes-everywhere');
// or
// import AES256 from 'aes-everywhere';
// encryption
var encrypted = AES256.encrypt('4 digit pin', 'Bridgecard Secret Key')
console.log(encrypted);
Copy $ composer require mervick/aes-everywhere
require '../../vendor/mervick/aes-everywhere/php/src/AES256.php';
use mervick\aesEverywhere\AES256;
$encrypt = AES256::encrypt('4 digit pin', 'Bridgecard Secret Key')
Copy import "github.com/mervick/aes-everywhere/go/aes256"
// encryption
encrypted := aes256.Encrypt("4 digit pin", "Bridgecard Secret Key")
Now that you have the encrypted PIN you can go ahead to call the API below
cURL Python Nodejs PHP Go
Copy 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": "Mastercard",
"card_currency": "USD",
"card_limit": "500000" || "1000000",
"transaction_reference:"",
"funding_amount": "300",
"pin" : "39sksksie3902023020dj03020203039",
"meta_data": {"user_id": "d0658fedf828420786e4a7083fa"}
}'
Copy 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" : "Mastercard" ,
"card_currency" : "USD" ,
"card_limit" : "500000" || "1000000" ,
"funding_amount" : "300" ,
"pin" : "39sksksie3902023020dj03020203039" ,
"transaction_reference" : "" ,
"meta_data" : {
"user_id" : "d0658fedf828420786e4a7083fa"
}
})
headers = {
'token' : 'Bearer *****' ,
'Content-Type' : 'application/json'
}
response = requests . request ( "POST" , url, headers = headers, data = payload)
print (response.text)
Copy 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" : "Mastercard" ,
"card_currency" : "USD" ,
"card_limit" : "500000" || "1000000" ,
"transaction_reference" : "" ,
"funding_amount" : "300" ,
"pin" : "39sksksie3902023020dj03020203039" ,
"meta_data" : {
"user_id" : "d0658fedf828420786e4a7083fa"
}
})
};
request (options , function (error , response) {
if (error) throw new Error (error);
console .log ( response .body);
});
Copy <? 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": "Mastercard",\n "card_currency": "USD",\n "card_limit": "500000" || "1000000",\n "pin" : "39sksksie3902023020dj03020203039",\n "funding_amount": "300",\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 () ;
}
Copy 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": "Mastercard",
"card_currency": "USD",
"card_limit": "500000" || "1000000",
"funding_amount": "300",
"transaction_reference":"",
"pin" : "39sksksie3902023020dj03020203039",
"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))
}
Body
Copy cardholder_id : String *required
Copy card_type (can either be "virtual" or "physical") : String *required
Copy card_brand (can either be "Mastercard") : String *required
Copy card_currency (can either be "USD") : String *required
Copy card_limit (can either be $5,000 i.e "500000" or $10,000 i.e "1000000") : String *required
Copy transaction_reference: *Optional
Copy funding_amount (a minimum of $3 i.e "300" for cards with a spending limit of $5,000 and $4 i.e "400" for a card with a spending limit of $10,000) : String *required
Copy pin (AES 256 encrypted 4 digit pin): string *required
Copy meta_data : Dictionary *Optional
Response🟢 200 : card creation is successful.
Copy {
"status": "success",
"message": "The Mastercard USD card was created successfully",
"data": {
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"currency": "USD"
}
}
🔴 400: Invalid Cardholder ID
Copy {
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 401: Cardholder has been deactivated
Copy {
"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
Copy {
"message": "This cardholder has not had their ID verified yet and so cannot be issued a card."
}
🔴 401: Insufficient balance in your issuing wallet
Copy {
"message": "Please top up your USD issuing wallet, you have insufficient balance to perform this operation"
}
🔴 400: The requested card type is currently unavailable
Copy {
"message": "This card type is currently unavailable, but we're working on it."
}
🔴 504: We ran into an error creating the card
Copy {
"message": "We ran into an error running this operation, please try again."
}
Activate Physical Dollar Card
Note: Only for physical USD cards.
Use this endpoint to activate a physical card for a verified cardholder.
cURL Python Nodejs PHP Go
Copy 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": "Mastercard",
"card_currency": "USD",
"card_token_number": "37383839939030",
"meta_data": {}
}'
Copy 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" : "Mastercard" ,
"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)
Copy 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" : "Mastercard" ,
"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
Copy < ?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": "Mastercard",\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 () ;
}
Copy 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": "Mastercard",
"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))
}
Body
Copy cardholder_id : String *required
Copy card_type (can either be "virtual" or "physical") : String *required
Copy card_brand (can either be "Mastercard") : String *required
Copy card_currency (can either be "USD") : String *required
Copy card_token_number: 13 digit number attached to card envelope.
Copy meta_data : Dictionary *Optional
Response🟢 200 : card creation is in done, listen to the webhook event
Copy {
"status": "success",
"message": "The Mastercard USD card creation is currently being processed, please listen to the webhook notification.",
"data": {
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"currency": "USD"
}
}
🔴 400: Invalid Cardholder ID
Copy {
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 401: Cardholder has been deactivated
Copy {
"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
Copy {
"message": "This cardholder has not had their ID verified yet and so cannot be issued a card."
}
🔴 401: Insufficient balance in your issuing wallet
Copy {
"message": "Please top up your USD issuing wallet, you have insufficient balance to perform this operation"
}
🔴 400: The requested card type is currently unavailable
Copy {
"message": "This card type is currently unavailable, but we're working on it."
}
🔴 504: We ran into an error creating the card
Copy {
"message": "We ran into an error running this operation, please try again."
}
Get card details
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.
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
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
We rate limit this endpoint once every 3 seconds for a specific card_id(get_card_details)
cURL Python Nodejs PHP Go
Copy curl --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_details?card_id=216ef11a58bf468baeb9cdbb97777777' \
--header 'token: Bearer *****' \
--data-raw ''
Copy 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)
Copy 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);
});
Copy <? 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 () ;
}
Copy 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))
}
Response🟢 200: card details fetched successfully.
Copy {
"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": "Mastercard",
"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,
"is_deleted": false,
"issuing_app_id": "842352f4-8a6f-4a19-89c6-4e8a240a2355",
"last_4": "8649",
"livemode": false,
"meta_data": {
"user_id": "d0658fedf8284207866d961e4a7083fa"
},
"balance": "900",
"available_balance": "600",
"book_balance": "900"
"blocked_due_to_fraud": false,
"pin_3ds_activated": true
}
}
🔴 400: Invalid card ID
Copy {
"message": "Invalid card ID, there's no card with this ID."
}
🔴 504: We ran into an error creating the card
Copy {
"message": "We ran into an error running this operation, please try again."
Get card balance
Use this API to fetch the balance of a card. We provide you with 3 balances for each card when you call this API.
A. Balance: This is the total amount on a card, which includes the maintenance fee held and the amount available to spend for transactions.
B. Book Balance: This balance is the same as the "BALANCE" field explained above.
c. Available Balance: This is the total amount available for the user to spend and also unload from their card, it's the "BALANCE" minus the card's monthly maintenance fee held.
We rate limit this endpoint once every 3 seconds for a specific card_id(get_card_balance)
cURL Python Nodejs PHP Go
Copy curl --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_balance?card_id=216ef11a999f468baeb9cdbb94765865' \
--header 'token: Bearer *****' \
--data-raw ''
Copy 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)
Copy 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);
});
Copy <? 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 () ;
}
Copy 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))
}
Response🟢 200: card balance fetched successfully.
Copy {
"status": "success",
"message": "Card balance was fetched successfully",
"data": {
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"balance": "900",
"settled_available_balance": "800",
"settled_book_balance": "900"
}
}
🔴 400: Invalid Cardholder ID
Copy {
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 504: We ran into an error fetching card balance
Copy {
"message": "We ran into an error running this operation, please try again."
Fund card
You can use this endpoint to fund a card.
PS: In the sandbox environment, you'll need to fund your sandbox-issuing wallet before you can 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.
We rate limit this endpoint once every 5 mins for a specific card_id(fund_card)
cURL Python Nodejs PHP Go
Copy 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"
}'
Copy 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)
Copy 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);
});
Copy <? 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 () ;
}
Copy 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))
}
Body
Copy card_id : String *required
Copy amount(in cents) : String *required
Copy transaction_reference (must be unique) : String *required
Copy currency: can be either "USD" String *required
Response🟡 202: card funding in progress.
Copy {
"status": "success",
"message": "Card funding in progress",
"data": {
"card_id": "216ef11a58bf468baeb9cdbb94765865",
"transaction_reference": "216ef11a58bf468baeb9cdbb94765865"
}
}
You'll have to listen to the success or failed webhook event to know if the card was successfully funded.
🔴 420: Funding rate limit exceeded
Copy {
"message": "You can only fund a card once every 5 minutes, please try again later."
}
🔴 400: Invalid Cardholder ID
Copy {
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 400: Funding Limit Exceeded
Copy {
"message": "This card can only hold a maximum balance of 5000 USD at a time."
}
🔴 400: Transaction reference already exists
Copy {
"message": "This transaction reference exists please enter another reference"
}
🔴 401: Insufficient balance in your issuing wallet
Copy {
"message": "Please top up your USD issuing wallet, you have insufficient balance to perform this operation"
}
🔴 504: We ran into an error funding the card
Copy {
"message": "We ran into an error running this operation, please try again.
Unload a card
This endpoint allows you to withdraw funds from a card.
We rate limit this endpoint once every 5 mins for a specific card_id(unload_card)
cURL Python Nodejs PHP Go
Copy curl --location --request PATCH 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/unload_card_asynchronously' \
--header 'token: Bearer ****' \
--header 'Content-Type: application/json' \
--data-raw '{
"card_id": "216ef11a58bf468baeb9cdbb965",
"amount": "0",
"transaction_reference": "216ef11a58bf468baeb9cdbb965",
"currency": "USD"
}'
Copy import requests
import json
url = "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/unload_card_asynchronously"
payload = json . dumps ({
"card_id" : "216ef11a58bf468baeb9cdbb965" ,
"amount" : "0" ,
"transaction_reference" : "216ef11a58bf468baeb9cdbb965" ,
"currency" : "USD"
})
headers = {
'token' : 'Bearer *****' ,
'Content-Type' : 'application/json'
}
response = requests . request ( "PATCH" , url, headers = headers, data = payload)
print (response.text)
Copy var request = require ( 'request' );
var options = {
'method' : 'PATCH' ,
'url' : 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/unload_card_asynchronously' ,
'headers' : {
'token' : 'Bearer *****' ,
'Content-Type' : 'application/json'
} ,
body : JSON .stringify ({
"card_id" : "216ef11a58bf468baeb9cdbb94765865" ,
"amount" : "0" ,
"transaction_reference" : "216ef11a58bf468baeb9cdbb94765111" ,
"currency" : "USD"
})
};
request (options , function (error , response) {
if (error) throw new Error (error);
console .log ( response .body);
});
Copy <? php
require_once 'HTTP/Request2.php' ;
$request = new HTTP_Request2 ();
$request -> setUrl ( 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/unload_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": "216ef11a58bf468baeb9cdbb999030",\n "amount": "0",\n "transaction_reference": "216ef11a58bf468baeb9cdbb94765111",\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 () ;
}
Copy package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main () {
url := "https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/unload_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))
}
Body
Copy card_id : String *required
Copy amount(in cents) : String *required
Copy transaction_reference (must be unique) : String *required
Copy currency: can be either "USD" or "NGN" String *required
Response🟡 202: card unloading in progress.
Copy {
"status": "success",
"message": "Card unloading in progress",
"data": {
"card_id": "b7fc2c83e96144489bdffa1f2249e2ff",
"transaction_reference": "b7fc2c83e96144489bdffa1f2249e2ff0000111999111"
}
}
You'll have to listen to the success or failed webhook event to know if the card was successfully funded.
🔴 420: Withdrawal rate limit exceeded
Copy {
"message": "You can only withdraw from a card once every 5 minutes, please try again later."
}
🔴 400: Invalid Cardholder ID
Copy {
"message": "Invalid cardholder ID, there's no cardholder with this ID."
}
🔴 400: Transaction reference already exists
Copy {
"message": "This transaction reference exists please enter another reference"
}
🔴 401: Insufficient balance on the card
Copy {
"message": "This card doesn\'t have enough funds to sufficient balance to perform this operation"
}
🔴 504: We ran into an error unloading the card