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

{
    "message": "We ran into an error running this operation, please try again.
}

Mock a debit transaction

You can use this endpoint to create a debit transaction on a card in the sandbox environment to see how a purchase will look.

curl --location --request PATCH 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/mock_debit_transaction' \
--header 'token: Bearer ****' \
--header 'Content-Type: application/json' \
--data-raw '{
    "card_id": "216ef11a58bf468baeb9cdbb965"
}'
Body
card_id : String *required
Response

🟢 200: card was funded successfully.

{
    "status": "success",
    "message": "Debit transaction was done Successfully",
    "data": {
        "card_id": "216ef11a58bf468baeb9cdbb94765865",
        "transaction_reference": "216ef11a58bf468baeb9cdbb94765865"
    }
}

🔴 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

{
    "message": "We ran into an error running this operation, please try again.
}

Get card transactions

Use this endpoint to get all the transactions on a card.

Please note that all transactions are reported in the GMT time zone and you'll need to convert it to your own time zone if this is not your time zone.

curl --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_transactions?card_id=70b34986c13c4026a9c1607e27eabc49&page=1' \
--header 'token: Bearer *****' \
--data-raw ''
Body

We allow you query this endpoint with some options.

card_id: The id of the card you want to pull transactions for *this field is compulsory
page: Transactions from this endpoint are paginated and each page contains at least 20 transactions *this field is compulsory
start_date (format 2023-03-01 12:10:00): Allows you to limit the transaction to a particular start date #this field is optional but you must always send it with an end_date param.
end_date (format 2023-03-01 12:10:00): Allows you to limit the transaction to a particular end date #this field is optional but you must always send it with a start_date param.
Response

🟢 200: card transactions fetched successfully.

{
    "status": "success",
    "message": "Card transaction history was fetched successfully",
    "data": {
        "transactions": [
            {
                "amount": "0",
                "bridgecard_transaction_reference": "7832a4d6371e4643aba4aa1f3c7030ab",
                "card_id": "70b34986c13c4026a9c1607e27eabc49",
                "card_transaction_type": "DEBIT",
                "cardholder_id": "d0658fedf8284207866d961e4a7083fa",
                "client_transaction_reference": "5c3598c8152446ba8093d058d8b59a1e",
                "currency": "USD",
                "description": "Apple Inc. US",
                "issuing_app_id": "842352f4-8a6f-4a19-89c6-4e8a240a2355",
                "livemode": false,
                "transaction_date": "2022-08-08 02:48:15",
                "transaction_timestamp": 1659923295,
                "merchant_category_code": "123478" || can be None,
                "enriched_data": {
                    "is_recurring": true,
                    "merchant_city": "California",
                    "merchant_code": "123478",
                    "merchant_logo": "https://logos.ntropy.com/apple.com",
                    "merchant_name": "Apple",
                    "merchant_website": "apple.com",
                    "transaction_category": "Others",
                    "transaction_group": "Other Outgoing Transactions"
                },
                "partner_interchange_fee": "100",
                "interchange_revenue": "100",
                "partner_interchange_fee_refund": "100",
                "interchange_revenue_refund": "100"
            },
            {
                "amount": "100",
                "bridgecard_transaction_reference": "370a5e491c20434dbb7dccdf1fafb9d2",
                "card_id": "70b34986c13c4026a9c1607e27eabc49",
                "card_transaction_type": "CREDIT",
                "cardholder_id": "d0658fedf8284207866d961e4a7083fa",
                "client_transaction_reference": "0906c4b453a745b8abbcf8b77b846ddd",
                "currency": "USD",
                "description": "Virtual dollar card funding",
                "issuing_app_id": "842352f4-8a6f-4a19-89c6-4e8a240a2355",
                "livemode": false,
                "transaction_date": "2022-08-08 02:17:14",
                "transaction_timestamp": 1659921434,
                "enriched_data": {
                    "is_recurring": false,
                    "merchant_city": None,
                    "merchant_code": None,
                    "merchant_logo": "https://logos.ntropy.com/consumer_icons-ATM_bank_deposit",
                    "merchant_name": None,
                    "merchant_website": None,
                    "transaction_category": None,
                    "transaction_group": "Other Incoming Transactions"
                }
            }
        ],
        "meta": {
            "total": 2,
            "pages": 1,
            "previous": null,
            "next": "http://api.bridgecard.co/v1/issuing/cards/sandbox/get_card_transactions?card_id=70b34986c13c4026a9c1607e9&page=2"
        }
    }
}

🔴 400: Invalid card ID

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

We provide transaction enrichment for all card transactions, you can use this feature to improve the user experience on your app. Read more here.

We rate limit this endpoint once every 3 seconds for a specific card_id and a unique page(get_card_transaction_history)

Get card transaction by transaction ID

You can use this endpoint to get a specific transaction by the client_transaction_reference from a list of transactions on a card. If the transaction reference originates from Bridgecard (for example in the case of a debit transactions), you can use the bridgecard_transaction_reference instead.

