diff --git a/telebot/apihelper.py b/telebot/apihelper.py index ff8c8e231..fc76a0016 100644 --- a/telebot/apihelper.py +++ b/telebot/apihelper.py @@ -1658,7 +1658,7 @@ def create_invoice_link(token, title, description, payload, provider_token, payload['send_phone_number_to_provider'] = send_phone_number_to_provider if send_email_to_provider: payload['send_email_to_provider'] = send_email_to_provider - if is_flexible: + if is_flexible is not None: payload['is_flexible'] = is_flexible return _make_request(token, method_url, params=payload, method='post') diff --git a/telebot/asyncio_helper.py b/telebot/asyncio_helper.py index 51b60e98f..1c01893bd 100644 --- a/telebot/asyncio_helper.py +++ b/telebot/asyncio_helper.py @@ -1636,7 +1636,7 @@ async def create_invoice_link(token, title, description, payload, provider_token payload['send_phone_number_to_provider'] = send_phone_number_to_provider if send_email_to_provider: payload['send_email_to_provider'] = send_email_to_provider - if is_flexible: + if is_flexible is not None: payload['is_flexible'] = is_flexible return await _process_request(token, method_url, params=payload, method='post')