Naira Cards

All endpoints for Naira cards

This documentation explains how you can issue Naira cards (Mastercard) to your customers, your customers can make global payments worth $1,500 monthly using this card. We'll also be assuming that you have finished the integration process of creating a cardholder to continue this implementation.

Create Card

This API allows you to create an NGN virtual card for an already verified cardholder.

The card pin should be 4 digits and encrypted before passing it as a parameter to call the API to create a card, 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)

Then use the encrypted details to call the API below

curl -X 'POST' \
'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/cards/create_card' \
  -H 'accept: application/json' \
  -H 'token: Bearer ******' \
  -H 'Content-Type: application/json' \
  -d '{
  "cardholder_id": "d0658fedf8284207866d96183fa",
  "card_type": "virtual" || "physical",
  "card_brand": "Mastercard",
  "card_currency": "NGN",
  "pin" : "39sksksie3902023020dj03020203039",
  "nin": "22236748901",
  "meta_data": {"user_id": "d0658fedf828420786e4a7083fa"}
}'
Body
  • cardholder_id : string *required

Response

🟢 200

🔴 400: Invalid Cardholder ID

🔴 504: ErrorPerfromingOperation

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

Response

🟢 200: card details fetched successfully.

🔴 400: Invalid Cardholder ID

🔴 504: We ran into an error creating the card

Get Card Balance

This endpoint can be used to get the balance on the Naira card.

Response

🟢 200

🔴 400: Invalid Cardholder ID

🔴 504: ErrorPerfromingOperation

Get Transaction OTP

A merchant might trigger the 3DS process on a user's card when they try to make a purchase, by asking them to provide an OTP to confirm a transaction. This endpoint allows your users to generate an OTP for a pending amount on their card. All the user has to do is enter the amount and we'll provide them with an OTP if there's a pending transaction on the card for that amount.

The amount should be passed to the API in Kobo and to test the 400 error response you can pass 0 as the amount.

Use these endpoint URLs to fetch the OTP in order to ensure secure transmission of the OTP sandbox: https://issuecards-api-bridgecard-co.relay.evervault.com/v1/issuing/sandbox/naira_cards/get_otp_message

production: https://issuecards-api-bridgecard-co.relay.evervault.com/v1/issuing/naira_cards/get_otp_message

Response

🟢 200

🔴 400: No pending OTP

Fund Naira Card

This endpoint allows you to fund a naira Card from the NGN issuing wallet. Please listen to this webhook event to know whether the card funding was successful or failed.

Body
  • card_id: string *required

  • amount : string *required

  • transaction_reference : string *required

Response

🟢 202

🔴 504: ErrorPerfromingOperation

Unload Naira Card

This endpoint allows you to unload funds from a naira card and the funds go back into your NGN issuing wallet. Please listen to this webhook event to know whether the card funding was successful or failed.

Body
  • card_id: string *required

  • amount : string *required

  • transaction_reference : string *required

Response

🟢 202

🔴 504: ErrorPerfromingOperation

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

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 Card Transactions

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

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.

Last updated