Virtual Cards

Bitnob’s Virtual Cards API allows you to programmatically issue and manage USD-denominated virtual debit cards for users. These cards can be used for online purchases, subscriptions, and other payments just like physical debit cards.

Card API Endpoints

Create Card

Issue a new virtual or physical card for a customer. The card is created in an active state and can be used immediately after funding.

Create Card

Create Card Body Parameters
1
customer_idstringRequired

Customer ID to issue the card for. The customer must exist in your Bitnob account.

2
card_typestringRequired

The type of card to issue. Accepted values are virtual or physical.

3
card_brandstringRequired

The card network brand. Accepted values are visa or mastercard.

4
currencystringRequired

The currency denomination for the card (e.g., USD, NGN). All transactions on the card will be settled in this currency.

5
billing_addressobjectRequired

The billing address associated with the cardholder.

6
billing_address.line1stringRequired

Primary street address line (e.g., house number and street name).

7
billing_address.line2string

Secondary address line for additional information such as suite or apartment number.

8
billing_address.citystringRequired

City of the billing address.

9
billing_address.statestringRequired

State or province of the billing address.

10
billing_address.postal_codestringRequired

Postal or ZIP code of the billing address.

11
billing_address.countrystringRequired

Two-letter ISO 3166-1 alpha-2 country code (e.g., NG, US, GB).

12
spending_limitsobject

Optional spending limits to apply to the card. Includes single_transaction, daily, weekly, and monthly limit fields.

13
metadataobject

Custom key-value pairs you can attach to the card for internal tracking (e.g., department, cost center).

Body Parameters

Response
1
idstring

Unique identifier for the newly created card.

2
company_idstring

Identifier of the company that owns this card.

3
customer_idstring

Identifier of the customer the card was issued to.

4
card_typestring

The type of card issued — virtual or physical.

5
card_brandstring

The card network brand — visa or mastercard.

6
last_fourstring

The last four digits of the card number.

7
currencystring

The currency denomination for the card.

8
statusstring

Current card status. Newly created cards are active.

9
balancestring

Current balance on the card. Starts at 0.00 upon creation.

10
spending_limitsobject

Applied spending limits including single_transaction, daily, weekly, and monthly caps.

11
billing_addressobject

The billing address associated with the card.

12
metadataobject

Custom key-value pairs attached to the card.

13
created_atstring

ISO 8601 timestamp of when the card was created.

14
updated_atstring

ISO 8601 timestamp of the last update to the card.

Response Body

Get Card

Retrieve the details of a specific card by its ID. This returns general card information including balance and status, but not sensitive card data like the full card number or CVV.

Get Card

Path Parameters
1
cardIdstringRequired

The unique identifier of the card to retrieve.

Note

The response is identical to that of Create Card. Refer to the Create Card Response section for field explanations.

Response Body

Get Card Details (Sensitive)

Retrieve sensitive card data including the full card number, CVV, and expiry date. This endpoint returns PCI-sensitive information and should be used with extreme care.

Security Warning

Only call this endpoint when absolutely necessary. Never log or store the full card number or CVV. Display card details securely in the UI and consider implementing additional verification (e.g., 2FA) before showing details to end users.

Get Card Details

Path Parameters
1
statusstringRequired

Indicates whether the API request was successful or failed.

2
messagestringRequired

A human-readable message describing the result of the request.

3
card_idstringRequired

The unique identifier of the card whose sensitive details are being retrieved.

4
card_numberstringRequired

The full card number associated with the card. This is PCI-sensitive information and must be handled securely.

5
cvvstringRequired

The card verification value used for additional security during transactions.

6
expiry_monthstringRequired

The expiration month of the card.

7
expiry_yearstringRequired

The expiration year of the card.

8
cardholder_namestringRequired

The name printed on the card.

9
line1stringRequired

Primary street address for the cardholder.

10
line2stringOptional

Additional address details such as apartment or suite number.

11
citystringRequired

City of the cardholder's billing address.

12
statestringRequired

State or region of the billing address.

13
postal_codestringRequired

Postal or ZIP code for the billing address.

14
countrystringRequired

Two-letter country code representing the country of the billing address (ISO 3166-1 alpha-2).

Response Body

List Cards

Retrieve a paginated list of all cards. Use query parameters to filter by status, type, or customer.

List Cards

Query Parameters
1
statusstring

Filter cards by their current status (e.g., active, frozen, terminated).

2
card_typestring

Filter by card type. Accepted values are virtual or physical.

3
customer_idstring

Filter cards belonging to a specific customer.

4
limitinteger

Number of results to return per page. Defaults to 20, maximum 100.

5
offsetinteger

Number of results to skip before returning records. Used for pagination. Defaults to 0.

Response Body

Fund Card

Add funds to a card's balance. The currency must match the card's denominated currency.

Fund Card

Path Parameters
1
cardIdstringRequired

The unique identifier of the card to fund.

Body Parameters
1
amountstringRequired

The amount to add to the card balance as a decimal string (e.g., "500.00").

2
currencystringRequired

Currency code for the funding operation. Must match the card's currency.

3
descriptionstring

A human-readable description for this funding transaction.

4
referencestring

Your internal reference identifier for this transaction. Used for idempotency and reconciliation.

Body Parameters

Response
1
card_idstring

Identifier of the card that was funded.

2
operationstring

The operation type. Value is fund for this endpoint.

3
amountstring

The amount that was added to the card balance.

4
currencystring

Currency code of the funding operation.

