@paypal/paypal-js
    Preparing search index...

    Interface for managing Google Pay payment operations within the PayPal SDK

    This interface provides methods for creating and managing Google Pay payment sessions. Unlike other payment methods, Google Pay uses merchant-controlled flow with Google's native PaymentsClient for rendering the button and handling payment authorization.

    const sdkInstance = await paypal.createInstance({
    clientId: "YOUR_CLIENT_ID",
    components: ["googlepay-payments"],
    });

    const paymentMethods = await sdkInstance.findEligibleMethods();
    if (paymentMethods.isEligible("googlepay")) {
    const googlePaySession = sdkInstance.createGooglePayOneTimePaymentSession();
    // Use googlePaySession.formatConfigForPaymentRequest() and confirmOrder()
    }
    interface GooglePayPaymentsInstance {
        createGooglePayOneTimePaymentSession(): GooglePayOneTimePaymentSession;
    }
    Index

    Methods