Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Anuen

No security coverage Under active development

Anuen integrates Drupal with Anuen, a service that issues Brazilian electronic invoices: NF-e (products) and NFS-e (services). Drupal sends the invoice, Anuen talks to the tax authority, and Drupal keeps a local record of each invoice, updated by webhook.

The Anuen Commerce submodule issues the NF-e of Drupal Commerce orders, automatically when the order is paid or by hand from the order.

Features

  • API client for Anuen customers, products, services, NF-e and NFS-e.
  • Local invoice records, with PDF (DANFE/DANFSe) and XML download.
  • Signed webhooks (HMAC-SHA256). Repeated and out-of-order events are ignored.
  • Idempotent issuing: retrying after a network failure never creates a duplicate invoice.
  • Cron checks the invoices still being processed, in case a webhook is lost.
  • The API token and webhook secret are read from settings.php, never from exported configuration.

Anuen Commerce

  • Queues the NF-e when an order is fully paid; cron issues it.
  • Invoices tab on the order: issue, resend a rejected invoice, cancel, send a correction letter, download PDF and XML.
  • Tax data field on product variations (NCM, CEST, CFOP, origin, CSOSN, unit, GTIN), with site-wide defaults.
  • Picks the in-state or interstate CFOP from the customer's state.
  • Maps each payment gateway to an NF-e payment method.
  • Records status changes in the order activity (with commerce_log).
  • hook_anuen_commerce_nfe_alter() to change the NF-e before it is sent.

Post-Installation

  1. In the Anuen panel, under Integrations, create an API token. A testing token never issues real invoices.
  2. Add the token and the webhook secret to settings.php:
    $settings['anuen']['token'] = getenv('ANUEN_TOKEN');
    $settings['anuen']['webhook_secret'] = getenv('ANUEN_WEBHOOK_SECRET');
  3. Go to Configuration › Web services › Anuen and click Test connection.
  4. Register the webhook URL shown there (https://example.com/anuen/webhook) in Anuen.
  5. With Anuen Commerce: set the series, tax codes and payment methods under Anuen › Commerce, and fill in the NCM of your products.

Additional Requirements

  • An Anuen account with a digital certificate (A1) registered.
  • Drupal 10.3, 11 or 12, on PHP 8.1 or later.
  • Anuen Commerce: Commerce and a CPF/CNPJ field on the customer profile.

Known limitations

  • Shipping and fees are not included in the NF-e: the Anuen API has no fields for them.
  • The default tax codes fit a Simples Nacional retailer. Check yours with an accountant.

Documentation

Ask your assistant about Anuen

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Dec 2026
Latest release
18 hours ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-alpha3 Pre-release 10–11 PHP >=8.1 Dec 5, 2026
1.0.0-alpha2 Pre-release 10–11 PHP >=8.1 Dec 5, 2026
1.0.0-alpha1 Pre-release 10–11 PHP >=8.1 Dec 5, 2026