=== WebSkyLink EU VAT ===
Contributors: vrvijendra007
Tags: eu vat, vat number, vies, reverse charge, woocommerce
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Check EU VAT numbers at checkout with VIES, remove VAT for valid business customers in other EU countries, and keep proof of every check.

== Description ==

WebSkyLink EU VAT adds a VAT number field to the WooCommerce checkout. Each number is checked with VIES, the European Commission's official VAT number service. When a business customer in another EU country enters a valid number, VAT is removed from the order (reverse charge) and the proof of the check is saved with the order.

= Safe defaults =

* VAT stays on sales to customers in your own country, even with a valid VAT number. Business sales inside your country normally include VAT.
* VAT stays when goods are shipped to an address in your own country.
* The VAT number must belong to the billing country.
* If VIES does not answer, VAT is charged. If you prefer, you can remove VAT and mark the order to check later.
* Another plugin's VAT exemption, for example for a tax-exempt customer role, is left alone.

= The VAT number field =

* Works in the block checkout and the classic checkout.
* Shown only for billing addresses in the EU and Monaco, or for every country.
* Optional, always required, required when a company name is entered, or required in the countries you choose.
* The customer sees the result while filling in the form: under the field in the classic checkout, in the order summary in the block checkout.
* Customers can save their VAT number in My Account, and can be asked for it when they register.
* The number may be typed with spaces, dots or dashes, and without its country code.

= Proof on every order =

* The order keeps the number, the result, the date of the check, the registered business name and address, and whether VAT was removed.
* Set your own VAT number, and VIES gives a consultation number for every check. The order keeps it as proof that you checked the number.
* "Check again" in the order screen saves a new check on the order.
* The VAT number appears in the billing address of emails, order pages and invoices. When VAT was removed, the totals show a reverse charge line you can word yourself.
* The orders list has a VAT number column.

= EU VAT rates =

The plugin compares the EU standard VAT rates with your WooCommerce tax rates. It can get today's rates from the European Commission's TEDB database. You tick which countries to add or update, and nothing changes until you do. Rates limited to states, postcodes or cities are never touched.

= Built to be fair to VIES and your store =

* Answers are reused (24 hours for valid numbers, one hour for "not valid"), so the same number is not checked again on every page load.
* Each visitor can have a limited number of new VAT numbers checked per hour. This stops your checkout from being used to look up numbers in bulk.
* Checks run only when the customer changes the number or the address, not on every cart calculation.
* Secure connections only: SSL certificates are always verified.

= For developers =

* `webskylink_eu_vat_order_number( $order )` and `webskylink_eu_vat_order_is_exempt( $order )` for invoice templates.
* Filters to change the decision (`webskylink_eu_vat_decision`), add a check service (`webskylink_eu_vat_pre_check`), or change the field (`webskylink_eu_vat_classic_field`, `webskylink_eu_vat_block_field`).
* HPOS compatible.

= WebSkyLink EU VAT Pro =

The Pro add-on adds UK VAT number checks with HMRC, company name matching, payment methods only for verified businesses, the field shown by country and customer role, VAT rules by customer role, products that always keep VAT, per-country VAT and OSS reports with CSV export, and automatic re-checks of orders accepted while VIES was down.

== External services ==

This plugin connects to two services of the European Commission.

**VIES (VAT Information Exchange System)** checks whether a VAT number is registered. The plugin asks VIES when a customer enters a VAT number at checkout, in My Account or on the registration form, and when a shop manager clicks "Check again" on an order. It sends the VAT number's country code and number. If you set your own VAT number under EU VAT > Validation, it is sent too, so that VIES can give a consultation number. VIES returns whether the number is valid, and the registered business name and address when the country shares them.
Service: https://ec.europa.eu/taxation_customs/vies/
Terms and privacy: https://commission.europa.eu/legal-notice_en and https://commission.europa.eu/privacy-policy-websites-managed-european-commission_en

**TEDB (Taxes in Europe Database)** publishes the VAT rates of the EU countries. The plugin asks TEDB only when a shop manager clicks "Get today's rates from the European Commission" on the EU VAT rates screen. It sends the list of EU country codes and today's date. No personal data is sent.
Service: https://ec.europa.eu/taxation_customs/tedb/
Terms and privacy: https://commission.europa.eu/legal-notice_en and https://commission.europa.eu/privacy-policy-websites-managed-european-commission_en

== Installation ==

1. Install and activate WooCommerce.
2. Install and activate this plugin from Plugins > Add New, or upload the plugin folder to `/wp-content/plugins/`.
3. Go to WooCommerce > Settings > EU VAT to check the settings. The defaults are safe to start with.
4. Optional: open EU VAT rates in the same tab to compare your tax rates with the EU standard rates.

== Frequently Asked Questions ==

= Does the plugin give tax advice? =

No. It applies the rules you choose. Whether a sale may be reverse charged depends on your business and what you sell. Check with your tax adviser.

= Why is VAT not removed for a valid number from my own country? =

Business sales inside your own country normally include VAT. You can change this under VAT removal, but most stores should leave it on.

= What happens when VIES is not available? =

By default VAT is charged, and the customer can try again a few minutes later. You can instead remove VAT and mark the order. The order screen then shows a warning, and "Check again" checks the number once VIES is back. The Pro add-on re-checks these orders automatically.

= Does it check UK VAT numbers? =

Northern Ireland numbers (XI) are checked with VIES. WooCommerce treats Northern Ireland as part of the United Kingdom, so to let these customers enter their number, set "Show the field for" to "Every billing country". Great Britain numbers (GB) are checked by HMRC, which needs an HMRC developer account; that check is in the Pro add-on, which also shows the field for UK addresses.

= Where is the VAT number stored? =

On the order, with the result of the check. For customers with an account, it is also saved with their billing address. Customers' saved numbers are included in WordPress's personal data export and erasure tools.

= Does it work with PDF invoice plugins? =

Most invoice plugins print the order's billing address, which includes the VAT number. Templates can also use `webskylink_eu_vat_order_number( $order )`.

== Screenshots ==

1. The VAT number checked in the block checkout.
2. The VAT number field in the classic checkout.
3. VAT details and the proof of the check on an order.
4. EU VAT rates compared with your tax rates.
5. Settings.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
