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

Body
Response

🟢 200 : card creation is successful.

🔴 400: Invalid Cardholder ID

🔴 401: Cardholder has been deactivated

🔴 401: Cardholder didn't pass ID verification and so can't be issued a card

🔴 401: Insufficient balance in your issuing wallet

🔴 400: The requested card type is currently unavailable

🔴 504: We ran into an error creating the card

Activate Physical Dollar Card

Note: Only for physical USD cards.

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

Body
Response

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

🔴 400: Invalid Cardholder ID

🔴 401: Cardholder has been deactivated

🔴 401: Cardholder didn't pass ID verification and so can't be issued a card

🔴 401: Insufficient balance in your issuing wallet

🔴 400: The requested card type is currently unavailable

🔴 504: We ran into an error creating the card

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)

Response

🟢 200: card details fetched successfully.

🔴 400: Invalid card ID

🔴 504: We ran into an error creating the card

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)

Response

🟢 200: card balance fetched successfully.

🔴 400: Invalid Cardholder ID

🔴 504: We ran into an error fetching card balance

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)

Body
Response

🟡 202: card funding in progress.

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

🔴 400: Invalid Cardholder ID

🔴 400: Funding Limit Exceeded

🔴 400: Transaction reference already exists

🔴 401: Insufficient balance in your issuing wallet

🔴 504: We ran into an error funding the card

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)

Body
Response

🟡 202: card unloading in progress.

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

🔴 400: Invalid Cardholder ID

🔴 400: Transaction reference already exists

🔴 401: Insufficient balance on the card

🔴 504: We ran into an error unloading the card

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.

Body
Response

🟢 200: card was funded successfully.

🔴 400: Invalid Cardholder ID

🔴 400: Transaction reference already exists

🔴 401: Insufficient balance on the card

🔴 504: We ran into an error unloading the card

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.

Body

We allow you query this endpoint with some options.

Response

🟢 200: card transactions fetched successfully.

🔴 400: Invalid card 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.

Response

🟢 200: card transactions fetched successfully.

🔴 400: Invalid card 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.

Response

🟢 200: Transaction is still pending.

🟢 200: Transaction is successful.

🔴 400: Invalid card ID

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.

Response

🟢 200: card was frozen successfully.

🔴 400: Invalid Cardholder ID

🔴 504: We ran into an error unfreezing the card

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.

Response

🟢 200: card was unfrozen successfully.

🔴 400: Invalid Cardholder ID

🔴 504: We ran into an error unfreezing the card

Get all cardholder cards

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

Response

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

🔴 400: Invalid Cardholder 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.

Response

🟢 200: card was deleted successfully.

🔴 400: Invalid Cardholder ID

🔴 504: We ran into an error unfreezing the card

Migrate a card (Deprecated )

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.

Body
Response

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

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

Then use the encrypted details to call the API below

Body
Response

🟢 201 : 3d secure pin has been updated

🔴 400: Invalid Card 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