@paysafe/paysafe-wallet-saas-web
    Preparing search index...

    Class TransactionHistoryService

    Service class for managing transaction history related operations.

    Hierarchy

    • ApiService
      • TransactionHistoryService
    Index

    Methods

    • Initiates the generation of transaction reports for a specified wallet account, based on criteria like date range, transaction types, and report format.

      Parameters

      Returns Promise<TransactionHistoryReportResponse>

      A promise which contains an ID of the export to be used to retrieve the exported data.

      If the HTTP request fails.

      // Example usage:
      transactionHistoryService.createTransactionsReport(parameters)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error creating a transaction history report request.`);
      });
    • Retrieves a previously generated transaction report using the provided reportId.

      Parameters

      • reportId: string

        ID of the report.

      Returns Promise<Blob>

      A promise which contains the retrieved exported data.

      If the HTTP request fails.

      // Example usage:
      transactionHistoryService.downloadTransactionsReport({reportId})
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error downloading transaction report.`);
      });
    • Retrieves a specific user transaction by ID.

      Parameters

      • transactionId: string

        The ID of the transaction to be retrieved.

      Returns Promise<Transaction>

      A promise that resolves to the specified user transaction.

      If the HTTP request fails.

      // Example usage:
      transactionHistoryService.getTransaction(transactionId)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error fetching transaction history.`);
      });
    • Retrieves a list of user transactions by accountId.

      Parameters

      Returns Promise<TransactionList>

      A promise that resolves to a transactions list.

      If the HTTP request fails.

      // Example usage:
      transactionHistoryService.getTransactionHistory({accountId})
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error fetching transaction history.`);
      });
    • Retrieves the status of previously requested transaction report using the provided reportId.

      Parameters

      • reportId: string

        ID of the report.

      Returns Promise<TransactionHistoryReportResponse>

      A promise which contains the status of the transaction history report.

      If the HTTP request fails.

      // Example usage:
      transactionHistoryService.getTransactionsReportStatus({reportId})
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error getting transaction report status.`);
      });
    • Function

      Retrieves the singleton instance of the TransactionHistoryService class.

      Returns TransactionHistoryService

      The singleton instance of the TransactionHistoryService class.

      // Usage:
      const transactionHistoryService = TransactionHistoryService.getInstance();