mx

package
v0.502.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Package mx provides the Mexican tax regime.

Index

Constants

View Source
const (
	StampSATSignature   cbc.Key = "sat-sig"          // Signature - Sello Digital del SAT (optional)
	StampSATSerial      cbc.Key = "sat-serial"       // Cert Serial - Número de Certificado SAT
	StampSATTimestamp   cbc.Key = "sat-timestamp"    // Timestamp - Fecha y hora de certificación del SAT
	StampSATUUID        cbc.Key = "sat-uuid"         // Folio Fiscal
	StampSATURL         cbc.Key = "sat-url"          // URL QR Code
	StampSATProviderRFC cbc.Key = "sat-provider-rfc" // Provider RFC - RFC del Proveedor de Certificación
	StampSATChain       cbc.Key = "sat-chain"        // Cadena original del complemento de certificación digital del SAT
)

Official SAT codes to include in stamps.

View Source
const (
	KeyFormaPago    cbc.Key = "sat-forma-pago"    // for mapping to c_FormaPago's codes
	KeyTipoRelacion cbc.Key = "sat-tipo-relacion" // for mapping to c_TipoRelacion's codes
	KeyImpuesto     cbc.Key = "sat-impuesto"      // for mapping to c_Impuesto's codes
)

Custom keys used typically in meta or codes information.

View Source
const (
	TaxCategoryRVAT  cbc.Code = "RVAT"  // IVA (Retenido)
	TaxCategoryIEPS  cbc.Code = "IEPS"  // Impuesto Especial sobre Producción y Servicios
	TaxCategoryRIEPS cbc.Code = "RIEPS" // Impuesto Especial sobre Producción y Servicios (Retenido)
	TaxCategoryISR   cbc.Code = "ISR"   // Impuesto Sobre la Renta
)

Local tax categories

View Source
const (
	TaxIdentityCodeGeneric cbc.Code = "XAXX010101000"
	TaxIdentityCodeForeign cbc.Code = "XEXX010101000"
)

Constants used to specific tax identity codes.

View Source
const (
	TaxIdentityTypePerson  cbc.Key = "person"
	TaxIdentityTypeCompany cbc.Key = "company"
)

Tax Identity Type

View Source
const (
	TaxIdentityPatternPerson  = `^([A-ZÑ\&]{4})([0-9]{6})([A-Z0-9]{3})$`
	TaxIdentityPatternCompany = `^([A-ZÑ\&]{3})([0-9]{6})([A-Z0-9]{3})$`
)

Tax Identity Patterns

View Source
const CountryCode = "MX"

CountryCode is the tax country code for Mexico.

View Source
const (
	TaxRateExempt cbc.Key = "exempt"
)

Local tax rates

Variables

View Source
var IsValidTaxIdentityCode = is.Func(
	"valid RFC",
	isValidTaxIdentityCode,
)

IsValidTaxIdentityCode returns a rules.Test that checks if a tax identity code is valid for Mexico. This is used by addons to ensure valid tax codes are used.

Functions

func New

func New() *tax.RegimeDef

New provides the tax region definition

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL