facturama
Facturama Multiemisor PAC adapter.
Facturama seals and stamps from a JSON payload (CSD must already be uploaded). Pre-signed XML stamp is not supported by their public Multiemisor API.
Supported TipoDeComprobante: I, E, T, P (Pagos 2.0), N (Nómina 1.2).
Docs: https://apisandbox.facturama.mx/guias
- satcfdi.pacs.facturama.cfdi_to_facturama_payload(cfdi: CFDI) dict[source]
Map a satcfdi CFDI (typically unsigned) to Facturama Multiemisor JSON.
- class satcfdi.pacs.facturama.Facturama(username: str, password: str, environment=Environment.PRODUCTION)[source]
Bases:
PACFacturama Multiemisor API adapter.
Facturama is a billing platform that seals+stamps via Multiemisor; CSD files must be uploaded first (see
upload_csd()).Documentation: https://apisandbox.facturama.mx/guias/api-multi/proceso-facturacion
- RFC = None
- property host: str
- upload_csd(rfc: str, certificate: bytes, key: bytes, password: str | bytes) dict[source]
Upload issuer CSD required before Multiemisor issue().
- list_cfdis(*, keyword: str | None = None, status: str = 'all') list[dict][source]
List Multiemisor CFDIs (optionally filtered by keyword / UUID).
- issue(cfdi: CFDI, accept: Accept = <Accept.XML: 1>) Document[source]
Seal and stamp via Facturama Multiemisor.
The local CFDI does not need to be signed; Facturama seals with the uploaded CSD for the issuer RFC.
- stamp(cfdi: CFDI, accept: Accept = <Accept.XML: 1>) Document[source]
Operation to request sealed CFDI be stamped by PAC :param accept: :param cfdi: :return: document_id and bytes of stamped xml
- recover(document_id: str, accept: Accept = <Accept.XML: 1>) Document[source]
- Parameters:
accept
document_id
- Returns:
- cancel(cfdi: CFDI, reason: CancelReason, substitution_id: str = None, signer: Signer = None, document_id: str = None) CancelationAcknowledgment[source]
Cancel a Multiemisor CFDI.
Resolves Facturama Id from
document_idor from the CFDI UUID (Complemento.TimbreFiscalDigital.UUID) viafind_id_by_uuid().