def get_default_api_key(self, livemode: bool | None) -> str:
        """
        Returns the default API key for a value of `livemode`.
        """
        if livemode is None:
            # Livemode is unknown. Use the default secret key.
            return self.STRIPE_SECRET_KEY
        elif livemode:
            # Livemode is true, use the live secret key
            return self.LIVE_API_KEY or self.STRIPE_SECRET_KEY
        # Livemode is false, use the test secret key
        return self.TEST_API_KEY or self.STRIPE_SECRET_KEY

        Returns the default API key for a value of `livemode`.
        
djstripe/settings.py