Sudrel NFS-e for WooCommerce

Description

Sudrel issues NFS-e (Nota Fiscal de Serviço eletrônica) in any Brazilian city through the national standard (Sistema Nacional NFS-e). This plugin connects your WooCommerce store to Sudrel:

  • When an order becomes Processing or Completed, Sudrel issues the NFS-e for the customer who paid.
  • One invoice per order, even if the order is updated again.
  • The plugin creates and maintains a native WooCommerce webhook, signed with a secret it generates. You only copy one URL from Sudrel and one secret back to Sudrel.
  • In Sudrel you choose when the order becomes an invoice: on payment, some days after it, or manually.

The plugin does not change your checkout, your orders or your emails. It only creates the webhook.

Em português: cada pedido pago no WooCommerce vira NFS-e pela Sudrel, para o cliente que pagou. O plugin cria e mantém o webhook da loja: você copia uma URL da Sudrel e cola o segredo de volta na Sudrel.

What you need

  • A Sudrel account with the issuing company registered, its A1 digital certificate and fiscal settings (sudrel.com.br). Sudrel is a paid service.
  • The customer CPF or CNPJ at checkout. WooCommerce does not ask for it by default; the free “Brazilian Market on WooCommerce” plugin does. Without CPF/CNPJ there is no NFS-e.

External services

This plugin sends data to Sudrel (api.sudrel.com.br), the service that issues the invoices. Nothing is sent until you paste a Sudrel webhook URL and save.

  • What is sent: the full WooCommerce order (WooCommerce REST API v3 format), each time the order is created or updated. It includes the customer billing data (name, company, CPF/CNPJ, e-mail, phone, address), the items, the total and the order status. When you click “Send a test”, only the webhook id is sent.
  • Why: to issue the NFS-e for the customer, as required by Brazilian tax law.
  • How: through WooCommerce’s own webhook delivery, signed with HMAC-SHA256 and a secret that never leaves your store and your Sudrel account.

Sudrel terms of use: https://sudrel.com.br/contrato-licenciamento
Sudrel privacy policy: https://sudrel.com.br/privacidade

Installation

  1. Install and activate the plugin (WooCommerce must be active).
  2. In Sudrel, open Emissão › Integrações de pagamento and create a WooCommerce integration for the company that issues the invoices. Copy the URL it shows.
  3. In WordPress, open WooCommerce › Sudrel NFS-e, paste the URL and click “Save and connect”.
  4. Copy the secret shown on the same screen and paste it in the “Segredo do webhook” field of the integration in Sudrel.
  5. Saving already sends a connection test, shown in the integration history in Sudrel. “Send a test to Sudrel” sends another one.

FAQ

Does it work with HPOS and the block checkout?

Yes. The plugin only uses the native WooCommerce webhook and does not touch orders or checkout.

What happens if I deactivate the plugin?

The webhook is paused and orders stop going to Sudrel. Activating it again turns the webhook back on. Deleting the plugin deletes the webhook it created; the integration and its history stay in Sudrel.

WooCommerce disabled the webhook. What now?

WooCommerce disables a webhook after repeated delivery failures. Open WooCommerce › Sudrel NFS-e and click “Save and connect” again.

Can the invoice be cancelled automatically on refund?

Not yet. A refunded order does not cancel the invoice: cancel it from the Sudrel panel.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Sudrel NFS-e for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • First version: creates and maintains the WooCommerce webhook to Sudrel, with a generated secret, status and test delivery.