From 894f39bebc838fddfc9b19075c17a5847dee1dc1 Mon Sep 17 00:00:00 2001 From: javorosas Date: Wed, 1 Apr 2026 10:44:17 +0200 Subject: [PATCH 1/3] Add constants for tax, cancellation, global invoice fields, and statuses --- Constants/CancellationMotive.cs | 10 ++++++++++ Constants/CancellationStatus.cs | 12 ++++++++++++ Constants/ExportCode.cs | 10 ++++++++++ Constants/GlobalMonths.cs | 24 ++++++++++++++++++++++++ Constants/GlobalPeriodicity.cs | 11 +++++++++++ Constants/IepsMode.cs | 10 ++++++++++ Constants/InvoiceStatus.cs | 10 ++++++++++ Constants/ReceiptStatus.cs | 10 ++++++++++ Constants/TaxFactor.cs | 9 +++++++++ Constants/TaxSystem.cs | 5 +++-- Constants/Taxability.cs | 3 +++ Constants/WebhookEvents.cs | 1 + 12 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 Constants/CancellationMotive.cs create mode 100644 Constants/CancellationStatus.cs create mode 100644 Constants/ExportCode.cs create mode 100644 Constants/GlobalMonths.cs create mode 100644 Constants/GlobalPeriodicity.cs create mode 100644 Constants/IepsMode.cs create mode 100644 Constants/InvoiceStatus.cs create mode 100644 Constants/ReceiptStatus.cs create mode 100644 Constants/TaxFactor.cs diff --git a/Constants/CancellationMotive.cs b/Constants/CancellationMotive.cs new file mode 100644 index 0000000..5520725 --- /dev/null +++ b/Constants/CancellationMotive.cs @@ -0,0 +1,10 @@ +namespace Facturapi +{ + public static class CancellationMotive + { + public const string COMPROBANTE_EMITIDO_CON_ERRORES_CON_RELACION = "01"; + public const string COMPROBANTE_EMITIDO_CON_ERRORES_SIN_RELACION = "02"; + public const string NO_SE_LLEVO_A_CABO_LA_OPERACION = "03"; + public const string OPERACION_NOMINATIVA_RELACIONADA_EN_GLOBAL = "04"; + } +} diff --git a/Constants/CancellationStatus.cs b/Constants/CancellationStatus.cs new file mode 100644 index 0000000..fd68d83 --- /dev/null +++ b/Constants/CancellationStatus.cs @@ -0,0 +1,12 @@ +namespace Facturapi +{ + public static class CancellationStatus + { + public const string NONE = "none"; + public const string VERIFYING = "verifying"; + public const string PENDING = "pending"; + public const string ACCEPTED = "accepted"; + public const string REJECTED = "rejected"; + public const string EXPIRED = "expired"; + } +} diff --git a/Constants/ExportCode.cs b/Constants/ExportCode.cs new file mode 100644 index 0000000..5b91daf --- /dev/null +++ b/Constants/ExportCode.cs @@ -0,0 +1,10 @@ +namespace Facturapi +{ + public static class ExportCode + { + public const string NO_APLICA = "01"; + public const string DEFINITIVA = "02"; + public const string TEMPORAL = "03"; + public const string DEFINITIVA_CON_CLAVE_DISTINTA_A_A1_O_NO_APLICA = "04"; + } +} diff --git a/Constants/GlobalMonths.cs b/Constants/GlobalMonths.cs new file mode 100644 index 0000000..ffd9788 --- /dev/null +++ b/Constants/GlobalMonths.cs @@ -0,0 +1,24 @@ +namespace Facturapi +{ + public static class GlobalMonths + { + public const string ENERO = "01"; + public const string FEBRERO = "02"; + public const string MARZO = "03"; + public const string ABRIL = "04"; + public const string MAYO = "05"; + public const string JUNIO = "06"; + public const string JULIO = "07"; + public const string AGOSTO = "08"; + public const string SEPTIEMBRE = "09"; + public const string OCTUBRE = "10"; + public const string NOVIEMBRE = "11"; + public const string DICIEMBRE = "12"; + public const string ENERO_FEBRERO = "13"; + public const string MARZO_ABRIL = "14"; + public const string MAYO_JUNIO = "15"; + public const string JULIO_AGOSTO = "16"; + public const string SEPTIEMBRE_OCTUBRE = "17"; + public const string NOVIEMBRE_DICIEMBRE = "18"; + } +} diff --git a/Constants/GlobalPeriodicity.cs b/Constants/GlobalPeriodicity.cs new file mode 100644 index 0000000..c5737a8 --- /dev/null +++ b/Constants/GlobalPeriodicity.cs @@ -0,0 +1,11 @@ +namespace Facturapi +{ + public static class GlobalPeriodicity + { + public const string DAY = "day"; + public const string WEEK = "week"; + public const string FORTNIGHT = "fortnight"; + public const string MONTH = "month"; + public const string TWO_MONTHS = "two_months"; + } +} diff --git a/Constants/IepsMode.cs b/Constants/IepsMode.cs new file mode 100644 index 0000000..4eb7899 --- /dev/null +++ b/Constants/IepsMode.cs @@ -0,0 +1,10 @@ +namespace Facturapi +{ + public static class IepsMode + { + public const string SUM_BEFORE_TAXES = "sum_before_taxes"; + public const string BREAK_DOWN = "break_down"; + public const string UNIT = "unit"; + public const string SUBTRACT_BEFORE_BREAK_DOWN = "subtract_before_break_down"; + } +} diff --git a/Constants/InvoiceStatus.cs b/Constants/InvoiceStatus.cs new file mode 100644 index 0000000..3175f24 --- /dev/null +++ b/Constants/InvoiceStatus.cs @@ -0,0 +1,10 @@ +namespace Facturapi +{ + public static class InvoiceStatus + { + public const string PENDING = "pending"; + public const string VALID = "valid"; + public const string CANCELED = "canceled"; + public const string DRAFT = "draft"; + } +} diff --git a/Constants/ReceiptStatus.cs b/Constants/ReceiptStatus.cs new file mode 100644 index 0000000..1b64d7d --- /dev/null +++ b/Constants/ReceiptStatus.cs @@ -0,0 +1,10 @@ +namespace Facturapi +{ + public static class ReceiptStatus + { + public const string OPEN = "open"; + public const string CANCELED = "canceled"; + public const string INVOICED_TO_CUSTOMER = "invoiced_to_customer"; + public const string INVOICED_GLOBALLY = "invoiced_globally"; + } +} diff --git a/Constants/TaxFactor.cs b/Constants/TaxFactor.cs new file mode 100644 index 0000000..15a160b --- /dev/null +++ b/Constants/TaxFactor.cs @@ -0,0 +1,9 @@ +namespace Facturapi +{ + public static class TaxFactor + { + public const string TASA = "Tasa"; + public const string CUOTA = "Cuota"; + public const string EXENTO = "Exento"; + } +} diff --git a/Constants/TaxSystem.cs b/Constants/TaxSystem.cs index 881ba1d..387cf65 100644 --- a/Constants/TaxSystem.cs +++ b/Constants/TaxSystem.cs @@ -12,23 +12,24 @@ public static class TaxSystem public const string PERSONAS_MORALES_CON_FINES_NO_LUCRATIVOS = "603"; public const string SUELDOS_Y_SALARIOS = "605"; public const string ARRENDAMIENTO = "606"; + public const string REGIMEN_DE_ENAJENACION_O_ADQUISICION_DE_BIENES = "607"; public const string DEMAS_INGRESOS = "608"; public const string CONSOLIDACION = "609"; public const string RESIDENTES_EN_EL_EXTRANJERO = "610"; public const string INGRESOS_POR_DIVIDENDOS_SOCIOS_Y_ACCIONISTAS = "611"; public const string PERSONAS_FISICAS_CON_ACTIVIDADES_EMPRESARIALES_Y_PROFESIONALES = "612"; public const string INGRESOS_POR_INTERESES = "614"; + public const string REGIMEN_DE_LOS_INGRESOS_POR_OBTENCION_DE_PREMIOS = "615"; public const string SIN_OBLIGACIONES_FISCALES = "616"; public const string SOCIEDADES_COOPERATIVAS_DE_PRODUCCION = "620"; public const string REGIMEN_DE_INCORPORACION_FISCAL = "621"; public const string ACTIVIDADES_AGRICOLAS_GANADERAS_SILVICOLAS_Y_PESQUERAS = "622"; public const string OPCIONAL_PARA_GRUPOS_DE_SOCIEDADES = "623"; public const string COORDINADOS = "624"; + public const string REGIMEN_DE_ACTIVIDADES_EMPRESARIALES_CON_INGRESOS_A_TRAVES_DE_PLATAFORMAS_TECNOLOGICAS = "625"; public const string RESICO = "626"; public const string HIDROCARBUROS = "628"; - public const string REGIMEN_DE_ENAJENACION_O_ADQUISICION_DE_BIENES = "607"; public const string PREFERENTES_Y_EMPRESAS_MULTINACIONALES = "629"; public const string ENAJENACION_DE_ACCIONES_EN_BOLSA_DE_VALORES = "630"; - public const string REGIMEN_DE_LOS_INGRESOS_POR_OBTENCION_DE_PREMIOS = "615"; } } diff --git a/Constants/Taxability.cs b/Constants/Taxability.cs index e105458..892c8dc 100644 --- a/Constants/Taxability.cs +++ b/Constants/Taxability.cs @@ -7,5 +7,8 @@ public static class Taxability public const string SI_Y_NO_OBLIGADO_A_DESGLOSE = "03"; public const string SI_Y_NO_CAUSA_IMPUESTO = "04"; public const string PODEBI = "05"; + public const string SI_IVA_PERO_SIN_IVA_TRASLADADO = "06"; + public const string NO_IVA_PERO_DESGLOSE_IEPS_REQUERIDO = "07"; + public const string NO_IVA_Y_NO_DESGLOSE_IEPS_REQUERIDO = "08"; } } diff --git a/Constants/WebhookEvents.cs b/Constants/WebhookEvents.cs index 14b15e0..80ef37a 100644 --- a/Constants/WebhookEvents.cs +++ b/Constants/WebhookEvents.cs @@ -8,6 +8,7 @@ public static class WebhooksEvents public const string INVOICES_CREATED_FROM_DASHBOARD = "invoice.created_from_dashboard"; public const string RECEIPT_SELF_INVOICE_COMPLETE = "receipt.self_invoice_complete"; public const string RECEIPT_STATUS_UPDATED = "receipt.status_updated"; + public const string RECEIPT_CANCELLATION_STATUS_UPDATED = "receipt.cancellation_status_updated"; public const string CUSTOMER_EDIT_LINK_COMPLETED = "customer.edit_link_completed"; } } From ad4d2d196b210ea1595d3720458cda1d9fefb7e4 Mon Sep 17 00:00:00 2001 From: javorosas Date: Wed, 1 Apr 2026 10:46:55 +0200 Subject: [PATCH 2/3] Bump version to 6.1.0 and add changelog entry --- CHANGELOG.md | 15 +++++++++++++++ facturapi-net.csproj | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c243436..830cccf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [6.1.0] - 2026-04-01 + +### Added + +- Added `TaxFactor` and `IepsMode` constants for tax payload fields. +- Added `CancellationMotive` and `CancellationStatus` constants for cancellation flows. +- Added `GlobalPeriodicity`, `GlobalMonths`, and `ExportCode` constants for global invoice payload fields. +- Added `InvoiceStatus` and `ReceiptStatus` constants for common document status handling. +- Added `receipt.cancellation_status_updated` to webhook event constants. + +### Changed + +- Updated `TaxSystem` constants to include missing SAT regime code `625`. +- Expanded `Taxability` constants to include codes `06`, `07`, and `08`. + ## [6.0.0] - 2026-03-30 ### Migration Guide diff --git a/facturapi-net.csproj b/facturapi-net.csproj index 804faff..6db9b86 100644 --- a/facturapi-net.csproj +++ b/facturapi-net.csproj @@ -11,7 +11,7 @@ API Keys creando una cuenta gratuita en https://www.facturapi.io factura factura-electronica cfdi facturapi mexico conekta Facturapi - 6.0.0 + 6.1.0 $(Version) Facturapi facturapi.ico From 14818845c32addd10a97e9f06cd7377bb7d89ea5 Mon Sep 17 00:00:00 2001 From: javorosas Date: Wed, 1 Apr 2026 12:23:53 +0200 Subject: [PATCH 3/3] Improve NuGet metadata and package presentation --- facturapi-net.csproj | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/facturapi-net.csproj b/facturapi-net.csproj index 6db9b86..56456cc 100644 --- a/facturapi-net.csproj +++ b/facturapi-net.csproj @@ -7,22 +7,27 @@ Facturapi Javier Rosas icon.png - Genera facturas electrónicas válidas en México (CFDI) lo más fácil posible. Obtén tus - API Keys creando una cuenta gratuita en https://www.facturapi.io - factura factura-electronica cfdi facturapi mexico conekta + SDK oficial de Facturapi para .NET. Integra facturación electrónica en México (CFDI) de forma simple y obtén una perspectiva fiscal completa de tu operación, con búsquedas indexadas, envío de documentos y trazabilidad. + SDK oficial de Facturapi para .NET para facturación electrónica en México (CFDI), envío de documentos, búsqueda y trazabilidad. + factura factura-electronica facturacion cfdi cfdi40 sat invoice invoicing facturapi mexico Facturapi 6.1.0 $(Version) + MIT + false + https://github.com/FacturAPI/facturapi-net/blob/main/CHANGELOG.md Facturapi facturapi.ico True latest disable + true + true true true snupkg Facturación Espacial - Facturación Espacial © 2025 + Facturación Espacial © 2026 https://www.facturapi.io README.md https://github.com/facturapi/facturapi-net