LokiCheckout_CocNl
This Magento 2 module is an add-on package to the LokiCheckout_Coc module. It enhances the Chamber of Commerce functionality with Dutch validation.
Validation
The validators only apply when the country of the address is the Netherlands. An empty value is accepted, because the Chamber of Commerce field itself is optional.
coc_nlchecks that the KvK number has exactly 8 digits.coc_nl_onlinelooks up the KvK number via the OpenKvK API (v3) of overheid.io. The number is only rejected when the API confirms that it does not belong to an active company. When the API can not be reached (no API key, timeouts, HTTP errors), the number is accepted and a warning is logged. Answers are cached for 24 hours.
Installation
Install this package via composer:
composer require loki-checkout/magento2-coc-nl
Next, enable this module:
bin/magento module:enable LokiCheckout_CocNl
Configuration
Navigate to Stores > Configuration > Loki Checkout > Chamber of Commerce (NL):
- Mode: In
Testmode, only the format of the KvK number is checked and the API is never called. - KvK API Key: An API key of overheid.io. It is stored encrypted. Without an API key, only the format is checked.
Testing the API key
curl -H "ovio-api-key: YOUR_API_KEY" "https://api.overheid.io/v3/openkvk?filters%5Bkvknummer%5D=24438702"
Current status
Support
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/LokiCheckout_CocNl.git
Configuration Options
The following options of this module can be configured via the Store Configuration:
loki_checkout/coc_nl/mode
loki_checkout/coc_nl/api_key
Loki Components
The following LokiComponents are created or references in this module:
loki-checkout-coc.billing.address.coc
loki-checkout-coc.shipping.address.coc
Module Dependencies
The following dependencies are declared in the module its `etc/module.xml` file:
LokiCheckout_Coc
LokiCheckout_Core
Loki_Base
Loki_Components
Loki_CssUtils
Loki_FieldComponents
Magento_AdminNotification
Magento_Backend
Magento_Catalog
Magento_CatalogInventory
Magento_Checkout
Magento_CheckoutAgreements
Magento_Cms
Magento_Config
Magento_Csp
Magento_Customer
Magento_Directory
Magento_Eav
Magento_Indexer
Magento_MediaGalleryUiApi
Magento_Newsletter
Magento_Payment
Magento_Quote
Magento_Rule
Magento_Sales
Magento_SalesRule
Magento_SalesSequence
Magento_Shipping
Magento_Store
Magento_Tax
Magento_Theme
Magento_Ui
Magento_User
Magento_Variable
Magento_Vault
Magento_Widget
Yireo_CspUtilities
Composer details
LokiCheckout_CocNlloki-checkout/magento2-coc-nl
ext-json: *
ext-pcre: *
guzzlehttp/guzzle: ^7.9
loki-checkout/magento2-coc: ^1.0
loki-checkout/magento2-core: ^2.0
loki/magento2-components: ^2.0
magento/framework: ^103.0
magento/module-backend: ^102.0
magento/module-config: ^101.2
magento/module-store: ^101.1
php: >=8.2 <8.6
psr/log: ^1.0 || ^2.0 || ^3.0
Releases
| 1.0.10 | 11 November 2026 |
| 1.0.9 | 11 November 2026 |
| 1.0.8 | 11 November 2026 |
| 1.0.7 | 11 November 2026 |
| 1.0.6 | 11 November 2026 |
| 1.0.5 | 11 November 2026 |
| 1.0.4 | 11 November 2026 |
| 1.0.3 | 11 November 2026 |
| 1.0.2 | 11 November 2026 |
| 1.0.1 | 11 November 2026 |
| 1.0.0 | 11 November 2026 |
| 0.0.2 | 11 November 2026 |
| 0.0.1 | 11 November 2026 |
Changelog
[1.0.10] - 06 November 2026
Added
- Switch KvK lookups to overheid.io API v3
Fixed
- Prevent double decryption of the KvK API key
- Describe validation behaviour and configuration
- Add missing Dutch translations
- Read settings per store, encrypt the API key and honour test mode
- Do not reject KvK numbers when the KvK API is unavailable
- Accept empty CoC values and only validate Dutch addresses
- Declare dependency on LokiCheckout_Coc and other used packages
[1.0.9] - 28 August 2026
Fixed
- Add languages
- Make sure system.xml tooltips and comments are translatable
- Implement actual validation of given Coc NL number
[1.0.8] - 08 October 2025
Fixed
- Add better error message
- Update README
[1.0.7] - 28 August 2025
Fixed
- Add CI files
- Replace yireo/opensearch with yireo/opensearch-dummy in Gitlab CI
[1.0.6] - 26 August 2025
Fixed
- 0bab66a Add GitLab CI files
[1.0.5] - 21 August 2025
Fixed
- Add dependency with loki/magento2-css-utils
[1.0.4] - 18 August 2025
Fixed
- Allow for PHP 8.1 compatibility
- Lower requirements to PHP 8.1
[1.0.3] - 15 August 2025
Fixed
- Change group label in Store Config
[1.0.2] - 07 August 2025
Fixed
- Add client WIP
- Lower PHP requirement to PHP 8.2+
[1.0.1] - 22 July 2025
Fixed
- Fix dep with loki/magento2-components 2.0
[1.0.0] - 22 July 2025
Fixed
- Rename PHP namespace from
Yireo_Loki*toLoki* - Rename composer package from
yireo/magento2-loki*toloki/magento2* - Fix XML
- Generate new MODULE.json with simple test count
- Allow PHP 8.4 in CI
[0.0.2] - 25 April 2025
Fixed
- Allow upgrading to LokiFieldComponents and LokiCheckout 1.0
- Change composer keyword loki-misc to loki-other
[0.0.1] - 21 January 2025
- Initial release