Skip to content

gwharton/module-autocustomergroup-newzealand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoCustomerGroup - New Zealand Addon

Magento 2 Module - Module to add New Zealand functionality to gwharton/module-autocustomergroup

New Zealand GST Scheme for Low Value Imports

This Scheme applies to shipments being sent from anywhere in the world to Consumers (Not B2B transactions) in New Zealand.

As of 1st December 2019, all sellers must (if their turnover to New Zealand exceeds 60,000 NZD) register for the New Zealand GST scheme, and collect GST for B2C transactions at the point of sale and remit to the New Zealand Government.

The module is capable of automatically assigning customers to the following categories.

  • Domestic - For shipments within New Zealand, normal New Zealand GST rules apply.
  • Import B2B - For shipments from outside of New Zealand to New Zealand and the buyer presents their GST validated NZBN Number, then GST should not be charged.
  • Import Taxed - For imports into New Zealand, where the value of each individual item is below or equal to 1,000 NZD, then GST should be charged on the order.
  • Import Untaxed - For imports into New Zealand, where one or more individual items value is above 1,000 NZD, then GST should NOT be charged and instead will be collected at the New Zealand border along with any duties due.

You need to create the appropriate tax rules and customer groups, and assign these customer groups to the above categories within the module configuration. Please ensure you fully understand the tax rules of the country you are shipping to. The above should only be taken as a guide.

Government Information

Scheme information can be found on the IRD website here.

Order Value

For the New Zealand GST Scheme, the following applies (This can be confirmed here) :

  • When determining whether GST should be charged (GST Threshold) Shipping or Insurance Costs are not included in the value of the goods.
  • When determining the amount of GST to charge the Goods value does include Shipping and Insurance Costs.

The Selling goods to consumers in New Zealand Guide provides information on what to do where an order contains a mixture of items below and above the threshold. It recommends to charge GST on the low value items and not charge GST on the high value items. This situation is too complex for this module to handle at present, therefore if any single item on the order is above the GST Threshold, then no GST will be charged on the order, and the correct GST will be charged at the New Zealand border.

More information on the scheme can be found on the New Zealand Inland Revenue Website

Pseudocode for group allocation

Groups are allocated by evaluating the following rules in this order (If a rule matches, no further rules are evaluated).

  • IF MerchantCountry IS New Zealand AND CustomerCountry IS New Zealand THEN Group IS Domestic.
  • IF MerchantCountry IS NOT New Zealand AND CustomerCountry IS New Zealand AND TaxIdentifier IS VALID THEN Group IS ImportB2B.
  • IF MerchantCountry IS NOT New Zealand AND CustomerCountry IS New Zealand AND OrderValue IS LESS THAN OR EQUAL TO Threshold THEN Group IS ImportTaxed.
  • IF MerchantCountry IS NOT New Zealand AND CustomerCountry IS New Zealand AND OrderValue IS MORE THAN Threshold THEN Group IS ImportUntaxed.
  • ELSE NO GROUP CHANGE

NZBN Number Verification

  • Offline Validation - A simple format and checksum validation is performed.
  • Online Validation - In addition to the offline checks above, an online validation check is performed with the New Zealand NZBN verification service. The online check not only ensures that the NZBN number is valid, but also checks that the NZBN number has an associated GST number registered with it, and it is in date and valid.

To obtain an access token for the NZBN Verification service, follow the procedure.

  • Sign up for an account at the New Zealand Government API Website
  • Create an application at the "My Applications" section
  • Subscribe to the NZBN Version 5 API in the "Apis" section
  • You may be required to sign a license agreement to use the service
  • Generate Subscription Keys for both sandbox and production services
  • Generate access tokens with -1 seconds validity time (this ensures they don't expire)

Note : The New Zealand Government do NOT require you to perform online validation before accepting an NZBN number as valid.

Configuration Options

  • Enabled - Enable/Disable this Tax Scheme.
  • Tax Identifier Field - Customer Prompt - Displayed under the Tax Identifier field at checkout when a shipping country supported by this module is selected. Use this to include information to the user about why to include their Tax Identifier.
  • Validate Online - Whether to validate NZBN numbers with the NZBN Business Register Service, or just perform simple format validation.
  • Environment - Whether to use the Sandbox or Production servers for the NZBN Validation Service.
  • API Access Token - The API Access Token provided by the NZBN Business Register website for API access.
  • GST Registration Number - The GST Registration Number for the Merchant. This is not currently used by the module, however supplementary functions in AutoCustomerGroup may use this, for example displaying on invoices etc.
  • Import GST Threshold - If the order value is above the GST Threshold, no GST should be charged.
  • Use Magento Exchange Rate - To convert from NZD Threshold to Store Currency Threshold, should we use the Magento Exchange Rate, or our own.
  • Exchange Rate - The exchange rate to use to convert from NZD Threshold to Store Currency Threshold.
  • Customer Group - Domestic - Merchant Country is within New Zealand, Item is being shipped to New Zealand.
  • Customer Group - Import B2B - Merchant Country is not within New Zealand, Item is being shipped to New Zealand, GST Number passed validation by module.
  • Customer Group - Import Taxed - Merchant Country is not within New Zealand, Item is being shipped to New Zealand, All items valued at or below the Import GST Threshold.
  • Customer Group - Import Untaxed - Merchant Country is not within New Zealand, Item is being shipped to New Zealand, One or more items in the order is valued above the Import GST Threshold.

Integration Tests

To run the integration tests, you need your own credentials for the NZBN Business Register API. Please add them to config-global.php.

Please note that the integration tests are configured to use the NZBN Business Register API Sandbox.

  • autocustomergroup/newzealandgst/accesstoken

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages