meta data de esta página
Enviar() Method
The function in charge of building and sending the electronic document.
REQUEST: Parameters to send | ||||||
---|---|---|---|---|---|---|
Type | Identifier | Description | ||||
String | TokenEmpresa/TokenPassword | Supplied by The Factory HKA | ||||
Object | DocumentoElectronico | See details below | ||||
Electronic Document | ||||||
Type | Required | Format | Identifier | Description | ||
String | YES | AN|4 | CodigoSucursalEmsior | 0000: Main location 0001 onwards: Other locations; numbers and letters allowed. |
DatosFactura | ||||
---|---|---|---|---|
Type | Required | Format | Identifier | Description |
String | YES | N|2 | tipoEmision | 01: Prior Authorization, normal operation. 02: Prior Authorization, contingency operation. 03: Post emission Authorization, normal operation. 04: Post emission Authorization, contingency operation. |
String | C/C | AN|25 | fechaInicioContingencia | YYYY-MM-DD hh:mm:ssTZH required if, tipoEmision = 02 / 04 |
String | C/C | AN|15..250 | motivoContingencia | Mandatory if typeEmission=02 / 04 If the contingency lasts more than 72 hours you must also explain the reasons for not having returned to normal operation. |
String | YES | N|2 | tipoDocumento | 01: Internal bill 02: Import bill 03: Export bill 04: Credit note referring to a E-bill 05: Debit note referring to a E-bill 06: Generic credit note 07: Generic debit note 08: Free Zone bill 09: Reimbursement. |
String | YES | N|10 | numeroDocumentoFiscal | Number of the fiscal document in the corresponding series, from 0000000001 to 9999999999, cant restart the sequence. Fill with zeros the positions to the left. |
String | YES | N|3 | puntoFacturacionFiscal | Billing Point of the fiscal document inside the billing location. Allows independent billing numbering sequences. The value "zero" is not allowed. Fill with zeros the positions to the left. |
String | NO | AN|25 | fechaEmision | YYYY-MM-DDThh:mm:ssTZH |
String | NO | N|25 | fechaSalida | YYYY-MM-DDThh:mm:ssTZH Report when known. |
String | YES | N|2 | NaturalezaOperacion | 01: Sale. 02: Export. 10: Transfer. 11: Return. 12: Consignment. 13: Remittance. 14: Free delivery. 20: Purchase. 21: Import. |
String | YES | N|1 | tipoOperacion | 1: Exit or sale. 2: Entry or purchase (purchase bill - for informal trade. E.g.: cab driver, manual workers). |
String | YES | N|1 | destinoOperacion | 1: Panamá. 2: Foreign. |
String | YES | N|1 | formatoCAFE | 1: No CAFE issuing: The issuer may decide to issue the CAFE any time after the authorization of the E-bill. 2: Ticket printer. 3: 8 ½” X 11” paper. |
String | YES | N|1 | entregaCAFE | 1: No CAFE issuing: The sender may decide to issue the CAFE at any time after the authorization of the E-bill. 2: CAFE issued on paper. 3: CAFE sent as an electronic document. |
String | YES | N|1 | envioContenedor | 1: Normal. 2: The receiver exempts the sender from the obligation of sending the container. The sender may decide to deliver the container, for any reason, at a time after the authorization |
String | YES | N|1 | procesoGeneracion | 1: Issued by the taxpayer's invoicing system (own development or purchased product). |
String | YES | N|1 | tipoVenta | Type of sale: 1:Business sale. 2: Fixed asset sale. 3:Real estate sale. 4: Service bill. If it is not a sale, do not report this field. |
String | YES | N|1 | tipoSucursal | 1: Retail location 2: Business to business location |
String | NO | AN|...5000 | informacionInteres | Extra information related to the E-bill. |
Cliente (Customer) | ||||
Type | Required | Format | Identifier | Description |
String | YES | N|2 | tipoClienteFE | Identifies the type of E-bill recipient. 01:Taxpayer. 02: Normal consumer. 03:Government. 04:Foreign. |
String | YES | N|1 | tipoContribuyente | Type of Taxpayer: 1:Person. 2:Business. |
String | YES | N|20 | numeroRUC | RUC of the Receiver. If tipoClienteFE = 02: this field can be filled with an ID number if requested by the customer. |
String | NO | N|2 | digitoVerificadorRUC | It must be calculated based on the RUC algorithm published by the DGI. It is mandatory and must be valid if TipoClienteFE = 01/03 (ITBMS taxpayer). |
String | C/C | AN|..100 | razonSocial | Mandatory if tipoClienteFE = 01/03 (ITBMS taxpayer). |
String | C/C | AN|..100 | direccion | Urbanization, Street, House/Building or Premise number. Mandatory if tipoClientFE = 01/03 (ITBMS taxpayer). |
String | C/C | AN|..8 | codigoUbicacion | Mandatory if tipoClienteFE = 01/03. Location code. |
String | C/C | AN|..50 | provincia | Mandatory if tipoClienteFE = 01/03 (ITBMS taxpayer). According to the Unified Catalog of Provinces, Districts and Counties. |
String | C/C | AN|..50 | distrito | Mandatory if TipoClienteFE = 01/03 (ITBMS taxpayer). According to the Unified Catalog of Provinces, Districts and Counties. |
String | C/C | AN|..50 | corregimiento | Mandatory if TipoClienteFE = 01/03 (ITBMS taxpayer). According to the Unified Catalog of Provinces, Districts and Counties. |
String | YES | N|2 | tipoIdentificacion | Mandatory if tipoClienteFE = 04:Foreign. 01:Passport 02:Local ID number 99:Other |
String | YES | AN|..50 | nroIdentificacionExtranjero | Passport or Foreign Tax Identification Number. Mandatory if tipoClienteFE=04: Foreigner. |
String | YES | AN|..50 | paisExtranjero | Only used if nroIdentificacionExtranjero is filled in with a passport number. Use the full country name. |
String | NO | AN|7..12 | telefono1 | E-bill recipient's contact phone number. Allowed formats: 999-9999 or 9999-9999. |
String | NO | AN|..50 | correoElectronico1 | Recipient's email address. Must be a valid email. |
String | YES | AN|2 | pais | According to the codes of the Unified Catalog of Provinces, Districts and Counties - Must be PA (Panama) if destinoOperacion = 1 (Panama). - Cannot be PA (Panama) if DestinationOperation = 2 (other country)". |
String | C/C | AN|5..50 | paisOtro | Mandatory if country = ZZZ Cannot exist if country <> ZZ. |
DatosFacturaExportacion (Required if operation destination other than Panamá) | ||||
---|---|---|---|---|
Type | Required | Format | Identifier | Description |
String | YES | AN|3 | condicionesEntrega | Terms of delivery according to Table 1. INCOTERMS. |
String | YES | AN|3 | monedaOperExportacion | Currency code used for export, according to Table 2. ISO 4217 Standard. |
String | C/C | AN|5..50 | monedaOperExportacionNonDef | Mandatory if monedaOperExportacion = ZZZ For currencies not defined in Table 2. ISO 4217. |
String | C/C | N|1..11|2.4 | tipoDeCambio | For currencies other than USD. Mandatory if monedaOperExportacion exists. |
String | C/C | N|1..20|0.4 | montoMonedaExtranjera | For currencies other than USD. Mandatory if MonedaOperExportacion exists. Must correspond to the result of tipoDeCambio multiplied by totalFactura. |
String | NO | AN|5..50 | puertoEmbarque | Shipping port |
List<docFiscalReferenciado> (Referenced fiscal document, optional)) | ||||
Type | Required | Format | Identifier | Description |
String | YES | AN|25 | fechaEmisionDocFiscalReferenciado | Date of issuance of the referenced Tax Document. |
String | YES | AN|66 | cufeFEReferenciada | CUFE of referenced E-bill. Must be the 66 values that make up the CUFE. |
String | YES | AN|22 | nroFacturaPapel | It refers to the number of the paper bill. |
String | NO | AN|22 | nroFacturaIF | Bill number issued by fiscal printer. |
List<AutorizadoDescargaFEyEventos> | ||||
---|---|---|---|---|
Type | Required | Format | Identifier | Description |
String | YES | N|1 | tipoContribuyente | Type of Taxpayer: 1:Person, 2: Business. |
String | YES | AN|20 | rucReceptor | RUC authorized to download the E-bill. Example: The company wishes to give access to its accounting firm or to a third party. |
String | YES | N|1 | digitoVerifRucReceptor | It must be calculated based on the RUC algorithm published by the DGI. |
List<Item> | ||||
Type | Required | Format | Identifier | Description |
String | YES | AN|2..500 | descripcion | Description of the product or service. |
String | NO | AN|1..20 | codigo | Code of the product or service in the sellers catalog. |
String | NO | AN|1..20 | unidadMedida | It must correspond to the units of measure list provided in Table 3. |
String | YES | N|1..9|2.6 | cantidad | Quantity of the product or service, in the unit of measure of the internal code. Expressed in the unit of measure of the internal code. |
String | C/C | AN|10 | fechaFabricacion | Format YYYY-MM-DD Mandatory if the item is: Pharmaceutical material, medicine, food. |
String | C/C | AN|10 | fechaCaducidad | Format YYYY-MM-DD. |
String | NO | AN|2 | codigoCPBSAbrev | Must correspond to the table of the Panamanian Codification of Goods and Services of Segments and Families in Table 4. Do not report this field if the good or service cannot be classified in any of the options of this Table. |
String | C/C | AN|4 | codigoCPBS | Must correspond to the table of the Panamanian Codification of Goods and Services in Table 4. Mandatory field if it is a sale to the Panamanian government. |
String | NO | AN|1..30 | unidadMedidaCPBS | Must correspond to the catalog of units of measurement in Table 3. |
String | NO | AB|0..5000 | infoItem | Information of interest of the seller with respect to an item of the E-bill. |
String | YES | N|0..11|2.6 | precioUnitario | Unit price of the good or service. If the item is not assessable: report field in 0.00 |
String | YES | N|1..9|2.6 | precioUnitarioDescuento | Report the value of the discount in Balboas, not in percentage. If the item value can't be calculated: Do not report in the field. The value reported must be less than the unit price. |
String | YES | N|1..9|2..6 | precioItem | Item price. If the item value can't be calculated: declare 0.00. precioItem = cantidad * (precioUnitario - precioUnitarioDescuento) |
String | NO | N|1..9|2 | precioAcarreo | Shipping price for this specific item. If reported, the shipping price can't be charged in total. |
String | NO | N|1..9|2 | precioSeguro | Price of insurance for this specific item. If reported, the insurance price can't be charged in total. |
String | YES | N|1..9|2.6 | valorTotal | Sum of item price with tax amounts. If the item value can't be calculated: report field in 0.00 Otherwise: report the sum of precioItem, precioAcarreo, precioSeguro, valorITBMS and valorISC. |
String | YES | N|..14 | codigoGTIN | GTIN code of the item, for the sale unit. Former EAN, UPC and DUN-14 codes. Inform empty field if the product does not have this code. |
String | YES | N|1..9|0.6 | cantGTINCom | Quantity of the product or service in the GTIN Code of the sale item. |
String | YES | N|..14 | codigoGTINInv | GTIN code of the item, for inventory. Old EAN, UPC and DUN-14 codes Report empty field if the product does not have this code. |
String | YES | N|1..9|0.6 | cantGTINComInv | Quantity of the product or service in the GTIN Code of the inventory item. |
String | YES | N|2 | tasaITBMS | ITBMS rate applicable to the item. 00:0% (exempt) 01:7% 02:10% 03:15% |
String | YES | N|1..9|2.6 | valorITBMS | ITBMS amount of the item. Product of tasaITBMS multiplied by precioItem |
String | C/C | N|1..11|2.4 | tasaISC | ISC rate applicable to the item. According to current legislation if applicable. |
String | C/C | N|1..9|2.6 | valorISC | ISC amount of the item. According to current legislation, in case a fixed or calculated value is applied. Product of tasaISC multiplied by precioItem if applicable |
String | C/C | N|2| | tasaOTI | Codes: 01:SUME 911 02:Phone number transfer fee 03:Insurance tax |
String | C/C | N|1..9|2.6 | valorTasa | Value of other fee or tax (OTI) |
Vehiculo (Vehicle, applicable only if new) | ||||
---|---|---|---|---|
Type | Required | Format | Identifier | Description |
String | YES | AN|2 | modalidadOperacionVenta | 01:sale to representative. 02:sale to final consumer. 03:sale to government. 04:sale to vehicle fleet. 99:other. |
String | C/C | AN|10..50 | modalidadOperacionVentaNoDef | Mandatory if: modalidadOperacionVenta = 99 |
String | YES | AN|17 | chasis | VIN number. Vehicle Chassis. |
String | C/C | AN|1..4 | codigoColor | Vehicle color. Manufacturer's internal code. |
String | NO | AN|1..40 | colorNombre | Description of the color of the vehicle. Optional field. |
String | YES | N|1..4 | potenciaMotor | Engine power (CV). |
String | C/C | N|1..4 | capacidadMotor | Engine power (HP). |
String | NO | N|1..11|0.4 | pesoNeto | Net Weight in Tons. Optional field. |
String | NO | N|1..11|0.4 | pesoBruto | Gross weight in tons. |
String | YES | N|2 | tipoCombustible | 01:gasoline. 02:diesel. 03:ethanol. 08:electric. 09:gasoline/electric. 99:other. |
String | C/C | AN|10..50 | tipoCombustibleNoDef | Mandatory if tipoCombustible = 99 |
String | YES | AN|1..21 | numeroMotor | Engine number. |
String | NO | N|1..11|0.4 | capacidadTraccion | Maximum traction capacity in Tons. Optional field. |
String | NO | N|1..11|0.4 | distanciaEjes | Distance between axles in meters. Optional field. |
String | C/C | N|4 | anoModelo | Model year of manufacture. |
String | NO | N|4 | anoFabricacion | Year of manufacture. |
String | NO | N|1 | tipoPintura | 1: solid. 2: metallic. 3: pearl. 4: matte. 9: other. Optional field. |
String | C/C | AN|10..50 | tipoPinturaNodef | Mandatory if TipoPintura = 9. |
String | YES | N|1 | tipoVehiculo | Vehicle type as stated in the spec sheet: 1: motorcycle. 2:bus. 3:truck. 4:sedan. 5:SUV. 6:pickup. |
String | YES | N|1 | usoVehiculo | Use table from the Department of Vehicle Registration: 1:commercial. 2:private. |
String | C/C | N|1 | condicionVehiculo | 1:finished. 2:partially finished. 3:unfinished. |
String | NO | N|1..3 | capacidadPasajeros | Maximum occupant number. Optional field. |
Medicina (Medicine, required if item is medicine or medicine materials) | ||||
Type | Required | Format | Identifier | Description |
String | YES | N|5..35 | nroLote | Medicine and medicine materials batch number. |
String | YES | N|1 | cantProductosLote | Quantity of products in the batch of medicines and pharmaceutical raw materials. |
TotalesSubTotales | ||||
---|---|---|---|---|
Type | Required | Format | Identifier | Description |
String | YES | N|1..11|1.2 | totalPrecioNeto | Sum of item prices before taxes. Sum of all occurrences of precioItem. |
String | YES | N|1..11|2 | totalITBMS | Sum of all occurrences of valorITBMS. |
String | YES | N|1..11|2 | totalISC | Sum of all occurrences of valorISC. |
String | YES | N|1..11|1.2 | totalMontoGravado | Sum total of taxed amount. Sum of totalITBMS and totalISC. |
String | NO | N|1..11|1.2 | totalDescuento | Sum of discounts and rebates granted on the total value of the bill. Sum of all occurrences of montoDescuento. |
String | NO | N|1..11|1.2 | totalAcarreoCobrado | Value of the shipping charged in the total price. If reported, it cannot be reported in the precioAcarreo field. |
String | NO | N|1..11|1.2 | valorSeguroCobrado | Value of insurance charged in the total price. If reported, they cannot be reported in the precioSeguro field. |
String | YES | N|1..11|1.2 | totalFactura | Total bill Value. The sum of TotalAcarreoCobrado, ValorSeguroCobrado minus TotalDescuento. |
String | YES | N|1..11|1.2 | totalValorRecibido | Sum of values received. Sum of all occurrences of valorCuotaPagada. |
String | C/C | N|1..11|1.2 | vuelto | Change given to the customer (Difference between totalValorRecibido and totalFactura). Do not report the field if there is no change. |
String | YES | N|1 | tiempoPago | 1:Immediate. 2:Installments. 3:Mixed. |
String | YES | N|1..11 | nroItems | Total number of items contained in the bill or other electronic document. |
String | YES | N|1..11|1.2 | totalTodosItems | Total of all items (Sum of valorTotal). |
descuentoBonificacion (Discounts, optional) | ||||
Type | Required | Format | Identifier | Description |
String | YES | AN|..500 | descDescuento | Description of additional discounts or rebates applied to the bill. |
String | YES | N|1..11|2 | montoDescuento | Amount of Discounts/Bonuses and other adjustments. |
List<formaPago> (Payment method list) | ||||
---|---|---|---|---|
Type | Required | Format | Identifier | Description |
String | YES | N|2 | formaPagoFact | 01:Credit. 02:Cash. 03:Credit Card. 04:Debit Card. 05:Loyalty Card. 06:Voucher. 07:Gift Card. 08:Transfer/Deposit to Bank Account 99:Other. |
String | C/C | AN|10..100 | descFormaPago | Description of form of payment not listed in the format. Mandatory if: formaPagoFact = 99. |
String | YES | N|1..11|1..2 | valorCuotaPagada | Value of the installment paid using this form of payment. |
Retención/Withholding (when tax withholdings are applied to the bill) | ||||
Type | Required | Format | Identifier | Description |
String | YES | N|2 | codigoRetencion | Corresponds to the catalog of withholding objects: 1: Payment for professional services to the state 100%. 2: Payment for sale of goods/services to the state 50%. 3: Payment or credit to non-domiciled or company incorporated abroad 100%. 4: Payment or credit for the purchase of goods/services 50%. 7: Payment to affiliated commerce to the system of TC/TD 50%. 8: Others (reduction of withholding). |
String | YES | N|1..11|1..2 | montoRetencion | Amount of withholding to be applied. It must correspond to the calculation of the withholding for the withholding object (tasaITBMS * totalITBMS). |
List <pagoPlazo> (Payment via installments list, optional) | ||||
---|---|---|---|---|
Type | Required | Format | Identifier | Description |
String | YES | AN|25 | fechaVenceCuota | Installment due date. |
String | YES | N|1..11|1..2 | valorCuota | Value of the fee. |
String | NO | AN|15..1000 | infoPagoCuota | Information of interest with respect to this quota. |
pedidoComercialItem (Commercial item order, optional) | ||||
Type | Required | Format | Identifier | Description |
String | YES | N|1..9 | nroPedidoCompraItem | Purchase order number. |
String | YES | AN|1..3 | nroItem | Sequential number of the item in the order. |
String | NO | AB|0..5000 | infoItem | Information of interest from the issuer with respect to the commercial order, related to a bill item. |
pedidoComercialGlobal (Commercial global order, optional) | ||||
---|---|---|---|---|
Type | Required | Format | Identifier | Description |
String | YES | N|1..12 | NroPedidoCompraGlobal | Purchase order number. |
String | C/C | AN|1..12 | codigoReceptor | Allows you to register the code with which the biller identifies his customer or invoice recipient. |
String | C/C | AN|1..12 | nroAceptacion | Acceptance number from the Purchase Order Acceptance Number List |
String | C/C | A|1..50 | codigoSistemaEmisor | Internal code of the system that emits the bill. |
String | C/C | AN|0..5000 | InfoPedido | Information of interest from the issuer with respect to the global Commercial Order. |
listaNroAceptacion (Acceptance order number list, optional) | ||||
Type | Required | Format | Identifier | Description |
String | C/C | AN|1..12 | nroAceptacion | Purchase order acceptance number |
infoLogistica (Logistics information) | ||||
---|---|---|---|---|
Type | Required | Format | Identifier | Description |
String | NO | N|1..3 | nroVolumenes | Number of volumes |
String | NO | N|1..4|2..6 | pesoCarga | Total weight of the load. |
String | NO | N|1 | unidadPesoTotal | 1:g. 2:kg. 3:tons. 4:lbs. |
String | NO | AN|6 | licVehiculoCarga | Cargo vehicle license. |
String | YES | AN|15..100 | razonSocialTransportista | Name or company name of the carrier. |
String | YES | N|1 | tipoRucTransportista | 1:Person. 2:Business. |
String | YES | AN|5..20 | rucTransportista | Carrier's RUC. |
String | YES | AN|2 | digitoVerifRucTransportista | Carrier's RUC Verification Digit. It must be calculated based on the RUC algorithm published by the DGI. |
String | NO | AN|0..5000 | infoLogisticaEmisor | Information of interest from the issuer with respect to logistics. |
infoEntrega (Delivery information) | ||||
Type | Required | Format | Identifier | Description |
String | YES | N|1 | tipoRucEntrega | Type of Taxpayer 1:Person. 2:Business. |
String | YES | AN|5..20 | numeroRucEntrega | RUC of the recipient. |
String | YES | AN|2 | digitoVerifRucEntrega | It must be calculated based on the RUC algorithm published by the DGI. |
String | YES | An|2..100 | razonSocialEntrega | Company name (Business) or name and surname (Person) of the place of delivery. |
String | YES | AN|100 | direccionEntrega | Subdivision, Street, House/Building, Premises Number. Address of the delivery premises. |
String | YES | AN|8 | codigoUbicacionEntrega | Location code. |
String | YES | AN|50 | corregimientoEntrega | County where the delivery location is located, according to the Catalog. |
String | YES | AN|50 | distritoEntrega | District where the delivery premises are located, according to the Catalog. |
String | YES | AN|50 | provinciaEntrega | Province where the place of delivery is located, according to the Catalog. |
String | YES | N|7..12 | telefonoEntrega | Delivery location contact phone number. Acceptable Formats 999-9999 or 9999-9999 |
String | YES | N|7..12 | telefonoEntregaAlt | Additional contact telephone number, or alternate delivery location. Acceptable Formats 999-9999 or 9999-9999 |
RESPONSE: Parameters to be received | ||
---|---|---|
Type | Identifier | Description |
String | codigo | Code corresponding to the result of the operation |
String | resultado | Indicates the result of the request |
String | mensaje | Additional message of the operation |
String | CUFE | Unique Electronic Invoice Code |
String | QR | QR Code of the Electronic Invoice |
String | fechaRecepcionDGI | Authorization date according to DGI |
String | nroProtocoloAutorizacion | Authorization protocol number according to DGI |