curl --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_transaction_by_id?card_id=70b34986c13c4026a9c1607e27eabc49&client_transaction_reference=a7887279b' \
--header 'token: Bearer *****' \
--data-raw ''
Response

🟢 200: card transactions fetched successfully.

{
    "status": "success",
    "message": "Card transaction history was fetched successfully",
    "data": {
                "amount": "0",
                "bridgecard_transaction_reference": "7832a4d6371e4643aba4aa1f3c7030ab",
                "card_id": "70b34986c13c4026a9c1607e27eabc49",
                "card_transaction_type": "DEBIT",
                "cardholder_id": "d0658fedf8284207866d961e4a7083fa",
                "client_transaction_reference": "5c3598c8152446ba8093d058d8b59a1e",
                "currency": "USD",
                "description": "Apple Inc. US",
                "issuing_app_id": "842352f4-8a6f-4a19-89c6-4e8a240a2355",
                "livemode": false,
                "transaction_date": "2022-08-08 02:48:15",
                "transaction_timestamp": 1659923295,
                "merchant_category_code": "123478" || can be None
        }
    }
}

🔴 400: Invalid card ID

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

}

Get card transaction status

You can use this endpoint to verify the status of a transaction whether funding or unloading. This way you can know if the transaction is still pending or is successful.

curl --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_card_transaction_status?card_id=70b34986c13c4026a9c1607e27eabc49&client_transaction_reference=a7887279b' \
--header 'token: Bearer *****' \
--data-raw ''
Response

🟢 200: Transaction is still pending.

{
  "status": "success",
  "message": "Transaction status fetched successfully",
  "data": {
    "transaction_status": "PENDING"
  }
}

🟢 200: Transaction is successful.

{
  "status": "success",
  "message": "Transaction status fetched successfully",
  "data": {
    "transaction_status": "SUCCESSFUL"
  }
}

🔴 400: Invalid card ID

{
    "message": "Invalid transaction ID, there's no transaction with this ID or this transaction might have failed previously."

}

Freeze card

This endpoint allows your users to freeze their card. After freezing a card the is_active field in the get card details endpoint is immediately updated to False.

curl --location --request PATCH 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/freeze_card?card_id=3d0220250f6b4addbfef1c5ffa39250b' \
--header 'token: Bearer *****' \
--data-raw ''
Response

🟢 200: card was frozen successfully.

{
    "status": "success",
    "message": "This card has been frozen successfully",
    "data": {
        "card_id": "3d0220250f6b4addbfef1c5ffa39250b"
    }
}

🔴 400: Invalid Cardholder ID

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

🔴 504: We ran into an error unfreezing the card

{
    "message": "We ran into an error running this operation, please try again."
}

Unfreeze card

This endpoint allows your users to unfreeze their card. When you unfreeze a card the is_active field in the get card details endpoint is immediately updated to True.

curl --location --request PATCH 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/unfreeze_card?card_id=3d0220250f6b4addbfef1c5ffa39250b' \
--header 'token: Bearer *****' \
--data-raw ''
Response

🟢 200: card was unfrozen successfully.

{
    "status": "success",
    "message": "This card has been unfrozen successfully",
    "data": {
        "card_id": "3d0220250f6b4addbfef1c5ffa39250b"
    }
}

🔴 400: Invalid Cardholder ID

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

🔴 504: We ran into an error unfreezing the card

{
    "message": "We ran into an error running this operation, please try again."
}

Get all cardholder cards

This endpoint returns all the cards assigned to a cardholder in a list.

curl --location --request GET 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/get_all_cardholder_cards?cardholder_id=d0658fedf82861e4a7083fa' \
--header 'token: Bearer *****' \
--data-raw ''
Response

🟢 200: All the cards the cardholder has have been fetched successfully.

