Firmeinfo.ro for WooCommerce

Description

Firmeinfo.ro for WooCommerce helps WooCommerce stores in Romania offer a faster, more accurate checkout for company invoices. It retrieves official company data from ANAF through the Firmeinfo.ro API and fills the billing fields automatically, based on the CUI (tax ID) entered by the customer.

How it works

  1. The customer checks the “I want a company invoice (legal entity)” option.
  2. Dedicated fields appear automatically: CUI/CIF, Company Name, Trade Register Number, Registered Office.
  3. The customer enters the company’s CUI (tax ID).
  4. They click the “Auto-fill company data” button (placed directly under the CUI field).
  5. The data is retrieved from ANAF via the Firmeinfo.ro API.
  6. The fields are automatically filled:
    • Company name
    • Trade Register Number
    • Full registered office address
    • Address, city, county, postcode
    • Phone (if available)
    • Shipping address (optional, configurable)

Key Features

  • ✅ Official ANAF data – company information retrieved from the ANAF source
  • ✅ “Company invoice” toggle – company fields appear only when needed, keeping checkout clean for individuals
  • ✅ Dedicated fields – CUI/CIF, Trade Register Number, Registered Office, saved to the order and customer address
  • ✅ Smart cache – reduces API usage and speeds up responses
  • ✅ Real-time statistics – monitor usage directly from the admin
  • ✅ Transparent rate limiting – see how many requests you have left
  • ✅ Field configuration – choose which fields to auto-fill
  • ✅ WooCommerce HPOS compatible – High-Performance Order Storage
  • ✅ Romanian interface
  • ✅ Debug mode – for developers
  • ✅ Clean layout – single column, regardless of theme, mobile responsive
  • ✅ Cache busting via filemtime() – CSS/JS updates are instantly propagated to customers

How to get an API Key (free)

  1. Register for free on Firmeinfo.ro — no credit card required.
  2. Go to Your Profile API.
  3. Click Generate API token — it is created instantly.
  4. Copy the Client ID and Client Secret (also called token).
  5. Paste them into the plugin settings (WooCommerce Settings Firmeinfo.ro).
  6. Click Test connection to verify.

The FREE plan includes 10 requests/hour and 500 requests/day — enough for most small and medium stores. Higher volumes are available through PRO and ENTERPRISE plans.

Available Plans

  • FREE — 10 requests/hour, 500 requests/day — FREE
  • PRO — 100 requests/hour, 5,000 requests/day — Contact
  • ENTERPRISE — 1,000 requests/hour, 50,000 requests/day — Contact

External services

This plugin connects to the Firmeinfo.ro API (https://api.firmeinfo.ro) to retrieve official company data from ANAF, based on the CUI (tax ID) entered by the customer during checkout.

What data is sent:
– The CUI (tax ID) entered by the customer in the checkout form
– The plugin’s Client ID and Client Secret, sent as request headers (X-Client-ID, X-Client-Secret) for authentication

When data is sent:
– When the customer clicks the “Auto-fill company data” button

Why data is sent:
– To populate the billing fields (company name, trade register number, registered office, address, city, county, postcode, phone) with official data from ANAF via the Firmeinfo.ro API

What is received:
– Public company information from ANAF, used only to fill the checkout fields. The response is cached locally (transient) for a configurable period (default 24 hours) to reduce API usage.

This service is provided by Firmeinfo.ro (Oaspete.ro).

  • Terms of Service: https://firmeinfo.ro/termeni
  • Privacy Policy: https://firmeinfo.ro/politica-confidentialitate
  • API Documentation: https://api.firmeinfo.ro/documentatie.php

Installation

  1. Upload the firmeinfo-ro-for-woocommerce folder to /wp-content/plugins/.
  2. Activate the extension from the ‘Plugins’ menu.
  3. Go to WooCommerce Settings Firmeinfo.ro.
  4. Paste the Client ID and Client Secret from your Firmeinfo.ro account.
  5. Save the settings.
  6. Click Test connection to verify the API is reachable.
  7. Done! The extension works automatically at checkout.

FAQ

Is it free?

Yes! The FREE plan includes 10 requests/hour and 500 requests/day — enough for most small and medium stores. No credit card is required. For higher volumes, PRO and ENTERPRISE plans are available.

Where do I get an API Key?

Register for free on Firmeinfo.ro, open Your Profile API, and click Generate API token. It is created instantly and does not require manual approval. Copy the Client ID and Client Secret into the plugin settings.

Does it work with other checkout extensions?

The extension is compatible with the standard WooCommerce checkout (shortcode [woocommerce_checkout]). For checkout blocks (the new checkout from WooCommerce Blocks), integration requires a future version. For custom extensions that completely override the classic checkout, minor adjustments may be needed.

Is the cache safe?

Yes. Data is stored locally only for public fields (official ANAF data). Customers always see correct and up-to-date information. The cache is internally versioned (CACHE_VERSION) and is automatically invalidated when the extension is updated.

What happens if I exceed the limit?

You will receive HTTP 429 (Too Many Requests). The extension displays a friendly message to the customer and does not block checkout — the customer can fill in the data manually.

What fields are added to the order?

In addition to standard WooCommerce fields, the extension adds:
* billing_cui — CUI/CIF (e.g. RO14346574)
* billing_reg_com — Trade Register Number (e.g. J40/1234/1996)
* billing_sediu_social — Full registered office address

All are saved to:
* the WooCommerce order (_billing_cui, _billing_reg_com, _billing_sediu_social)
* the customer address (for future orders)
* the formatted address in emails and invoices
* the order admin page

Is data lost on uninstall?

No. Transactional data (the CUI from already placed orders) remains in the database — it is fiscal data, required for ANAF and archiving. Only configuration options, cache transients, and associated user meta are deleted. WooCommerce does the same with _billing_company.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Firmeinfo.ro for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.1

  • Removed the unsupported superlative claim from the description.
  • Moved inline CSS into enqueued stylesheets (admin.css and dashboard-widget.css). No inline <style> blocks or style="" attributes remain.
  • Added “Requires Plugins: woocommerce” to the plugin header.
  • Added an “External services” section documenting the Firmeinfo.ro API: what data is sent, when, why, and links to the Terms of Service and Privacy Policy.
  • Limited the admin notice to the plugin’s own settings page (Guideline 11).
  • Added “How to get an API Key (free)” section with step-by-step instructions.

1.0.0

  • Initial release
  • “I want a company invoice (legal entity)” toggle — company fields appear only when checked
  • Dedicated fields: CUI/CIF, Company Name, Trade Register Number, Full Registered Office
  • “Auto-fill company data” button placed directly under the field
  • Robust API data extraction (regex fallback for Trade Register Number)
  • Smart cache, internally versioned (CACHE_VERSION)
  • Automatic cache busting via filemtime() — CSS/JS updates are instantly propagated
  • Checkout layout forced to a clean single column (first name + last name remain on two columns)
  • Data saved to the order + customer address + emails + admin (HPOS compatible)
  • Real-time statistics + Dashboard Widget
  • Transparent rate limiting with progress bars
  • Support for all Romanian counties (complete county ISO code mapping)
  • WooCommerce HPOS compatible
  • Romanian interface
  • Complete cleanup on uninstall (multisite + _site_transient_, without a global wp_cache_flush)