There is no sandbox mode for Google Pay.
Therefore, it is not possible to enable this payment method only in a test (staging) environment while keeping it disabled in production.
What is the solution for testing without making Google Pay visible to customers?
If you want to perform technical tests without exposing Google Pay to your customers in production, you can use the parameter: excludedPaymentMethods
This parameter allows you to temporarily exclude one or more payment methods when calling the payment API.