5
new_balancestring

The updated card balance after the funding operation.

6
transaction_idstring

Unique identifier for this funding transaction.

7
referencestring

The reference identifier provided in the request.

8
created_atstring

ISO 8601 timestamp of when the funding transaction was created.

Response Body

Withdraw from Card

Remove funds from a card's balance back to your account. Useful for reclaiming unused funds or adjusting card balances.

Withdraw from Card

Path Parameters
1
cardIdstringRequired

The unique identifier of the card to withdraw funds from.

Body Parameters
1
amountstringRequired

The amount to withdraw from the card balance as a decimal string (e.g., "200.00").

2
currencystringRequired

Currency code for the withdrawal. Must match the card's currency.

3
descriptionstring

A human-readable description for this withdrawal transaction.

4
referencestring

Your internal reference identifier for this transaction.

Body Parameters

Response
Note

The response is identical to that of Fund Card. Refer to the Fund Card Response section for field explanations.

Response Body

Freeze Card

Temporarily suspend a card to prevent any new transactions. The card can be unfrozen later to restore its active state. Useful for responding to suspected fraud or temporary suspension needs.

Freeze Card

Path Parameters
1
cardIdstringRequired

The unique identifier of the card to freeze.

Body Parameters
1
reasonstring

An optional reason for freezing the card. Stored for audit purposes.

Body Parameters

Response
1
card_idstring

Identifier of the card that was frozen.

2
statusstring

Updated card status. Value is frozen after this operation.

3
frozen_atstring

ISO 8601 timestamp of when the card was frozen.

4
reasonstring

The reason provided for freezing the card, if supplied.

Response Body

Unfreeze Card

Restore a frozen card to an active state, allowing it to process new transactions again. No request body is required.

Unfreeze Card

Path Parameters
1
statusstringRequired

Indicates whether the request to unfreeze the card was successful or not.

2
messagestringRequired

A human-readable message describing the result of the request.

3
card_idstringRequired

The unique identifier of the card that has been successfully unfrozen.

4
statusstringRequired

The current status of the card after the operation. In this case, it will be set to active.

5
unfrozen_atstringRequired

The date and time the card was unfrozen, returned in ISO 8601 format.

Response Body

Terminate Card

Permanently terminate a card. This action is irreversible. Any remaining balance on the card will be returned to your account.

Terminate Card

Path Parameters
1
cardIdstringRequired

The unique identifier of the card to terminate.

Body Parameters
1
reasonstring

An optional reason for terminating the card. Stored for audit and compliance purposes.

Body Parameters

Response
1
card_idstring

Identifier of the card that was terminated.

2
statusstring

Updated card status. Value is terminated after this operation.

3
remaining_balancestring

The balance that was on the card at the time of termination.

4
balance_returnedboolean

Indicates whether the remaining balance was returned to your account.

5
terminated_atstring

ISO 8601 timestamp of when the card was terminated.

6
reasonstring

The reason provided for terminating the card, if supplied.

Response Body

Update Spending Limits

Update the spending limits and merchant restrictions on a card. All fields are optional — only the fields you include will be updated.

Update Spending Limits

Path Parameters
1
cardIdstringRequired

The unique identifier of the card whose spending limits are being updated.

Body Parameters
1
single_transactionstring

Maximum amount allowed per individual transaction as a decimal string.

2
dailystring

Maximum total spending allowed per day as a decimal string.

3
weeklystring

Maximum total spending allowed per week as a decimal string.

4
monthlystring

Maximum total spending allowed per month as a decimal string.

5
allowed_categoriesarray

List of allowed MCC (Merchant Category Code) categories. Transactions at merchants outside these categories will be declined.

6
blocked_categoriesarray

List of blocked MCC categories. Transactions at merchants in these categories will be declined.

7
allowed_merchantsarray

Whitelist of specific merchant IDs. When set, only transactions at these merchants are allowed.

8
blocked_merchantsarray

Blacklist of specific merchant IDs. Transactions at these merchants will be declined.

Body Parameters

Response
1
card_idstring

Identifier of the card whose spending limits were updated.

2
operationstring

The operation type. Value is update_spending_limits for this endpoint.

3
spending_limitsobject

The full set of updated spending limits, including single_transaction, daily, weekly, monthly, allowed_categories, blocked_categories, allowed_merchants, and blocked_merchants.

4
updated_atstring

ISO 8601 timestamp of when the spending limits were last updated.

Response Body

Get Cards by Customer

Retrieve all cards belonging to a specific customer.

Get Cards by Customer

Path Parameters
1
statusstringRequired

Indicates whether the API request was successful or failed.

2
messagestringRequired

A human-readable message describing the result of the request.

3
cardsarrayRequired

A list of cards associated with the specified customer.

4
idstringRequired

The unique identifier of the card.

5
customer_idstringRequired

The unique identifier of the customer who owns the card.

6
card_typestringRequired

The type of card issued to the customer (e.g., virtual or physical).

7
card_brandstringRequired

The card network brand associated with the card (e.g., Visa or Mastercard).

8
last_fourstringRequired

The last four digits of the card number used for identification.

9
currencystringRequired

The currency the card operates in.

10
statusstringRequired

The current status of the card (e.g., active, inactive, blocked).

11
balancestringRequired

The current available balance on the card.

12
created_atstringRequired

The date and time when the card was created, returned in ISO 8601 format.

13
totalnumberRequired

The total number of cards returned in the response.

Response Body

Did you find this page useful?