Transactions
The TransactionService
handles transaction history and real-time updates for card transactions.
Methods:
Method | Description | Corresponding API call |
---|---|---|
getCardTransactions( page: number, size: number ) | Fetch card transactions | Get card transactions |
subscribeToTransactionChanges(callback) | Subscribe to transaction change events | Transaction 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);
});
Updated 4 months ago
What’s Next