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

    Class TransferService

    Service class for managing transfers related operations.

    Hierarchy

    • ApiService
      • TransferService
    Index

    Methods

    • Confirms a transfer for execution (processing state).

      Parameters

      Returns Promise<CustomerTransfer>

      A promise that resolve to the updated transfer.

      If the HTTP request fails.

      // Example usage:
      transferService.confirm(transferConfirm)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error processing transfer`);
      });
    • Requests a transfer creation (pending state).

      Parameters

      Returns Promise<CustomerTransfer>

      A promise that resolve to the updated transfer.

      If the HTTP request fails.

      // Example usage:
      transferService.create(transferCreate)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error creating transfer`);
      });
    • Retrieves an outbound transfer by id.

      Parameters

      • id: string

        The id of the transfer.

      Returns Promise<CustomerTransfer>

      A promise that resolves to a transfer.

      If the HTTP request fails.

      // Example usage:
      transferService.get(transferId)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error fetching transfer.`);
      });
    • Retrieves user outbound transfers with pagination metadata.

      Parameters

      Returns Promise<CustomerTransferList>

      A promise that resolves to a transfer list.

      If the HTTP request fails.

      // Example usage:
      transferService.getAll({ limit: 5 })
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error fetching transfers.`);
      });
    • Retrieves user inbound transfers with pagination metadata.

      Parameters

      Returns Promise<CustomerTransferList>

      A promise that resolves to a transfer list.

      If the HTTP request fails.

      // Example usage:
      transferService.getAllInbound({ limit: 5 })
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error fetching transfers.`);
      });
    • Retrieves an inbound transfer by id.

      Parameters

      • id: string

        The id of the transfer.

      Returns Promise<CustomerTransfer>

      A promise that resolves to a transfer.

      If the HTTP request fails.

      // Example usage:
      transferService.getInbound(transferId)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error fetching transfer.`);
      });
    • Creates a transfer preview.

      Parameters

      Returns Promise<CustomerTransfer>

      A promise that resolves to the newly created transfer preview.

      If the HTTP request fails.

      // Example usage:
      transferService.preview(transferPreviewRequest)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error creating transfer.`);
      });
    • Function

      Retrieves the singleton instance of the TransferService class.

      Returns TransferService

      The singleton instance of the TransferService class.

      // Usage:
      const transferService = TransferService.getInstance();