USD Cards

All the APIs to issue and manage a card

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

$ pip install aes-everywhere

from AesEverywhere import aes256

# encryption
encrypted = aes256.encrypt('4 digit pin', 'Bridgecard Secret Key')
encrypted = encrypted.decode()
print(encrypted)

Now that you have the encrypted PIN you can go ahead to call the API below

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"}
}'
Body
  • cardholder_id : String *required
  • card_type (can either be "virtual" or "physical") : String *required 

  • card_brand (can either be "Mastercard") : String *required

  • card_currency (can either be "USD") : String *required
  • card_limit (can either be $5,000 i.e "500000" or $10,000 i.e "1000000") : String *required

  • transaction_reference: *Optional 
  • 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
  • pin (AES 256 encrypted 4 digit pin): string *required
  • meta_data : Dictionary *Optional
Response

🟢 200 : card creation is successful.

{
  "status": "success",
  "message": "The Mastercard 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."
}

Activate Physical Dollar Card

Note: Only for physical USD cards.

Use this endpoint to activate a physical card for a verified cardholder.

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": {}
}'
Body
  • cardholder_id : String *required

  • card_type (can either be "virtual" or "physical") : String *required 

  • card_brand (can either be "Mastercard") : String *required

  • card_currency (can either be "USD") : String *required

  • card_token_number: 13 digit number attached to card envelope.
  • meta_data : Dictionary *Optional
Response

🟢 200 : card creation is in done, listen to the webhook event

{
  "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

{
    "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."
}

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.

  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

  1. 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 --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_details?card_id=216ef11a58bf468baeb9cdbb97777777' \
--header 'token: Bearer *****' \
--data-raw ''
Response

🟢 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": "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

{
    "message": "Invalid card ID, there's no card with this ID."
}

🔴 504: We ran into an error creating the card

{
    "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 --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_balance?card_id=216ef11a999f468baeb9cdbb94765865' \
--header 'token: Bearer *****' \
--data-raw ''
Response

🟢 200: card balance fetched successfully.

{
    "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

{
    "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."

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 --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"
}'
Body
card_id : String *required
amount(in cents) : String *required
transaction_reference (must be unique) : String *required
currency: can be either "USD" String *required
Response

🟡 202: card funding in progress.

{
    "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

{
  "message": "You can only fund a card once every 5 minutes, please try again later."
}

🔴 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

{
    "message": "This transaction reference exists please enter another reference"
}

🔴 401: Insufficient balance in your issuing wallet

{
    "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

{
    "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 --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"
}'
Body
card_id : String *required
amount(in cents) : String *required
transaction_reference (must be unique) : String *required
currency: can be either "USD" or "NGN" String *required
Response

🟡 202: card unloading in progress.

{
  "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

{
  "message": "You can only withdraw from a card once every 5 minutes, please try again later."
}

🔴 400: Invalid Cardholder ID

{
    "message": "Invalid cardholder ID, there's no cardholder with this ID."
}

🔴 400: Transaction reference already exists

{
    "message": "This transaction reference exists please enter another reference"
}

🔴 401: Insufficient balance on the card

{
    "message": "This card doesn\'t have enough funds to sufficient balance to perform this operation"
}

🔴 504: We ran into an error unloading the card