MaxDev Facturare cu ANAF for WooCommerce

Plugin Banner

MaxDev Facturare cu ANAF for WooCommerce

by MaxDev

Download
Description

MaxDev Facturare cu ANAF for WooCommerce helps Romanian stores collect billing details from individual (PF) and company (PJ) customers.

Customers choose their billing type at checkout. Store owners configure the available fields and required values from WooCommerce > Facturare cu ANAF. In classic checkout and Checkout Blocks, available company details are retrieved automatically after a valid CUI/CIF is entered, when ANAF lookup is enabled.

Requires WooCommerce 8.9 or newer.

Main features:

  • Individual / company billing type selector.
  • Configurable fields for company name, CNP, CUI/CIF, trade registry number, bank name, and IBAN.
  • Local validation for CNP, CUI/CIF, and IBAN.
  • Automatic ANAF lookup in classic checkout and Checkout Blocks, when enabled, without an ANAF account or API key.
  • Company name, trade registry number, and address populated when returned by ANAF.
  • Configurable ANAF mode in both checkout types: direct autofill or suggestion with confirmation.
  • Configurable request timeout and caching for found and not-found companies.
  • ANAF test tool in the plugin settings.
  • Order data saved through WooCommerce CRUD, ready for HPOS.
  • Support for classic checkout and WooCommerce Checkout Blocks through the Additional Checkout Fields API.
  • Fields in the customer account area and in the admin order screen.
  • Romanian source interface with translation support.

Who is it for?

Romanian WooCommerce stores that sell to both individuals and companies, and store administrators who need structured billing data alongside each order. Developers can access order data through WooCommerce APIs; compatibility with a specific invoicing extension should be checked separately.

Built for WooCommerce

The plugin uses WordPress hooks, the WordPress HTTP API, and WooCommerce CRUD for order data. Checkout Blocks fields use WooCommerce’s Additional Checkout Fields API. Settings and admin actions use capability checks and nonces, and submitted values are sanitized and validated.

Both checkout types support automatic ANAF lookup, direct autofill or suggestion with confirmation, billing field validation, and order storage. No lookup button is required.

This plugin does not issue invoices, proformas, or e-Factura files. It collects and stores billing data so the shop or compatible integrations can use it.

External service: ANAF

The optional ANAF service retrieves publicly available company billing details. When lookup is enabled and a customer enters a valid CUI/CIF for Romanian company billing in classic checkout or Checkout Blocks, the store server sends the normalized CUI/CIF and lookup date to ANAF. No lookup is made on an ordinary page view alone. Administrators can also request a lookup explicitly using the settings-page test tool; the same CUI/CIF and date are sent. A server cache hit avoids a new remote request.

Default endpoint:

https://webservicesp.anaf.ro/api/PlatitorTvaRest/v9/tva

The service is provided by Agentia Nationala de Administrare Fiscala (ANAF), Romania. No account, API key, or authentication is required for this endpoint. The JSON request contains only CUI/CIF and date, not CNP, customer name, email, address, cart, or order details. ANAF also receives the store server’s source IP and standard HTTP headers as part of the connection. MaxDev does not receive or proxy these requests. Disable ANAF lookup in WooCommerce > Facturare cu ANAF to prevent these service requests.

If the ANAF service does not respond, checkout remains usable and billing data can be entered manually.

Only fields available in the ANAF response are used. Bank name and IBAN are entered manually; the plugin does not retrieve them from this endpoint.

Official ANAF web services documentation

ANAF / Ministry of Finance API terms of use

ANAF privacy and personal-data protection notice

ANAF personal-data protection information

The privacy notice is ANAF’s general institutional notice; it is not a separately published privacy policy specific to this public endpoint. The API terms also cover personal-data processing obligations. Store owners should review these documents and disclose their own billing-data processing to customers.

