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

    Class WalletCheckoutService

    Hierarchy

    • ApiService
      • WalletCheckoutService
    Index

    Methods

    • Updates the status of an existing payment within a checkout session to 'CANCELLED'.

      Parameters

      Returns Promise<WalletCheckoutPaymentResponse>

      A promise that resolves to the payment cancellation for the specified session

      If the HTTP request fails.

      // Example usage:
      walletCheckoutService.cancelPayment(paymentCancel)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error cancelling payment.`);
      });
    • Updates the status of an existing payment within a checkout session to 'PROCESSING'. Supports optional SCA (Strong Customer Authentication) details for regulatory compliance.

      Parameters

      Returns Promise<WalletCheckoutPaymentResponse>

      A promise that resolves to the payment confirmation for the specified session

      If the HTTP request fails.

      // Example usage:
      walletCheckoutService.confirmPayment(paymentConfirm)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error confirming payment.`);
      });
    • Updates the status of an existing payment within a checkout session to 'PENDING'.

      Parameters

      Returns Promise<WalletCheckoutPaymentResponse>

      A promise that resolves to the payment creation for the specified session

      If the HTTP request fails.

      // Example usage:
      walletCheckoutService.createPayment(paymentCreate)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error creating payment.`);
      });
    • Retrieves the current state and details of a wallet checkout session from the customer's perspective (B2C). This endpoint allows customers to view their active checkout session including payment details, amounts, merchant information, and session status. Requires customer authorization token and secure code for access.

      Parameters

      • sessionId: string

        The unique identifier of the checkout session

      • parameters: WalletCheckoutGetSession

        Get session request parameters

      Returns Promise<WalletCheckoutSessionResponse>

      A promise that resolves to the specified session.

      If the HTTP request fails.

      // Example usage:
      walletCheckoutService.getSession(sessionId, parameters)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error getting session.`);
      });
    • Initiates a payment transaction for an active checkout session. This endpoint creates a payment record and begins processing the transfer from the customer's wallet to the merchant. The session must be in SENDER_BOUND status before a payment can be created. Returns payment details including transaction ID, fees, balances, and available next actions. Requires the secure code for authorization.

      Parameters

      Returns Promise<WalletCheckoutPaymentResponse>

      A promise that resolves to the specified session payment

      If the HTTP request fails.

      // Example usage:
      walletCheckoutService.previewPayment(paymentPreview)
      .then((response) => {
      console.log(response);
      })
      .catch((error) => {
      console.error(`Error previewing payment.`);
      });
    • Function

      Retrieves the singleton instance of the WalletCheckoutService class.

      Returns WalletCheckoutService

      The singleton instance of the WalletCheckoutService class.

      // Usage:
      const WalletCheckoutService = WalletCheckoutService.getInstance();