Checkout Optimization: Auto-Fill Company Data from a KVK Number
Boost your B2B checkout conversion by auto-filling company details from a KVK number. Fewer errors, faster completion, better customer experience.
Checkout Optimization: Auto-Fill Company Data from a KVK Number
Every extra form field in your checkout is a reason for your customer to drop off. In B2B e-commerce, this problem is amplified: you are not just asking for a name and address, but also a company name, KVK number, VAT number, and billing address. That is a lot of fields to fill in manually — and many opportunities for mistakes.
The solution is simple: let your customer enter a KVK number and auto-fill the rest.
The problem: manual data entry
A typical B2B checkout form asks for:
- Company name
- KVK number
- VAT number
- Street and house number
- Postal code and city
- Contact person
- Email address
That is at least 7 fields, not counting a separate billing address. Research consistently shows that adding extra form fields significantly reduces conversion. With B2B checkouts, customers often do not have their own KVK or VAT number readily available, leading to drop-off or incorrect entries.
The consequences of incorrect data
Incorrectly entered company data creates a cascade of problems:
- Invoices get rejected: a mistake in the company name or VAT number leads to returned invoices
- Payments are delayed: corrections cost time on both sides
- Administrative burden: manually fixing customer data in your system
- Compliance risks: incorrect VAT numbers on invoices can create tax issues
The solution: KVK number as the key
Instead of having all those fields filled in manually, use the KVK number as the key. The customer enters just the KVK number, and your application fetches the rest via an API.
The flow becomes:
- Customer enters KVK number
- Your application looks up the company via the KVKBase API
- Company name, address, and VAT number are auto-filled
- Customer reviews the data and proceeds
From 7+ manual fields to 1 field plus a confirmation.
Implementation with the KVKBase Widget
The fastest way to implement this is with the KVKBase embeddable widget. Add a script tag to your checkout page:
<script
src="https://widget.kvkbase.nl/kvk-lookup.js"
data-api-key="YOUR_API_KEY"
></script>
<kvk-lookup
id="kvk-widget"
placeholder="Enter your KVK number"
></kvk-lookup>
The widget automatically shows an input field with real-time validation. When a valid company is found, you can capture the data via an event:
document.getElementById('kvk-widget')
.addEventListener('kvkbase:found', (event) => {
const company = event.detail;
document.getElementById('company-name').value = company.tradeName;
document.getElementById('street').value = company.address.street;
document.getElementById('house-number').value = company.address.houseNumber;
document.getElementById('postal-code').value = company.address.postalCode;
document.getElementById('city').value = company.address.city;
document.getElementById('vat-number').value = company.vatNumber || '';
});
Implementation via the API
If you want more control, you can call the API directly from your backend:
// Server-side (Node.js / Express)
app.get('/api/company/:kvkNumber', async (req, res) => {
const { kvkNumber } = req.params;
// Validate format
if (!/^\d{8}$/.test(kvkNumber)) {
return res.status(400).json({ error: 'Invalid KVK number format' });
}
try {
const response = await fetch(
`https://api.kvkbase.nl/api/v1/lookup/${kvkNumber}`,
{ headers: { 'Authorization': `Bearer ${process.env.KVKBASE_API_KEY}` } }
);
if (!response.ok) {
return res.status(response.status).json({ error: 'Company not found' });
}
const data = await response.json();
res.json(data);
} catch (error) {
res.status(500).json({ error: 'Internal error' });
}
});
And in your frontend:
const kvkInput = document.getElementById('kvk-number');
kvkInput.addEventListener('input', debounce(async (e) => {
const kvkNumber = e.target.value.replace(/\D/g, '');
if (kvkNumber.length !== 8) return;
try {
const response = await fetch(`/api/company/${kvkNumber}`);
const company = await response.json();
fillCompanyFields(company);
} catch {
// Show error message to user
}
}, 500));
function debounce(fn, delay) {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => fn(...args), delay);
};
}
Impact on conversion
Auto-filling company data has measurable impact:
- Fewer form fields: from 7+ to effectively 1, lowering the barrier
- Fewer errors: validated data straight from the trade register
- Faster checkout: customers do not need to look up their own VAT number
- Fewer returns and credit notes: correct billing data from the start
- Higher customer satisfaction: a smooth process makes a professional impression
Web shops that auto-fill company data typically report a significant improvement in checkout conversion, especially with new B2B customers placing their first order.
Implementation considerations
User experience
- Always show the retrieved data to the user before saving it
- Make the auto-filled fields editable, in case a customer wants to use a different branch address
- Show clear feedback during the lookup (“Fetching company details…”)
- Handle error scenarios: company not found, API unavailable
Privacy
Company data from the trade register is public information. For sole proprietorships, the address may be a residential address — consider whether you want to display this automatically or let the customer enter it themselves.
Fallback
Always provide a fallback where the customer can enter data manually. The API may be temporarily unavailable, or the customer may intentionally want to deviate from the registered details.
Conclusion
Auto-filling company data based on the KVK number is one of the most effective optimizations for B2B checkouts. You lower the barrier, prevent errors, and speed up the entire ordering process.
With KVKBase you can implement this via the embeddable widget (minutes of work) or via the REST API (more control). In both cases, you get validated, up-to-date company data with a single lookup.