Transactions

The TransactionService handles transaction history and real-time updates for card transactions.

Methods:

MethodDescriptionCorresponding API call
getCardTransactions( page: number, size: number )Fetch card transactionsGet card transactions
subscribeToTransactionChanges(callback)Subscribe to transaction change eventsTransaction change webhook New transaction webhook

Usage Examples:

Fetching Card Transactions

WirexPay.transaction.getCardTransactions(1, 10)
  .then(response => console.log('Transactions:', response))
  .catch(error => console.error('Error fetching transactions:', error));

Subscribing to Transaction Changes

WirexPay.transaction.subscribeToTransactionChanges((transactionsIds: string[]) => {
  console.log('Transaction changed:', transactionsIds);
});

What’s Next