diff --git a/tools/create_invoice.py b/tools/create_invoice.py index 11f51fd..3084845 100644 --- a/tools/create_invoice.py +++ b/tools/create_invoice.py @@ -27,7 +27,7 @@ def ensure_customer_exists( def create_invoice(args: dict) -> dict: """Create and finalize a Stripe invoice.""" # If an API key exists in the env file, find or create customer - if stripe.api_key is not None: + if stripe.api_key is not None and stripe.api_key != "": customer_id = ensure_customer_exists( args.get("customer_id"), args.get("email", "default@example.com") )