Cards

The CardService allows you to manage cards, including blocking, unblocking, activating, and setting limits.

Methods:

MethodDescriptionCorresponding API call
getCards(page: number, size: number)List all cardsGet cards
createPlasticCard(request: CreatePlasticCardRequest)Issue a new plastic cardIssue plastic card
createVirtualCard()Issue a new virtual cardIssue virtual card
activateCard(cardId: string, request: ActivateCardRequest)Activate a cardActivate card
blockCard(cardId: string)Block a cardBlock card
unblockCard(cardId: string)Unblock a cardUnblock card
closeCard(cardId: string)Close a cardClose card
setCardLimit(cardId, request: SetCardLimitRequest)Set card spending limitSet card limit
setActiveBalance(cardId: string, tokenAddress: string)Set active balance for cardSet card limit
getCardCvv(cardId: string, actionToken: string)Retrieve card CVVGet CVV
getCardPin(cardId: string, actionToken: string)Retrieve card PINGet PIN
getCardDetails(cardId: string, actionToken: string)Retrieve full card detailsGet details
subscribeToCardsChange(callback)Subscribe to cards change eventsNew card webhook Card change webhook

Usage Examples:

Fetching cards

WirexPay.card.getCards(1, 10)
  .then(response => console.log('Cards list:', response))
  .catch(error => console.error('Error:', error));

Setting Card Spending Limit

WirexPay.card.setCardLimit('card123', { limit: 5000 })
  .then(() => console.log('Limit set successfully'))
  .catch(error => console.error('Error setting limit:', error));

Subscribing to Cards Changes

WirexPay.card.subscribeToCardsChange((cards) => {
  console.log('Updated cards array', cards);
});

What’s Next