coveralls: 
[![Coverage Status](https://coveralls.io/builds/7544833/badge)](https://coveralls.io/builds/7544833)

Coverage decreased (-0.8%) to 95.984% when pulling **77d70e7cc4f9e64280da7b9ea47521632be54062 on bugfix/requests-string-headers** into **3744237922be5c422568b701a6bf930418581be8 on develop**.

diff --git a/laterpay/__init__.py b/laterpay/__init__.py
index c92f556..f2df4a4 100644
--- a/laterpay/__init__.py
+++ b/laterpay/__init__.py
@@ -421,10 +421,7 @@ class LaterPayClient(object):
         """
         params = self._sign_and_encode(params=params, url=url, method=method)
 
-        headers = {
-            'X-LP-APIVersion': 2,
-            'User-Agent': 'LaterPay Client - Python - v0.2'
-        }
+        headers = self.get_request_headers()
 
         if method == 'POST':
             req = Request(url, data=params, headers=headers)
@@ -503,7 +500,7 @@ class LaterPayClient(object):
         Return a ``dict`` of request headers to be sent to the API.
         """
         return {
-            'X-LP-APIVersion': 2,
+            'X-LP-APIVersion': '2',
             # TODO: Add client version information.
             'User-Agent': 'LaterPay Client Python',
         }

python-requests requires string only headers
As of python-requests 2.11 headers that are neither string not bytes are not accepted anymore. See kennethreitz/requests#3477
diff --git a/tests/test_client.py b/tests/test_client.py
index e6ebc1c..f3069e7 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -302,7 +302,7 @@ class TestLaterPayClient(unittest.TestCase):
 
         call = responses.calls[0]
 
-        self.assertEqual(call.request.headers['X-LP-APIVersion'], 2)
+        self.assertEqual(call.request.headers['X-LP-APIVersion'], '2')
 
         qd = parse_qs(urlparse(call.request.url).query)
 

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio flake8 coverage pydocstyle furl mock responses
apt-get update apt-get install -y gcc
3.5
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
charset-normalizer==2.0.12
coverage==6.2
execnet==1.9.0
flake8==5.0.4
furl==2.1.4
idna==3.10
importlib-metadata==4.2.0
iniconfig==1.1.1
-e git+https://github.com/laterpay/laterpay-client-python.git@3744237922be5c422568b701a6bf930418581be8#egg=laterpay_client
mccabe==0.7.0
mock==5.2.0
orderedmultidict==1.0.1
packaging==21.3
pluggy==1.0.0
py==1.11.0
pycodestyle==2.9.1
pydocstyle==6.3.0
pyflakes==2.5.0
pyparsing==3.1.4
pytest==7.0.1
pytest-asyncio==0.16.0
pytest-cov==4.0.0
pytest-mock==3.6.1
pytest-xdist==3.0.2
requests==2.27.1
responses==0.17.0
six==1.17.0
snowballstemmer==2.2.0
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: laterpay-client-python
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - charset-normalizer==2.0.12
      - coverage==6.2
      - execnet==1.9.0
      - flake8==5.0.4
      - furl==2.1.4
      - idna==3.10
      - importlib-metadata==4.2.0
      - iniconfig==1.1.1
      - mccabe==0.7.0
      - mock==5.2.0
      - orderedmultidict==1.0.1
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pycodestyle==2.9.1
      - pydocstyle==6.3.0
      - pyflakes==2.5.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-asyncio==0.16.0
      - pytest-cov==4.0.0
      - pytest-mock==3.6.1
      - pytest-xdist==3.0.2
      - requests==2.27.1
      - responses==0.17.0
      - six==1.17.0
      - snowballstemmer==2.2.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/laterpay-client-python

tests/test_client.py::TestLaterPayClient::test_get_access_data_success
tests/test_client.py::TestItemDefinition::test_item_definition tests/test_client.py::TestLaterPayClient::test_failure_url_param tests/test_client.py::TestLaterPayClient::test_get_access_params tests/test_client.py::TestLaterPayClient::test_get_add_url_no_product_key_param tests/test_client.py::TestLaterPayClient::test_get_add_url_product_key_param tests/test_client.py::TestLaterPayClient::test_get_add_url_with_use_dialog_api_false tests/test_client.py::TestLaterPayClient::test_get_buy_url_no_product_key_param tests/test_client.py::TestLaterPayClient::test_get_buy_url_product_key_param tests/test_client.py::TestLaterPayClient::test_get_buy_url_with_use_dialog_api_false tests/test_client.py::TestLaterPayClient::test_get_controls_balance_url_all_defaults tests/test_client.py::TestLaterPayClient::test_get_controls_balance_url_all_set tests/test_client.py::TestLaterPayClient::test_get_controls_links_url_all_defaults tests/test_client.py::TestLaterPayClient::test_get_controls_links_url_all_set_long tests/test_client.py::TestLaterPayClient::test_get_controls_links_url_all_set_short tests/test_client.py::TestLaterPayClient::test_get_gettoken_redirect tests/test_client.py::TestLaterPayClient::test_get_login_dialog_url_with_use_dialog_api_false tests/test_client.py::TestLaterPayClient::test_get_login_dialog_url_without_use_dialog_api tests/test_client.py::TestLaterPayClient::test_get_logout_dialog_url_with_use_dialog_api_false tests/test_client.py::TestLaterPayClient::test_get_logout_dialog_url_without_use_dialog_api tests/test_client.py::TestLaterPayClient::test_get_signup_dialog_url_with_use_dialog_api_false tests/test_client.py::TestLaterPayClient::test_get_signup_dialog_url_without_use_dialog_api tests/test_client.py::TestLaterPayClient::test_get_web_url_extra_kwargs tests/test_client.py::TestLaterPayClient::test_get_web_url_has_no_none_params tests/test_client.py::TestLaterPayClient::test_has_token tests/test_client.py::TestLaterPayClient::test_log_warning_for_skip_add_to_invoice_deprecation tests/test_client.py::TestLaterPayClient::test_transaction_reference
laterpay/__init__.py
laterpay/__init__.py