This plugin is developed independently by MaxDev. It is not affiliated with or endorsed by ANAF, the Ministry of Finance, or WooCommerce. WooCommerce is a trademark of its respective owner.

Data and privacy

Billing data is stored in WooCommerce order metadata. For logged-in customers, values can also be stored in the customer profile for reuse on future orders.

Deactivating the plugin keeps the data. On uninstall, the plugin deletes its settings and plugin data only if the delete-on-uninstall option was explicitly enabled in the admin area.

  1. Install and activate WooCommerce.
  2. Install and activate MaxDev Facturare cu ANAF for WooCommerce.
  3. Open WooCommerce > Facturare cu ANAF.
  4. Configure the individual, company, and ANAF fields.
  5. Test checkout on staging before using the plugin in production.
  1. General settings: default billing type and checkout, account, and order options.

    General settings: default billing type and checkout, account, and order options.

  2. Company settings: field visibility, required values, and local CUI/CIF validation.

    Company settings: field visibility, required values, and local CUI/CIF validation.

  3. ANAF settings: public endpoint, official documentation, autofill mode, timeout, and cache.

    ANAF settings: public endpoint, official documentation, autofill mode, timeout, and cache.

  4. Individual settings: configurable CNP visibility, validation, and labels.

    Individual settings: configurable CNP visibility, validation, and labels.

  5. Classic checkout: company billing fields with automatic ANAF lookup after entering a valid CUI/CIF.

    Classic checkout: company billing fields with automatic ANAF lookup after entering a valid CUI/CIF.

  6. Checkout Blocks: company billing fields with automatic ANAF lookup through WooCommerce data stores.

    Checkout Blocks: company billing fields with automatic ANAF lookup through WooCommerce data stores.

Does the plugin issue invoices?

No. The plugin collects and stores billing data. Invoice generation remains the responsibility of the shop or a separate integration.

Is an ANAF key required?

No. The endpoint used for CUI/CIF checks is public and does not require authentication.

Is the CNP sent to ANAF?

No. CNP values are not sent to ANAF.

Is the plugin HPOS ready?

Yes. Order data is saved through WooCommerce CRUD and the plugin declares HPOS compatibility.

Does it work with Checkout Blocks?

Yes, through the WooCommerce Additional Checkout Fields API included in WooCommerce 8.9 or newer.

Billing fields, validation, order storage, and automatic ANAF lookup are supported, including direct autofill and suggestion with confirmation.

Does ANAF return bank details or an IBAN?

No. Bank name and IBAN can be collected manually. Company details are populated only when the relevant fields are returned by the service.

What happens when ANAF is unavailable?

Customers can enter their billing details manually and continue checkout. ANAF lookup is optional.

Can I configure which fields are required?

Yes. The settings let you configure the visibility and required status of individual and company fields, including whether to collect CNP.

Where do I ask for help?

After publication, use this plugin’s WordPress.org support forum. Include your WordPress, WooCommerce, and plugin versions, your checkout type, and steps to reproduce the issue. Do not post CNP values or other private customer data.

0.1.2

  • Rename the plugin and text domain to clarify the independent ANAF integration.
  • Sanitize and allowlist request fields before validation and persistence, rejecting non-scalar values and avoiding repeated unslashing.
  • Document official ANAF API terms and the general privacy/data-protection notice, including administrative lookups and connection metadata.
  • Limit dependency notices to relevant administration screens.

0.1.1

  • Automatically look up valid Romanian company CUI/CIF values in classic checkout and Checkout Blocks; remove the checkout lookup button.
  • Support direct autofill and suggestion with confirmation in both checkout types.
  • Preserve manual edits made during lookup, ignore stale responses, and avoid duplicate requests.
  • Register an editable company name field in Blocks and persist it through WooCommerce CRUD.

0.1.0

  • Initial development version: settings, classic checkout, Checkout Blocks, validation, ANAF lookup, HPOS-safe order metadata, and basic compatibility integrations.
Back to top