Un complemento de pago como su nombre lo indica es aquel documento electronico que ampara una operación de actos o actividades que se realizan, por los ingresos que perciban de los contribuyentes.
Debe expedirse por la recepción de pagos en parcialidades y en los casos en que se reciba el pago de la contraprestación en una sola exhibición, pero ésta no sea cubierta al momento de la expedición de la misma, incluso cuando se trate de operaciones a crédito y estas se paguen totalmente en fecha posterior a la emisión de la factura correspondiente.
El 1 de julio del 2017 entró en vigor de manera opcional el uso de la factura de recepción de pagos. A partir del 1 de septiembre del 2018, será obligatoria su emisión.
Deberán emitirse un comprobante CFDI 4.0 con complemento de pago cuando se perciba un cobro por una factura que tenga un saldo pendiente.
Pago que se realizo el "04/04/2018" al RFC "JAR1106038RA" en la ubicacion con el codigo postal "78220"
para liquidar un solo pago 1/1 de "1200" pesos en efectivo "01"
al CFDI relacionado con el siguiente Folio Fiscal: "F884C787-EEA6-4720-874D-B5048DB8F960"
Nota: En este ejemplo considere que debe existir una sucursal asociada con el Codigo Postal 78220, Un Perfil Fiscal Completo y un CFDI a Relacionar
var cfdi = { "Receiver": { "Name": "SinDelantal Mexico", "CfdiUse": "P01", "Rfc": "JAR1106038RA", }, "CfdiType": "P", "NameId": "14", "ExpeditionPlace": "78216", "Complemento": { "Payments": [{ "Date": "2018-04-05T05:00:00.000Z", "PaymentForm": "01", "Amount": "1200", "RelatedDocuments": [{ "Uuid": "F884C787-EEA6-4720-874D-B5048DB8F960", "Folio": "100032007", "PaymentMethod": "PUE", "PartialityNumber": "1", "PreviousBalanceAmount": "1200", "AmountPaid": "1200" }] }] } }; cfdi = facturama.cfdis.create(cfdi)
$params = { "Receiver" => { "Name" => "SinDelantal Mexico", "CfdiUse" => "P01", "Rfc" => "JAR1106038RA", }, "CfdiType" => "P", "NameId" => "14", "ExpeditionPlace" => "78216", "Complemento" => { "Payments" => [{ "Date" => "2018-04-05T05:00:00.000Z", "PaymentForm" => "01", "Currency" => "MXN", "Amount" => "1200", "RelatedDocuments" => [{ "Uuid" => "F884C787-EEA6-4720-874D-B5048DB8F960", "Folio" => "100032007", "Currency" => "MXN", "PaymentMethod" => "PUE", "PartialityNumber" => "1", "PreviousBalanceAmount" => "1200", "AmountPaid" => "1200" }] }] } }; $result = $facturama->post('2/cfdis', $params);
var newCfdi = { "Receiver": { "Name": "SinDelantal Mexico", "CfdiUse": "P01", "Rfc": "JAR1106038RA", }, "CfdiType": "P", "NameId": "14", "ExpeditionPlace": "78216", "Complemento": { "Payments": [{ "Date": "2018-04-05T05:00:00.000Z", "PaymentForm": "01", "Amount": "1200", "RelatedDocuments": [{ "Uuid": "F884C787-EEA6-4720-874D-B5048DB8F960", "Folio": "100032007", "PaymentMethod": "PUE", "PartialityNumber": "1", "PreviousBalanceAmount": "1200", "AmountPaid": "1200" }] }] } }; //llamada para la creacion Facturama.Cfdi.Create(newCfdi, function (result) { var cfdi = result; console.log("creacion de Complemento de pago", result); }, function (error) { if (error && error.responseJSON) { console.log("errores", error.responseJSON); } });
List<Currency> lstCurrencies = facturama.Catalogs().Currencies(); Currency currency = lstCurrencies.stream(). filter(p -> p.getValue().equals("MXN")).findFirst().get(); Catalog paymentMethod = facturama.Catalogs().PaymentMethods().stream(). filter(p -> p.getName().equals("Pago en una sola exhibición")).findFirst().get(); cfdi.setNameId("14"); cfdi.setCfdiType( CfdiType.Pago.getValue() ); cfdi.setExpeditionPlace("78216"); cfdi.setPaymentForm("01"); cfdi.setPaymentMethod("PUE"); cfdi.setCurrency(currency.getValue()); Receiver receiver = new Receiver(); receiver.setName("Entidad receptora"); receiver.setCfdiUse("P01"); receiver.setRfc("XAXX010101000"); cfdi.setReceiver(receiver); Complements complement = new Complements(); List<Payment> lstPagos = new ArrayList(); Payment pagos = new Payment(); pagos.setDate("2018-04-05T05:00:00.000Z"); pagos.setPaymentForm(paymentForm.getValue()); pagos.setCurrency(currency.getValue()); pagos.setAmount(1200.00); List<RelatedDocument> lstrelatedDocument = new ArrayList(); RelatedDocument relatedDocument = new RelatedDocument(); relatedDocument.setUuid("F884C787-EEA6-4720-874D-B5048DB8F960"); relatedDocument.setFolio("100032007"); relatedDocument.setCurrency(currency.getValue()); relatedDocument.setPaymentMethod("PUE"); relatedDocument.setPartialityNumber(1); relatedDocument.setPreviousBalanceAmount(1200.00); relatedDocument.setAmountPaid(1200.00); lstrelatedDocument.add(relatedDocument); pagos.setRelatedDocument(lstrelatedDocument); lstPagos.add(pagos); complement.setPayments(lstPagos); cfdi.setComplements(complement);
var cfdi = new Cfdi { NameId = nameId.Value, CfdiType = CfdiType.Pago, ExpeditionPlace = "78220", Receiver = new Receiver { Rfc = "JAR1106038RA", Name = "SinDelantal Mexico", CfdiUse = "P01" }, Complement = new Complement { Payments = new List{ new Payment { Date = "2018-04-04T00:00:00.000Z", PaymentForm = "01", Currency = "MXN", Amount = 1200.00m, RelatedDocuments = new List { new RelatedDocument { Uuid = "F884C787-EEA6-4720-874D-B5048DB8F960", Folio = "100032007", Currency = "MXN", PaymentMethod = "PUE", PartialityNumber = 1, PreviousBalanceAmount = 1200.00m, AmountPaid = 1200.00m } } } } } };
var newCfdi = { "Receiver": { "Name": "SinDelantal Mexico", "CfdiUse": "P01", "Rfc": "JAR1106038RA", }, "CfdiType": "P", "NameId": "14", "ExpeditionPlace": "78216", "Complemento": { "Payments": [{ "Date": "2018-04-05T05:00:00.000Z", "PaymentForm": "01", "Amount": "1200", "RelatedDocuments": [{ "Uuid": "F884C787-EEA6-4720-874D-B5048DB8F960", "Folio": "100032007", "PaymentMethod": "PUE", "PartialityNumber": "1", "PreviousBalanceAmount": "1200", "AmountPaid": "1200" }] }] } }; #llamada para la creacion try: cfdi = client.Cfdi.create(newCfdi.copy()) print "se creo factura", cfdi except Exception, ex: print "Error al crear factura", ex