diff --git a/localstripe/resources.py b/localstripe/resources.py index 5d74d94..1de6cc5 100644 --- a/localstripe/resources.py +++ b/localstripe/resources.py @@ -3276,7 +3276,10 @@ def __init__(self, country=None, customer=None, type=None, value=None, assert type in ('eu_vat', 'nz_gst', 'au_abn') assert _type(value) is str and len(value) > 10 if country is None: - country = value[0:2] + if type == 'eu_vat': + country = value[0:2] + else: + country = type[0:2].upper() assert _type(country) is str except AssertionError: raise UserError(400, 'Bad request')