Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaxID: Add support for Spanish CIF #227

Merged
merged 2 commits into from
Sep 25, 2024
Merged

TaxID: Add support for Spanish CIF #227

merged 2 commits into from
Sep 25, 2024

Commits on Sep 25, 2024

  1. TaxID: Correctly set country for non 'eu_vat' taxIDs

    'au_abn' and 'nz_gst' are numbers with only digits, they don't contain their
    country code.
    We can only guess the country from 'eu_vat' taxIDs, so let's adapt the code to
    better handle AU and NZ taxIDs number.
    
    See [the Stripe documentation] for the exact format of these two taxIDs number.
    
    [the Stripe documentation]: https://docs.stripe.com/billing/customer/tax-ids
    feliixx committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    3758b83 View commit details
    Browse the repository at this point in the history
  2. TaxID: Add support for Spanish CIF

    According to Stripe's documentation[^1], two Spanish Customer Tax IDs (`eu_vat`
    & `es_cif`) are supported.
    
    [^1]: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id-types
    
    Let's add the support for Spain's _código de identificación fiscal_ (CIF) tax
    ID.
    
    Even if Stripe doesn't validate this type of Customer Tax ID (unlike EU
    VAT)[^2], the related dashboard form input only checks if the given value's
    length is 9.
    
    [^2]: https://docs.stripe.com/billing/customer/tax-ids#validation
    GuillaumeCz authored and feliixx committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    81a4c54 View commit details
    Browse the repository at this point in the history