These services will no longer be available as of April 1, 2021 , the new version of the API has these and more tools that will facilitate and save you a lot of time in validations or SAT penalties in audits, we highly recommend that you review the new documentation in https://developers.facturoporti.com.mx/reference/api-facturacion-electronica As part of the new features you will be able to:
The new API access services are published in:
https://testapi.facturoporti.com.mx/
https://api.facturoporti.com.mx/
Depending on the environment you are in, you should use sandbox or production.
Do you need help or do you need to hire services? Send us an email to [email protected] [email protected], go to the page https://www.facturoporti.com.mx/api-de-facturacion-electronica/ talk to us online or call us Call 555 546 2288 or 558 421 7675 and we will be happy to give you what you need.
Library in .Net Standard that allows you to generate any type of digital receipt Income, Expense, Transfer, Payroll, Payment, etc. (Xml and PDF) by filling out the corresponding data you can easily generate digital invoices in a matter of minutes.
It is ideal and compatible to integrate into any type of project, whether web applications, desktop, mobile (Mono, Xamarin), silverlight, WPF, .Net Core, Universal Windows Platform, Unity, etc. use the library directly in the project or add the reference using - NuGet Package
With this library you can also ring, cancel, obtain CFDI status with the SAT, consult the remaining rings, among other things.
You do not need to know any SAT rules, the library will generate the XML according to Annex 20, the library takes care of everything, facilitating the integration process of your system and/or application, service, to comply with what the SAT requests.
The library is very light and fast, it uses Rest Api calls that will allow you to generate your CFDIs and send them by email all at the same time.
It is recommended to use the Visual Studio 2015 or 2017 community development IDE or higher. All community versions are free and can be downloaded from https://visualstudio.microsoft.com/es/vs/community/
The library has the following requirements:
Also check the version of framework you need according to your project:
Get the latest version of the FacturoPorTi stamp library in NuGet : FacturoPorTi.CFDI
In GitHub - FacturoPorTi-Factura-Electronica-dll there is a complete example project of the use of all the methods of the library; We highly recommend that you download it and test it.
To send a request to ring, an object of type CFDIPetition must be generated, this in turn has other objects that must be filled:
using System ;
using System . Collections . Generic ;
using System . IO ;
using System . Linq ;
using System . Text ;
using System . Threading . Tasks ;
using FacturoPorTi . Api . Cfdi ;
using FacturoPorTi . Api . Cfdi . Entidades ;
using FacturoPorTi . Api . Cfdi . Genericos ;
private static void TimbrarDocumento ( )
{
Archivos manager = new Archivos ( ) ;
TimbreFiscalDigital Timbre = new TimbreFiscalDigital ( ) ;
CFDIPeticion Peticion = new CFDIPeticion ( ) ;
Utilerias utilerias = new Utilerias ( ) ;
string NombreArchivo = string . Empty ;
#region "Datos Generales"
Peticion . DatosGenerales = new DatosGeneralesCFDI ( ) ;
Peticion . DatosGenerales . Usuario = "PruebasTimbrado" ; // Este usuario se genera desde la pagina de https://cfdi.facturoporti.com.mx/ se debe de registrar para usar el productivo
Peticion . DatosGenerales . Password = "@Notiene1" ; // Es la contraseña del usuario cuando se registró
Peticion . DatosGenerales . GeneraPDF = "true" ;
Peticion . DatosGenerales . EnviaEmail = "false" ; // Valores permitidos "true" : "false";
Peticion . DatosGenerales . ReceptorEmail = "[email protected]" ;
//Logotipo (opcional) acepta una imagen jpeg o png en base 64 menor a 100 KB
//Peticion.DatosGenerales.Logotipo = manager.ConvertirByteToBase64(manager.ConvertirStreamToByte(manager.Abrir("Cambiar la ruta de lectura o enviar la imagen en base 64")));
enumTipoDocumento TipoDocumentoActual = enumTipoDocumento . Factura ;
switch ( TipoDocumentoActual )
{
case enumTipoDocumento . Factura :
Peticion . DatosGenerales . CFDI = "Factura" ;
Peticion . DatosGenerales . TipoCFDI = "Ingreso" ;
break ;
case enumTipoDocumento . NotaCargo :
Peticion . DatosGenerales . CFDI = "NotaCargo" ;
Peticion . DatosGenerales . TipoCFDI = "Ingreso" ;
break ;
case enumTipoDocumento . NotaCredito :
Peticion . DatosGenerales . CFDI = "NotaCredito" ;
Peticion . DatosGenerales . TipoCFDI = "Egreso" ;
break ;
case enumTipoDocumento . CartaPorte :
Peticion . DatosGenerales . CFDI = "CartaPorte" ;
Peticion . DatosGenerales . TipoCFDI = "Traslado" ;
break ;
case enumTipoDocumento . Pago :
Peticion . DatosGenerales . CFDI = "Pago" ;
Peticion . DatosGenerales . TipoCFDI = "Pago" ;
break ;
case enumTipoDocumento . ReciboNominaCFDI :
Peticion . DatosGenerales . CFDI = "ReciboNomina" ;
Peticion . DatosGenerales . TipoCFDI = "ReciboNomina" ;
break ;
}
Peticion . DatosGenerales . OpcionDecimales = ( ( int ) enumOpcionDecimales . Redondear ) . ToString ( ) ; // Valores permitidos 1: Truncar (Operaciones exactas) 2: Redondear hacia arriba o hacia abajo las cantidades
Peticion . DatosGenerales . NumeroDecimales = "2" ; // El valor predeterminado es 2 hasta un máximo de 6 decimales
#endregion "Datos Generales"
#region "Encabezado"
#region "Emisor"
Peticion . Encabezado = new EncabezadoCFDI ( ) ;
Peticion . Encabezado . Emisor = new EmisorCFDI ( ) ;
Peticion . Encabezado . Emisor . RFC = "AAA010101AAA" ; // Para realizar pruebas solamente se puede usar este RFC AAA010101AAA
Peticion . Encabezado . Emisor . NombreRazonSocial = "Mi nombre o el nombre de mi empresa" ;
Peticion . Encabezado . Emisor . RegimenFiscal = "601" ; // Se agrega la clave de acuerdo al catálogo del SAT http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
// El domicilio de emision es opcional pero se agrega por peticion del usuario
DireccionCFDI direccion = new DireccionCFDI ( ) ;
direccion . Calle = "Avenida Reforma" ;
direccion . NumeroExterior = "1234" ;
direccion . NumeroInterior = "XA" ;
direccion . Colonia = "Roma Norte" ;
direccion . Estado = "Ciudad de México" ;
direccion . Municipio = "Benito Juarez" ;
direccion . Pais = "México" ;
direccion . CodigoPostal = "06470" ;
Peticion . Encabezado . Emisor . Direccion = new List < DireccionCFDI > ( ) ;
Peticion . Encabezado . Emisor . Direccion . Add ( direccion ) ;
#endregion "Emisor"
#region "Receptor"
Peticion . Encabezado . Receptor = new ReceptorCFDI ( ) ;
Peticion . Encabezado . Receptor . RFC = "XEXX010101000" ;
Peticion . Encabezado . Receptor . NombreRazonSocial = "Nombre del cliente" ;
Peticion . Encabezado . Receptor . UsoCFDI = "G03" ; // Se agrega la clave de acuerdo al catálogo del SAT http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
// El domicilio del receptor es opcional pero se agrega por peticion del usuario
direccion = new DireccionCFDI ( ) ;
direccion . Calle = "Leo" ;
direccion . NumeroExterior = "9876" ;
direccion . NumeroInterior = "A-34" ;
direccion . Colonia = "San Rafael" ;
direccion . Estado = "Morelos" ;
direccion . Municipio = "Cuernavaca" ;
direccion . Pais = "México" ;
direccion . CodigoPostal = "62775" ;
Peticion . Encabezado . Receptor . Direccion = direccion ;
#endregion "Receptor"
Peticion . Encabezado . Fecha = DateTime . Now . ToString ( "yyyy-MM-ddTHH:mm:ss" ) ; // Se debe de enviar con el formato indicado yyyy-MM-ddTHH:mm:ss
Peticion . Encabezado . Serie = "A" ; // Es el numero de serie es un valor opcional
Peticion . Encabezado . Folio = "12" ; // Es el numero de folio es un valor opcional
Peticion . Encabezado . MetodoPago = "PUE" ; // Se agrega la clave de acuerdo al catálogo del SAT http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
Peticion . Encabezado . FormaPago = "99" ; // Se agrega la clave de acuerdo al catálogo del SAT http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
Peticion . Encabezado . Moneda = "MXN" ; // Se agrega la clave de acuerdo al catálogo del SAT http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
Peticion . Encabezado . LugarExpedicion = "06470" ;
Peticion . Encabezado . SubTotal = "1500" ; // Es la suma de los importes en bruto
Peticion . Encabezado . Total = "1740" ; // Es la suma de los importes + los impuestos trasladados - los impuestos retenidos
#endregion "Encabezado"
#region "Conceptos"
Peticion . Conceptos = new List < ConceptoCFDI > ( ) ;
ConceptoCFDI concepto = new ConceptoCFDI ( ) ;
concepto . Cantidad = "1" ;
concepto . CodigoUnidad = "E48" ; // Se agrega la clave de acuerdo al catálogo del SAT http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
//concepto.Unidad = "Pieza"; // Este es un valor opcional
//concepto.Serie = ""; // Este es un valor opcional se agregan numero de series, partes, etc.
concepto . CodigoProducto = "53112101" ; // Se agrega la clave de acuerdo al catálogo del SAT http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
concepto . Producto = "Zapatos de caballero marca patito" ;
concepto . PrecioUnitario = "1000" ;
concepto . Importe = "1000" ;
concepto . Impuestos = new List < ImpuestosCFDI > ( ) ;
ImpuestosCFDI impuesto = new ImpuestosCFDI ( ) ;
impuesto . TipoImpuesto = ( ( int ) enumTipoImpuesto . Trasladado ) . ToString ( ) ; // Tipo de impuesto se envía la clave 1 traslado 2 retenido
impuesto . Impuesto = ( ( int ) enumImpuesto . IVA ) . ToString ( ) ;
impuesto . Factor = ( ( int ) enumFactor . Tasa ) . ToString ( ) ;
impuesto . Base = concepto . Importe ;
impuesto . Tasa = "0.160000" ; // Se debe de enviar con los 6 decimales la tasa para revisar las tasas actuales vea http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
impuesto . ImpuestoImporte = utilerias . RegresaStringDecimalesXOpcion ( Convert . ToDecimal ( concepto . Importe ) * Convert . ToDecimal ( "0.160000" ) , ( int ) enumOpcionDecimales . Redondear , 2 ) ;
concepto . Impuestos . Add ( impuesto ) ;
// En caso de llevar IEPS se llena esta seccion
//if (TasaIEPS != null)
//{
// impuesto.TipoImpuesto = ((int)enumTipoImpuesto.Trasladado).ToString(); // Tipo de impuesto se envía la clave 1 traslado 2 retenido
// impuesto.Impuesto = ((int)enumImpuesto.IEPS).ToString();
// impuesto.Factor = ((int)enumFactor.Tasa).ToString();
// impuesto.Base = concepto.Importe;
// impuesto.Tasa = "0.08000"; // en el ejemplo la tasa es de 8 porciento Se debe de enviar con los 6 decimales la tasa para revisar las tasas actuales vea http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
// impuesto.ImpuestoImporte = utilerias.RegresaStringDecimalesXOpcion(Convert.ToDecimal(concepto.Importe) * Convert.ToDecimal("0.080000"), (int)enumOpcionDecimales.Redondear, 2);
// concepto.Impuestos.Add(impuesto);
//}
//if (RetencionIVA != null)
//{
// impuesto.TipoImpuesto = ((int)enumTipoImpuesto.Retenido).ToString(); // Tipo de impuesto se envía la clave 1 traslado 2 retenido
// impuesto.Impuesto = ((int)enumImpuesto.IVA).ToString();
// impuesto.Factor = ((int)enumFactor.Tasa).ToString();
// impuesto.Base = concepto.Importe;
// impuesto.Tasa = "0.106667"; // en el ejemplo la tasa es de 2/3 partes de IVA 10.66667 porciento Se debe de enviar con los 6 decimales la tasa para revisar las tasas actuales vea http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
// impuesto.ImpuestoImporte = utilerias.RegresaStringDecimalesXOpcion(Convert.ToDecimal(concepto.Importe) * Convert.ToDecimal("0.106667"), (int)enumOpcionDecimales.Redondear, 2);
// concepto.Impuestos.Add(impuesto);
//}
//if (RetencionISR != null)
//{
// impuesto.TipoImpuesto = ((int)enumTipoImpuesto.Retenido).ToString(); // Tipo de impuesto se envía la clave 1 traslado 2 retenido
// impuesto.Impuesto = ((int)enumImpuesto.ISR).ToString();
// impuesto.Factor = ((int)enumFactor.Tasa).ToString();
// impuesto.Base = concepto.Importe;
// impuesto.Tasa = "0.10000"; // en el ejemplo la tasa es de 10 porciento Se debe de enviar con los 6 decimales la tasa para revisar las tasas actuales vea http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
// impuesto.ImpuestoImporte = utilerias.RegresaStringDecimalesXOpcion(Convert.ToDecimal(concepto.Importe) * Convert.ToDecimal("0.100000"), (int)enumOpcionDecimales.Redondear, 2);
// concepto.Impuestos.Add(impuesto);
//}
Peticion . Conceptos . Add ( concepto ) ;
concepto = new ConceptoCFDI ( ) ;
concepto . Cantidad = "2" ;
concepto . CodigoUnidad = "E48" ; // Se agrega la clave de acuerdo al catálogo del SAT http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
//concepto.Unidad = "Pieza"; // Este es un valor opcional
//concepto.Serie = ""; // Este es un valor opcional se agregan numero de series, partes, etc.
concepto . CodigoProducto = "53112102" ; // Se agrega la clave de acuerdo al catálogo del SAT http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
concepto . Producto = "Zapatos de mujer marca patito" ;
concepto . PrecioUnitario = "250" ;
concepto . Importe = "500" ;
concepto . Impuestos = new List < ImpuestosCFDI > ( ) ;
impuesto = new ImpuestosCFDI ( ) ;
impuesto . TipoImpuesto = ( ( int ) enumTipoImpuesto . Trasladado ) . ToString ( ) ; // Tipo de impuesto se envía la clave 1 traslado 2 retenido
impuesto . Impuesto = ( ( int ) enumImpuesto . IVA ) . ToString ( ) ;
impuesto . Factor = ( ( int ) enumFactor . Tasa ) . ToString ( ) ;
impuesto . Base = concepto . Importe ;
impuesto . Tasa = "0.160000" ; // Se debe de enviar con los 6 decimales la tasa para revisar las tasas actuales vea http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI.xls
impuesto . ImpuestoImporte = utilerias . RegresaStringDecimalesXOpcion ( Convert . ToDecimal ( concepto . Importe ) * Convert . ToDecimal ( "0.160000" ) , ( int ) enumOpcionDecimales . Redondear , 2 ) ;
concepto . Impuestos . Add ( impuesto ) ;
Peticion . Conceptos . Add ( concepto ) ;
#endregion "Conceptos"
#region "Realiza el Timbrado"
FacturoPorTi . Api . Cfdi . ComprobanteDigital comprobante = new FacturoPorTi . Api . Cfdi . ComprobanteDigital ( ) ;
comprobante . SandBox = true ; // True = pruebas, False= Productivo
//Para el ejercicio se usan los certificados de prueba del SAT
// Tambien se puede enviar un stream o arreglo de bytes
string RutaCertificado = ObtieneDirectorioAplicacion ( ) + @"CertificadoAAA010101AAA.cer" ;
string RutaLlavePrivada = ObtieneDirectorioAplicacion ( ) + @"CertificadoAAA010101AAA.key" ;
string RutaTimbrados = ObtieneDirectorioAplicacion ( ) + @"Timbrados" ;
Console . WriteLine ( "Inicio de Timbrado " + DateTime . Now ) ;
var resultado = comprobante . GeneraCFDI ( Peticion , RutaCertificado , RutaLlavePrivada , "12345678a" ) ;
if ( resultado == true )
{
NombreArchivo = Peticion . Encabezado . Receptor . RFC + AcronimoArchivo ( TipoDocumentoActual ) + ( Peticion . Encabezado . Serie == null ? "" : Peticion . Encabezado . Serie ) + Peticion . Encabezado . Folio + "_" + Convert . ToDateTime ( Peticion . Encabezado . Fecha ) . ToString ( "yyyyMMdd" ) ;
manager . Guardar ( manager . ConvertirBase64ToByte ( comprobante . Timbrado . CFDITimbrado . Respuesta . CFDIXML ) , RutaTimbrados + NombreArchivo + ".xml" ) ;
manager . Guardar ( manager . ConvertirBase64ToByte ( comprobante . Timbrado . CFDITimbrado . Respuesta . PDF ) , RutaTimbrados + NombreArchivo + ".pdf" ) ;
Timbre = utilerias . CargaObjetoDeXML < TimbreFiscalDigital > ( new TimbreFiscalDigital ( ) , new Archivos ( ) . ConvertirBase64ToString ( comprobante . Timbrado . CFDITimbrado . Respuesta . TimbreXML ) ) ;
UUID = Timbre . UUID ;
Console . WriteLine ( comprobante . Mensaje + " UUID " + UUID ) ;
Console . WriteLine ( " Para ver los archivos ingrese a la carpeta " + RutaTimbrados ) ;
}
else
{
Console . WriteLine ( "" ) ;
Console . WriteLine ( comprobante . Mensaje ) ;
}
Console . WriteLine ( "Fin de Timbrado" ) ;
Console . WriteLine ( "" ) ;
//Console.ReadLine();
#endregion "Realiza el Timbrado"
}
If you use the project with the example code Run or debug the application, the Xml and PDF will automatically be generated with the data you entered (it is a console application that helps you debug the information you send and receive). In case you integrate it into your solution, remember to have the references corresponding to the requirements specified above.
Review the response object CFDITimbradoRespuesta in which you will find the XML, PDF, tax stamp, status, errors, etc. **Any error code other than "000" indicates some type of error** that must be reviewed and corrected.
The CFDIXML, TimbreXML and PDF attributes are in Base64 and must be converted to text to obtain the XML and/or CFDI stamp. In the case of PDF, they can be saved or converted in binary to obtain the printed representation. This is already done in the example project.
The library allows you to send one or more Fiscal Folios to cancel at the same time, you only have to send the username, password, RFC of the issuer, and digital certificate.
private static void CancelarUUID ( )
{
CancelarCFDIPeticion Peticion = new CancelarCFDIPeticion ( ) ;
Peticion . Usuario = "PruebasTimbrado" ; // Este usuario se genera desde la pagina de https://cfdi.facturoporti.com.mx/ se debe de registrar para usar el productivo
Peticion . Password = "@Notiene1" ; // Es la contraseña del usuario cuando se registró
Peticion . RFC = "AAA010101AAA" ;
Peticion . UUIDs = new List < string > ( ) ;
Peticion . UUIDs . Add ( UUID ) ;
#region "Realiza la cancelación"
FacturoPorTi . Api . Cfdi . ComprobanteDigital comprobante = new FacturoPorTi . Api . Cfdi . ComprobanteDigital ( ) ;
comprobante . SandBox = true ; // True = pruebas, False= Productivo
//Para el ejercicio se usan los certificados de prueba del SAT
// Tambien se puede enviar un stream o arreglo de bytes
string RutaCertificado = ObtieneDirectorioAplicacion ( ) + @"CertificadoAAA010101AAA.cer" ;
string RutaLlavePrivada = ObtieneDirectorioAplicacion ( ) + @"CertificadoAAA010101AAA.key" ;
Console . WriteLine ( "Inicio de cancelación " + DateTime . Now ) ;
var resultado = comprobante . CancelarCFDI ( Peticion , RutaCertificado , RutaLlavePrivada , "12345678a" ) ;
if ( resultado == true )
{
Console . WriteLine ( comprobante . Mensaje + " Respuesta del Folio " + comprobante . Cancelaciones . FoliosRespuesta [ 0 ] . EstatusCancelacionSAT ) ;
}
else
{
Console . WriteLine ( "" ) ;
Console . WriteLine ( comprobante . Mensaje ) ;
}
Console . WriteLine ( "Fin de la cancelación" ) ;
Console . WriteLine ( "" ) ;
//Console.ReadLine();
#endregion "Realiza el Timbrado"
}
If you use the project with the example code Run or debug the application, the cancellation will automatically be sent with the data you entered (it is a console application that helps you debug the information you send and receive). In case you integrate it into your solution, remember to have the references corresponding to the requirements specified above.
The library allows you to consult one or more Fiscal Folios to review the status of the cancellation; According to the rules dictated by the SAT, the CFDI, depending on the rules that apply, can be canceled immediately or a maximum of 72 hours must be waited for the user receiving the CFDI to accept or reject the cancellation of the CFDI.
During this period of 72 hours, the status of the CFDI can be automatically updated, so it is required to periodically consult the service to validate the current status of the CFDI. It is not recommended to do it with a frequency of less than 1 hour since the SAT also takes from 1 to 72 hours to see the change in status reflected. So it is suggested that you call this service with a period of more than 1 hour each time, before that time it will be in vain to consult the status of the CFDI.
private static void ConsultarEstatusUUID ( )
{
ConsultaEstatusPeticion Peticion = new ConsultaEstatusPeticion ( ) ;
Peticion . Usuario = "PruebasTimbrado" ; // Este usuario se genera desde la pagina de https://cfdi.facturoporti.com.mx/ se debe de registrar para usar el productivo
Peticion . Password = "@Notiene1" ; // Es la contraseña del usuario cuando se registró
Peticion . UUIDs = new List < string > ( ) ;
Peticion . UUIDs . Add ( UUID ) ;
#region "Realiza la cancelación"
FacturoPorTi . Api . Cfdi . ComprobanteDigital comprobante = new FacturoPorTi . Api . Cfdi . ComprobanteDigital ( ) ;
comprobante . SandBox = true ; // True = pruebas, False= Productivo
Console . WriteLine ( "Inicio de consulta " + DateTime . Now ) ;
var resultado = comprobante . ConsultaEstatusCFDI ( Peticion ) ;
if ( resultado == true )
{
Console . WriteLine ( comprobante . Mensaje + " " + comprobante . EstatusFolios . FoliosRespuesta [ 0 ] . EstatusCancelacionSAT ) ;
}
else
{
Console . WriteLine ( "" ) ;
Console . WriteLine ( comprobante . Mensaje ) ;
}
Console . WriteLine ( "Fin de la consulta" ) ;
Console . WriteLine ( "" ) ;
//Console.ReadLine();
#endregion "Realiza el Timbrado"
}
In order to issue or cancel any type of CFDI it is necessary to have a Rest Service toll package. If you are using the test mode with the user in the example, he has a toll package that you can always use.
When you pass the productive environment you must have a valid account to access FacturoPorTi Register Here and also a package of ringtones for the Rest Service. You can consult the updated price list of doorbells directly at:
Price list
As we have several packages with different characteristics in terms of use and price, you must enter the Rest Api Service Stamps table there you will find the terms and use of each package.
private static void ConsultarTimbresRestantes ( )
{
ConsultaTimbresRestantesPeticion Peticion = new ConsultaTimbresRestantesPeticion ( ) ;
Peticion . Usuario = "PruebasTimbrado" ; // Este usuario se genera desde la pagina de https://cfdi.facturoporti.com.mx/ se debe de registrar para usar el productivo
Peticion . Password = "@Notiene1" ; // Es la contraseña del usuario cuando se registró
#region "Realiza la cancelación"
FacturoPorTi . Api . Cfdi . ComprobanteDigital comprobante = new FacturoPorTi . Api . Cfdi . ComprobanteDigital ( ) ;
comprobante . SandBox = true ; // True = pruebas, False= Productivo
Console . WriteLine ( "Inicio de consulta de timbres restantes " + DateTime . Now ) ;
var resultado = comprobante . ConsultaTimbresRestantes ( Peticion ) ;
if ( comprobante . Resultado == true )
{
Console . WriteLine ( comprobante . Mensaje ) ;
Console . WriteLine ( " Fecha de Compra = " + resultado . FechaCompra + " Timbres Utilizados= " + resultado . TimbresUtilizados + " CreditosRestantes = " + resultado . CreditosRestantes ) ;
}
else
{
Console . WriteLine ( "" ) ;
Console . WriteLine ( comprobante . Mensaje ) ;
}
Console . WriteLine ( "Fin de la consulta de timbres restantes" ) ;
Console . ReadLine ( ) ;
#endregion "Realiza el Timbrado"
}
If you want to know more options on how to generate any type of CFDI, read the documentation with the data dictionary that contains all the attributes and its description of the values that are allowed https://developers.facturoporti.com.mx/reference/api- electronic-billing
If you need help or have questions, contact us at [email protected] or go to FacturoPorTi to help you with your needs.
Fork the repository
Clone the repository
git clone [email protected]:yourUserName/factura-electronica-Dll-Api-Rest.git
Create a branch
git checkout desarrollo
git pull al original desarrollo
# Podrás escoger el nombre de tu rama
git checkout -b <feature/my_branch>
git add .
git commit -m "mis cambios"
git push origin <feature/my_branch>
***-
Developed in Mexico by FacturoPorTi. Use license See more.