code: public boolean init(
              @NonNull PaymentSessionListener listener,
              @NonNull PaymentSessionConfig paymentSessionConfig,
              @Nullable Bundle savedInstanceState) {
  
          // Checking to make sure that there is a valid CustomerSession -- the getInstance() call
          // will throw a runtime exception if none is ready.
          try {
              if (savedInstanceState == null) {
                  mCustomerSession.resetUsageTokens();
              }
              mCustomerSession.addProductUsageTokenIfValid(TOKEN_PAYMENT_SESSION);
          } catch (IllegalStateException illegalState) {
              mPaymentSessionListener = null;
              return false;
          }
  
          mPaymentSessionListener = listener;
  
          if (savedInstanceState != null) {
              PaymentSessionData data =
                      savedInstanceState.getParcelable(PAYMENT_SESSION_DATA_KEY);
              if (data != null) {
                  mPaymentSessionData = data;
              }
          }
          mPaymentSessionConfig = paymentSessionConfig;
          fetchCustomer();
          return true;
      }
docs: Initialize the PaymentSession with a {@link PaymentSessionListener} to be notified of
  data changes.
  
  @param listener a {@link PaymentSessionListener} that will receive notifications of changes
  in payment session status, including networking status
  @param paymentSessionConfig a {@link PaymentSessionConfig} used to decide which items are
  necessary in the PaymentSession.
  @param savedInstanceState a {@link Bundle} containing the saved state of a PaymentSession
  that was stored in {@link #savePaymentSessionInstanceState(Bundle)}
  @return {@code true} if the PaymentSession is initialized, {@code false} if a state error
  occurs. Failure can only occur if there is no initialized {@link CustomerSession}.