{
    "status": "success",
    "message": "All the cards for this cardholder have been fetched successfully",
    "data": {
        "cards": [
            {
                "billing_address": {
                    "billing_address1": "256 Chapman Road STE 105-4",
                    "billing_city": "Newark",
                    "billing_country": "US",
                    "billing_zip_code": "19702",
                    "country_code": "US"
                },
                "brand": "Mastercard",
                "card_currency": "USD",
                "card_id": "5334986c13c4026a9c160eabc49",
                "card_name": "John Doe",
                "card_number": "ev:RFVC:/k2ywhfd6puozkZx:A23n3EoM5dZwHG24zaS+meBBIbgJ03OCfO6GnFSPl5tS:1BLgOZHre56P9DPkhqHJJaifHnlvzGzQ5sSrn+xWcT8:$",
                "card_type": "virtual",
                "cardholder_id": "d0658fedf828420761e4a7083fa",
                "created_at": 1659826136,
                "cvv": "ev:RFVC:5ek3QdaiLFvaL4md:A23n3EoM5dZwHG24zaS+meBBIbgJ03OCfO6GnFSPl5tS:aI3XxL+A54ZITT9/zPjV11J0yA:$",
                "expiry_month": "ev:RFVC:gDwn8Kqsg9rmVSeK:A23n3EoM5dZwHG24zaS+meBBIbgJ03OCfO6GnFSPl5tS:QpMwLxi1g+uVpB88+XKtg6Dp:$",
                "expiry_year": "ev:RFVC:bOzx6EkH6brriobW:A23n3EoM5dZwHG24zaS+meBBIbgJ03OCfO6GnFSPl5tS:mKtDnYDJ9pdoa2Pz01gl4qEDLB4:$",
                "is_active": true,
                "issuing_app_id": "842352f4-8a6f-4a19-89c6-40a2355",
                "last_4": "8623",
                "livemode": false
            },
            
            {
                "billing_address": {
                    "billing_address1": "256 Chapman Road STE 105-4",
                    "billing_city": "Newark",
                    "billing_country": "US",
                    "billing_zip_code": "19702",
                    "country_code": "US"
                },
                "brand": "Mastercard",
                "card_currency": "USD",
                "card_id": "216ef11a58bf468bdbb94765865",
                "card_name": "John Doe",
                "card_number": "ev:RFVC:x9Fyh+9rI0BekZ5i:AgQHRjIQa7BzqhGXYuZwV/lXqiTb8Uq07nBYWWbuu46I:XXbJWyrBwDicifdA3exFewXRLSnR71whuMYKMhj5FVA:$",
                "card_type": "virtual",
                "cardholder_id": "d0658fedf828420761e4a7083fa",
                "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-40a2355",
                "last_4": "8649",
                "livemode": false
            }
        ],
        "total": 2
    }
}

🔴 400: Invalid Cardholder ID

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

Delete a card

This endpoint allows you to delete a card and unassign it from a cardholder. Please note that before you delete a card you'll need to unload the card first so that you don't lose the funds on the card.

curl --location --request DELETE 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/delete_card/44faae6059834696b2ad9eecc94ca955' \
--header 'accept: application/json' \
--header 'token: Bearer at_live_***'
Response

🟢 200: card was deleted successfully.

{
    "status": "success",
    "message": "This card has been deleted successfully",
    "data": {}
}

🔴 400: Invalid Cardholder ID

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

🔴 504: We ran into an error unfreezing the card

{
    "message": "We ran into an error running this operation, please try again."
}

Migrate a card

This endpoint allows you to migrate a card across our supported card brands i.e from Visa to Mastercard. We automatically default your users card pin to the 7th to 10th characters of your their card number if you don't send a PIN field in the API call.

curl --location --request POST 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/migrate_card' \
--header 'token: Bearer *****' \
--header 'Content-Type: application/json' \
--data-raw '{
  "cardholder_id": "d0658fedf8284207866d96183fa",
  "card_id": "d0658feddddf8284207866d96183fa",
  "card_type": "virtual" || "physical",
  "target_card_brand": "Mastercard",
  "target_card_currency": "USD",
  "card_limit": "500000" || "1000000",
  "pin" : "39sksksie3902023020dj03020203039",
}'
Body
  • cardholder_id : String *required

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

  • target_card_brand (which is "Mastercard") : String *required

  • target_card_currency (can either be "USD" or "NGN") : String *required
  • card_limit (can either be $5,000 i.e "500000" or $10,000 i.e "1000000") : String *required
  • pin (AES 256 encrypted 4 digit pin): string *required
  • card_id : String *required
Response

🟢 201 : The card migration request is currently processing and you will be notified via webhook

{
  "status": "success",
  "message": "The card migration request is currently processing and you will be notified via webhook.",
  "data": {}
}

Update card pin

Use this endpoint to update the card pin, incase the user wants to change their pin at creation or if they forget it. The card pin should be encrypted before calling this API, we use an open-source package called AES-Anywhere for this. See Examples Below

$ pip install aes-everywhere

from AesEverywhere import aes256

# encryption
encrypted = aes256.encrypt('3d secure pin', 'Bridgecard Secret Key')
encrypted = encrypted.decode()
print(encrypted)

Then use the encrypted details to call the API below

curl --location --request POST 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/update_card_pin' \
--header 'token: Bearer *****' \
--header 'Content-Type: application/json' \
--data-raw '{
  "card_id": "8389303030030c460e9250",
  "card_pin": "encrypted pin"
}'
Body
  • card_id : String *required
  • card_pin :  4 digits number *required
Response

🟢 201 : 3d secure pin has been updated

{
  "status": "success",
  "message": "The card pin for this card has been updated successfully",
  "data": {}
}

🔴 400: Invalid Card ID

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

Managing Declines

A card that has up to 15 consecutive declines due to insufficient balance, would be deleted on the 15th decline. For each of the declines, we will send you this webhook event and the decline reason (decline_reason). In the case of these transactions will be "Insufficient balance to pay the merchant charge and transaction fee for this transaction, please top up your card and try again." If a card ends up being deleted because it violated this rule, you'll get this webhook event and the number of declines will reset every time the user funds the card.

A card that has a negative balance and another merchant or the same merchant processes another negative transaction to that same card, that card would also be deleted as well. If a card ends up being deleted because it violated this rule, you'll get this webhook event.

Last updated