100% found this document useful (1 vote)
71 views

WebPOS - XML Specifications - Electronic Invoice Panama V9

Webpos Json
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
71 views

WebPOS - XML Specifications - Electronic Invoice Panama V9

Webpos Json
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

PROLOG

This document describes the technical specifications


WEBPOS XML of WebPOS to integrate your ERP system with
electronic invoicing, complying with all the guidelines
required by DGI.
SPECIFICATIONS TO This document is strictly confidential, only for use by
your company with authorization from WebPOS.

INTEGRATE ELECTRONIC Ing. Juan Carlos Cabezas


Software Development Director

INVOICE PANAMA
9
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Confidentiality and Copyright Statement.

This manual and the technical information contained in this document is protected under international
copyright laws. It is only allowed to use it under the authorization of WebPOS for the integration of
client systems with fiscal printers or the electronic invoice system of Panama, using WebPOS products.

The use of this information to copy, reverse engineer, or develop products, using this information, that
compete with WebPOS products is prohibited.

Page | 2
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Contents
Vesion log .................................................................................................................................................. 5
Introduction .............................................................................................................................................. 6
Supported formats .................................................................................................................................... 8
Description of the WebPOS XML Structure ................................................................................................ 9
Description of each of the XML elements: ............................................................................................. 9
Xml file declaration: .......................................................................................................................... 9
XML file with a single document: ....................................................................................................... 9
XML file with multiple documents to process: ................................................................................... 9
XML format description table .............................................................................................................. 10
Examples of documents with the XML structure. .................................................................................... 16
XML example for an Invoice document. ............................................................................................. 16
XML example for a Credit Note document. ........................................................................................ 18
XML example for a Debit Note document. ......................................................................................... 19
XML example with multiple documents contained in it. .................................................................... 20
Send Methods ......................................................................................................................................... 22
API RESTful .......................................................................................................................................... 22
WebService SOAP ................................................................................................................................ 22
Shared Folder ...................................................................................................................................... 22
Note: Files must be saved using the UTF-8 encoding ....................................................................... 22
Filenames for the sending methods: FTP, Email, Shared Folder: ...................................................... 22
FTP over TLS......................................................................................................................................... 23
Email .................................................................................................................................................... 23
Sending WebPOS format XML files through an email account that is monitored by the WebPOS
service. ................................................................................................................................................ 23
Direct Database ................................................................................................................................... 23
Return values........................................................................................................................................... 24
• WebService SOAP........................................................................................................................ 24
• API RESTful .................................................................................................................................. 24
• Archivo de resultado en carpeta centralizada en un servidor..................................................... 24
• FTPS ............................................................................................................................................. 24

Page | 3
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

• Base de datos .............................................................................................................................. 24


• WebHook..................................................................................................................................... 24
Optional Solution Components. ............................................................................................................... 27
• WebPOS Integration Server ......................................................................................................... 27
• WebPOS FE Client ........................................................................................................................ 27
WebServices SOAP................................................................................................................................... 28
• CheckRuc: Here are the main methods used. ............................................................................... 28
• SendFileToProcess ....................................................................................................................... 28
WSDL ................................................................................................................................................... 28
Production SOAP Webservice URL ....................................................................................................... 28
Test SOAP WebService URL.................................................................................................................. 28
Sample SendFileToProcess .................................................................................................................. 29
Web Services API RESTful ........................................................................................................................ 31
1. OAUTH 2.0 ................................................................................................................................... 31
2. ApiKey .......................................................................................................................................... 31
Authentication ................................................................................................................................. 31
APIs List with Token OAuth: ..................................................................................................................... 32
Listado de APIs con Autenticación ApiKey: .............................................................................................. 35

Page | 4
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Vesion log
Version Publication date Changes
1 2022-03-01 Initial versión
6 2022-04-26 APIs revised
7 2022-05-05 CUFE length 66 characters
8 2022-01-28 Se adicionan campos para informar los totales
Retenciones
Tipos de pago e información de cuotas en Nodo FEPA
9 2023-06-01 Update of agreement technical sheet of Panama.

Page | 5
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Introduction
The WebPOS integration solution allows you to integrate your ERP system with the electronic invoice
system of Panama and other countries in the region such as the Dominican Republic, Ecuador, Costa Rica,
quickly and reducing the programming and development effort by up to 90%. %. Once the integration has
been carried out for a country, it is possible to replicate the development and, with small variations,
comply with the regulations in another country.

Another benefit is that it allows you to change from the fiscal printer scheme to an electronic invoice in
an orderly and gradual manner.

Our electronic invoice interface is in charge of receiving the information from your system in a simplified
way and transforming it to the specifications of the government, applying the electronic signature and
sending it, following the established security parameters, complying with all the requirements. of the
electronic invoicing system implemented in the country.

Glossary:

E.I. : Electronic Invoice


SFEP: Electronic Invoice System of Panama Government
CUFE: Unique Electronic Invoice Number in Panama
Document: It refers to an electronic fiscal document; invoice, credit note, debit note or refund
ITBMS: Is local Tax Name
ISC: Selective consumer Tax. Special tax applied to certain products in Panama.
Sume 911: Special tax applied in telecommunication invoices.
RUC: Is the unique Tax identification of the company or buyer.

Page | 6
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

General diagram of the Solution


WebPOS – Sistema de FE

Contribuyentes WebPOS @ Azure WebPOS @ Azure


Clientes App & SQL Service App & SQL Service

ERP Azure SQL


SOAP
API Rest
FTP
Email
WebPOS Client
WebPOS PAC
XML
SSL TLS 1.2 SOAP WS
Mutual Auth.
JSON
TXT
CSV Security
XLS Load Ru les Security
Direct To DB SQL Rules
SSL TLS 1.2 Balancer
Virtual Printer Firewall

Azure DC
Azure
ActivityLog Alerts Monitoring

WebPOS FE Solution
@ Oracle Cloud

Uso Restringido – Solo para personas


autorizadas por WebPOS. Conceptual Diagram Version 1.0

Page | 7
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Supported formats
Our platform supports the following formats:

• XML with WebPOS specifications


• JSON with WebPOS specifications
• SAP iDoc XML (Special development required)
• Txt with WebPOS specifications,
• Csv with WebPOS specifications.

This manual focuses on the WebPOS XML format. If you wish to explore another format, you can
request the corresponding manual.

Note: You need to choose a format to integrate your system and the delivery method to communicate
with the interface.

Go to the description of the WebPOS XML format

Page | 8
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Description of the WebPOS XML Structure


The WebPOS Xml format has a simplified structure and allows shortening the development time for
integration with the DGI's electronic invoicing system. This file can be sent to the WebPOS solution in
different ways. See send methods.

Description of each of the XML elements:


Xml file declaration:
XML file with a single document:
<?xml version="1.0" encoding="UTF-8" ?>
<FiscalDoc>…………..Etiquetas y elementos del XML……..</FiscalDoc>
XML file with multiple documents to process:
<?xml version="1.0" encoding="UTF-8" ?>
<Range>

<FiscalDoc>…………..Etiquetas y elementos del XML……..</FiscalDoc>


<FiscalDoc>…………..Etiquetas y elementos del XML……..</FiscalDoc>

<FiscalDoc>…………..Etiquetas y elementos del XML……..</FiscalDoc>

</Range>

Note: Upper and lower case letters must be respected, as they are expressed in this manual. In XML
nomenclature, data containing any of the following characters must be handled and replaced by the
corresponding string:
& must be replaced by &amp; (including the semicolon at the end)
“ must be replaced by &quot;
< must be replaced by &lt;
> must be replaced by &gt;

In general, the data that can have these special characters are: CustomerName, CustomerRUC,
CustomerAddress, AddInfo, Item Desc, Item Comments.

Sample using C#:


CustomerName.Replace("&", "&amp;").Replace("""", "&quot;").Replace(">",
"&gt;").Replace("<", "&lt;").Replace("'", "&apos;")

Page | 9
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

XML format description table


Element or Tag Type Field Type Length / Description
Format
<?xml version="1.0" encoding="UTF-8" ?> Mandatory No spaces or hidden characters at
the beginning of the file.
<Range> Optional Open group of documents. If
more than one receipt is
going to be sent per Xml file.
Batch billing.
<FiscalDoc> Mandatory Open the Document
<CompanyLicCod>AAAABBBB</CompanyLicCod> Mandatory Alphanumeric 10 This value is provided by
WebPOS.
<BranchCod>0000</BranchCod> Mandatory Alphanumeric 4 Branch Code. 4 digits.
<POSCod>001</POSCod> Mandatory Alphanumeric 3 POS Code. Mandatory. If the
company only has one branch
and no point of sale then the
default code is used.
<DocType>F</DocType> Mandatory Alphanumeric 2 Document types:
F= For end consumer, taxpayer or
government invoices.
C=Credit Note
D=Debit Note
R=Refunds

FX=Export invoice
FI= Import invoice
FP= Local purchase Invoice
FZ=Free Zone Invoice
FY=Foreing Operation Invoice
<DocNumber>100001</DocNumber> Mandatory Alphanumeric 30 System document number. This
number will become the system
reference number. The E.I. sequence
number will be handled by the
interface and will be mapped to this
number.
<InvoiceNumber>100001</InvoiceNumber> Optional Alphanumeric 30 If it is not included, a Generic Credit
if the or Debit Note will be generated.
document is Only for type C or D documents.
credit or debit Invoice number affected by the
note credit or debit note. The system will
look for the CUFE number registered
in the system. If it is a fiscal printer
invoice, you must enter the
complete fiscal number and the date
in the following field
InvoiceNumberRefDate.
<InvoiceNumberRefDate>yyyy-MM-dd Mandatory Fecha Only for type C or D documents.
HH:mm:ss</InvoiceNumberRefDate> if the affected Date of the affected invoice
reference
invoice was
not issued by

Page | 10
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

the SFEP
system
<DocDate>2018-05-25 20:30:00</DocDate> Optional Date of the Fecha de emisión en formato yyyy-
document MM-dd HH:mm:ss. Si no se envía se
toma la fecha y hora de recepción.
<CustomerName>COSUMIDOR FINAL</CustomerName> Mandatory Alphanumeric 150 The value within this element is
Optional for consumer invoices and
Mandatory for all other document
types. It must contain the company
name of the byer.
<CustomerRUC></CustomerRUC> Mandatory Alphanumeric 26 It must contain the RUC, Tax ID, VAT
if it is not a ID or personal ID of the buyer. The
final consumer DV is not necessary since the Ruc
invoice will be validated and the DV will be
brought. This field can be left empty
for end consumer invoices.

If DocType=FZ, CustomerRUC can be


local or foreign identification.

If DocType=FI or FY, CustomerRUC


must have an identification from
abroad.

If DocType=FP, CustomerRUC can go


empty or the identification of the
buyer can be sent, as long as it is not
registered as a taxpayer
<CustomerType>07</CustomerType> Optional Alphanumeric 2 Optional field if the invoice is from a
depending on final consumer, Mandatory if it is
the type and from a government or foreigner.
Mandatory if Buyer ID type.
the client is a 03=Government,
government or 04=RUC,
foreign client 05=personal ID,
06=Passport or foreign VAT ID,
07=End Consumer

If Doctype=FZ, customertype can be


03 or 04 or 05 or 06

If DocType=FI or FY, customerType


should be 06

If DocType=FP ,customerType
should be 07
<CustomerAddress>Punta Optional/Man Alphanumeric 100 Buyer's address, it is Optional for
Pacifica</CustomerAddress> datory end consumer invoices and
depending of Mandatory for the other types.
type
<CustomerLocationCod>8-8-8<CustomerLocationCod> Optional Alphanumeric 20 Panamanian location code.
(Optional)
<Email>[email protected]</Email> Optional Alphanumeric 150 Buyer's email. To send your
electronic invoice. Supports

Page | 11
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

up to 3 emails separated by
commas.
<FePa> Optional Section for additional fields
of SFEP.
<iNatOp>1</iNatOp> Mandatory for Integer 1 Mandatory for Free Zone Invoices
Free Zone And it can have the following values:
Invoices Accepted 1 Sale
values 2 Export
1: Venta 3 Re-Export
Mandatory for 2: Exportación 4 Foreign Source Sale
Foreign 3: Re-
Transaction exportación, Mandatory for Foreign Transaction
Invoices 4: Venta de Invoices
fuente And it can have the following values:
extranjera 4 Foreign Source Sale
10:
Transferencia/T
raspaso
11: Devolución
12:
Consignación
13: Remesa
14: Entrega
gratuita
20: Compra
21: Importación

<Incoterm>FOB</Incoterm> Mandatory si Mandatory for export invoices


es FE de
exportación.
Optional if for Free Zone invoices
Opcional si
para facturas
de Zona Franca
<DestCountry>AR</DestCountry> Mandatory si Destination country. ISO3166
es FE de Alpha-2 code
exportación
Mandatory for export invoices
Opcional si
para facturas Optional if for Free Zone invoices
de Zona Franca
<SubtotalExento>0.00</SubtotalExento> Opcional Decimal (16,2) Para informar el subtotal exento
calculado por su sistema
<SubtotalGravado>92.16</SubtotalGravado> Opcional Decimal (16,2) Para informar el susbtotal antes de
impuesto de todas las líneas que
gravaron algún tipo de impuesto ITBMS
calculado por su sistema.
<SubtotalNet>92.16</SubtotalNet> Opcional Decimal (16,2) Suma de subtotalExento más
subtotalGravado. Antes del impuesto.
<TotalItbms>6.45</TotalItbms> Opcional Decimal (16,2) Total del ITBMS calculado por su sistema
<TotalIsc>0.00/TotalIsc> Opcional Decimal (16,2) Total de ISC calculado por su sistema.
<TotalOti>0.00</TotalOti> Opcional Decimal (16,2) Total de otros impuestos calculados por
su sistema
<Total>98.61</Total> Opcional Decimal (16,2) Total calculado por su sistema. Debe
corresponder a la suma de subtotalNet +
totalITbms+ totalIsc + totalOti
El total de su sistema no puede exceder
0.50 de diferencia según los cálculos
realizados por SFEP.

Page | 12
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

<WithHolding> Opcional Nodo opcional para el manejo de


valores aplicados por retención
<Code>2</Code> Mandatory si integer 1 Código de la retención:
se declara 1: Pago por servicio profesional al estado
<WithHolding> 100%
2: Pago por venta de bienes/servicios al
estado 50%
3: Pago o acreditación a no domiciliado o
empresa constituida en el exterior 100%
4: Pago o acreditación por compra de
bienes/servicios 50%
7: Pago a comercio afiliado a sistema de
1.00
TC/TD 50%
8: Otros (disminución de la retención)
<Value>3.50</Value> Mandatory si Decimal (16,2) % de la retención por el total de ITBMS
se declara
<WithHolding>
</WithHolding>
<iPzPag>2</iPzPag> Opcional integer 1 Tipo pago: 1= Contado,
2=Crédito/Plazo, 3= Mixto
<PagPlazos> Mandatory si Nodo para el reporte de las cuotas
iPzPag =2 cuando iPzPag=2
<PagPlazo SecItem=”1” FecItPlazo=”2018-05-25 Mandatory si PagPlazo element Attibutes
20:30:00” ValItPlazo=”10.00” InfPagPlazo=”Pagar la iPzPag =2,
primera cuota” /> debe contener SecItem: Número secuencial de cada
por lo menos 1 cuota a plazo (Integer de 1 a 99)
<PagPlazo … /> cuota
<PagPlazo … /> FecItPlazo: Fecha de vencimiento de
la cuota en formato yyyy-MM-dd
HH:mm:ss

ValItPlazo: Valor de la cuota


(Decimal (11,2))

InfPagPlazo: Información de interés


del emisor con respeto a esta cuota
(string min 15 caracteres, max 250)

</PagPlazos>
</FePa> Close the FePa section
<AddInfo> Optional Open additional information section.
<Line Id=”1”>Pedido:12345</Line> Optional Alphanumeric 100 Additional Information Line
<Line Id=”2”>Vendedor:01</Line> Optional Alphanumeric 100 Additional Information Line
</AddInfo> Up to 50 lines of 100
characters each
<Items> Mandatory Invoice detail section
<Item Code=”100001” Qty=”1.00” Desc=”Product Mandatory Item element attributes:
Description” Price=”10.50” Tax=”2”
Comments=”Additional description” dperc=”10%” Id: Line sequence number.
damt=”0” bcode=”” Cat1Code=”4000” /> Code:Code for products or service
Qty :quantity. Uo to 6 decimals.
<Item … /> Desc:Description (up to 500
<Item … /> characters).
<Item … /> Price:Unit price. up to 6 decimals.

Page | 13
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Tax: 0=Exempt, 1=7% ITBMS, 2=10%


ITBMS, 3=15% ITBMS
Comments: Additional description
(up to 5000 characters. Lines can be
seprated using \n
dperc: percentage discount
(00.00%). dperc and damt are
mutually excelusive. Include the %
symbol at the end for example
10.00%.
damt: amount of discount (up to 6
decimals)
bcode:barcode of the product

Special attribute for government


customers:
Cat1Code: Include the panamanian
category of the product or service 4
digits. please see CPBS Table.

Special Attrbiutes for


Telecommunication companies:
iscType: Type of ISC % or value. 0=%,
1=value
iscPerc: percentage of ISC for
example 5%
iscValue: amount of ISC
otiS911: value of 911 Tax
otiPn: number portability tax
amount
otiIsa: ATTT-Taxes on auto insurance
(1%)
otiTsa: Airport Departure Fee (FZ)
otiCid: Airport Development
Incentive Charge (F3)
otiCsa: Airport Security Charge (AH)
otiOc: Other Charges (XT)
otiFuel: Fuel (YQ)
otiFeci: FECI
otiInterests: Interests

Special attributes for


pharmaceutical:
MFDate: Manufactured date format
yyyy-MM-dd
ExpDate: expiration date. format
yyyy-MM-dd

Lot: lot number


LotQty: quantity of products in the
batch of medicines or raw materials.

Spaceial attributes for Automotor


sector:
VhModOp: Modality of the new
vehicle sale operation.

Page | 14
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

01=sale to representative
02=sale to final consumer
03=sale to government
04=vehicle fleet sale
99=other
VhModOpDesc: description if
VhModOp is equals to 99 (others).
(10 a 50 characters)
VhVin: VIN of the vehicule (17
characters)
VhColorCod: internal code of the
manufacturer color of the vehicle. (1
to 4 characters)
VhFuel: fuel type.
01=gasoline
02=diesel
03=ethanol
08=electric
09=gasoline/electric
99=other
VhFuelDesc=fuel description if
VhFuel is 99.
VhMotorNbr: motor number. 1 to
21 characters.
VhType:
1=motorcycle
2=bus,
3=truck,
4=sedan,
5=truck,
6=pickup,
7. Mini Pick-Up,
8. Pick Up Grua,
9. Pick Cabina Sencilla,
10. Pick Up Cabina y Media,
11. Pick- Up Doble Cabina,
12. Sedan Híbrido,
13. Microbus,
14. Mini Bus,
15. Mini Microbus,
16. Busito,
17. Hatcback,
18. Mini Panel,
19. Panel,
20. Convertible,
21. Coupe,
22: Coupe Convertible,
23. Mini Car,
24. Motorscooter,
25. Mototriciclo;
26. Scooter,
27. Triciclo,
28. Limosina,
29. Mini Vans,
30. Van,
31. Trailer,

Page | 15
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

32. Semi Trailer,


33. Suburvan,
34. Vagon,
35. Vagoneta,
36. Remolque,
37. Four Wheel,
38.SUV

VhUse:
1=commercial,
2=private,
3= Diplomatica,
4=Oficial,
5: Especial

Optional fields for automotor sector:


VhModYear: year of the model
VhMFYear: manufactured year
</Items> Mandatory Close detail section
<Payments> Optional Payments section
<Payment amt=”10.58” type=”02” Desc1=”Efectivo” /> Optional amt: amount received in payment
… type: payment type
<Payment …/> Types:
01 = CASH,
02=CREDIT CARD,
03=DEBIT CARD,
04=CHECK,
05=MEMBERSHIP CARD,
06=GIFTCARD,
07=CREDIT NOTE,
08=CREDIT (No payment received),
09=Other
Desc1: description of the payment if
type is other

Note: A mapping table can be used


if you already have defined toher
payment methods. So you don't
have to make any changes.
</Payments> Optional Closing section.
</FiscalDoc> Mandatory Closing document tag
</Range> Optional Closing group tag. Optional

Examples of documents with the XML structure.

XML example for an Invoice document.


<?xml version="1.0" encoding="utf-8"?>
<FiscalDoc>
<CompanyLicCod>AAAABBBB</CompanyLicCod>
<BranchCod>0001</BranchCod>

Page | 16
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

<POSCod>001</POSCod>
<DocType>F</DocType>
<DocNumber>10001</DocNumber>
<CustomerName>Cliente X &amp; Y</CustomerName>
<CustomerRUC>111111-1-111111 DV00</CustomerRUC>
<CustomerType>04</CustomerType>
<CustomerAddress>San Francisco</CustomerAddress>
<Email>[email protected]</Email>
<AddInfo>
<Line Id="1">Numero de pedido: 12345</Line>
<Line Id="2">Entrega en sitio</Line>
</AddInfo>
<Items>
<Item Id="1" Qty="10.00" Code="P001" Desc="Producto ITBMS 7%" Price="10.0000" Tax="1" Com
ments="La propiedad price es precio unitario" dperc="10%" bcode="" />
<Item Id="2" Qty="10.00" Code="P002" Desc="Producto ITBMS 0% Exento" Price="10.0000" Tax=
"0" Comments="El descuento se aplica por % o por monto total de descuento son excluyentes" dam
t="20.00" bcode="" />
</Items>
<Discount amt="0.00" perc="00.00%" />
<Payments>
<Payment Id="1" type="01" amt="176.30" Desc1="EFECTIVO" />
</Payments>
<Trailer>
<Line Id="1">Información al final</Line>
<Line Id="2">Información al final</Line>
</Trailer>
</FiscalDoc>

Page | 17
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

XML example for a Credit Note document.


<?xml version="1.0" encoding="utf-8"?>
<FiscalDoc>
<CompanyLicCod>AAAABBBB</CompanyLicCod>
<BranchCod>0001</BranchCod>
<POSCod>001</POSCod>
<DocType>C</DocType>
<DocNumber>10000</DocNumber>
<InvoiceNumber>100001</InvoiceNumber>
<CustomerName>Cliente X &amp; Y</CustomerName>
<CustomerRUC>111111-1-111111 DV00</CustomerRUC>
<CustomerType>04</CustomerType>
<CustomerAddress>San Francisco</CustomerAddress>
<Email>[email protected]</Email>
<AddInfo>
<Line Id="1">Numero de pedido: 12345</Line>
<Line Id="2">Entrega en sitio</Line>
</AddInfo>
<Items>
<Item Id="1" Qty="10.00" Code="P001" Desc="Producto ITBMS 7%" Price="10.0000" Tax="1" Com
ments="La propiedad price es precio unitario" dperc="10%" bcode="" />
<Item Id="2" Qty="10.00" Code="P002" Desc="Producto ITBMS 0% Exento" Price="10.0000" Tax=
"0" Comments="El descuento se aplica por % o por monto total de descuento son excluyentes" dam
t="20.00" bcode="" />
</Items>
<Discount amt="0.00" perc="00.00%" />
<Payments>
<Payment Id="1" type="01" amt="176.30" Desc1="EFECTIVO" />
</Payments>
<Trailer>
<Line Id="1">Información al final</Line>
<Line Id="2">Información al final</Line>
</Trailer>
</FiscalDoc>

Page | 18
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

XML example for a Debit Note document.


<?xml version="1.0" encoding="utf-8"?>
<FiscalDoc>
<CompanyLicCod>AAAABBBB</CompanyLicCod>
<BranchCod>0001</BranchCod>
<POSCod>001</POSCod>
<DocType>D</DocType>
<DocNumber>10000</DocNumber>
<InvoiceNumber>100001</InvoiceNumber>
<CustomerName>Cliente X &amp; Y</CustomerName>
<CustomerRUC>111111-1-111111 DV00</CustomerRUC>
<CustomerType>04</CustomerType>
<CustomerAddress>San Francisco</CustomerAddress>
<Email>[email protected]</Email>
<AddInfo>
<Line Id="1">Numero de pedido: 12345</Line>
<Line Id="2">Entrega en sitio</Line>
</AddInfo>
<Items>
<Item Id="1" Qty="10.00" Code="P001" Desc="Producto ITBMS 7%" Price="10.0000" Tax="1" Com
ments="La propiedad price es precio unitario" dperc="10%" bcode="" />
<Item Id="2" Qty="10.00" Code="P002" Desc="Producto ITBMS 0% Exento" Price="10.0000" Tax=
"0" Comments="El descuento se aplica por % o por monto total de descuento son excluyentes" dam
t="20.00" bcode="" />
</Items>
<Discount amt="0.00" perc="00.00%" />
<Payments>
<Payment Id="1" type="01" amt="176.30" Desc1="EFECTIVO" />
</Payments>
<Trailer>
<Line Id="1">Información al final</Line>
<Line Id="2">Información al final</Line>
</Trailer>
</FiscalDoc>

Page | 19
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

XML example with multiple documents contained in it.


<?xml version="1.0" encoding="utf-8"?>
<Range>
<FiscalDoc>
<CompanyLicCod>AAAABBBB</CompanyLicCod>
<BranchCod>0001</BranchCod>
<POSCod>001</POSCod>
<DocType>F</DocType>
<DocNumber>10001</DocNumber>
<CustomerName>Cliente X &amp; Y</CustomerName>
<CustomerRUC>111111-1-111111 DV00</CustomerRUC>
<CustomerType>04</CustomerType>
<CustomerAddress>San Francisco</CustomerAddress>
<Email>[email protected]</Email>
<AddInfo>
<Line Id="1">Numero de pedido: 12345</Line>
<Line Id="2">Entrega en sitio</Line>
</AddInfo>
<Items>
<Item Id="1" Qty="10.00" Code="P001" Desc="Producto ITBMS 7%" Price="10.0000" Tax="1" Com
ments="La propiedad price es precio unitario" dperc="10%" bcode="" />
<Item Id="2" Qty="10.00" Code="P002" Desc="Producto ITBMS 0% Exento" Price="10.0000" Tax=
"0" Comments="El descuento se aplica por % o por monto total de descuento son excluyentes" dam
t="20.00" bcode="" />
</Items>
<Discount amt="0.00" perc="00.00%" />
<Payments>
<Payment Id="1" type="01" amt="176.30" Desc1="EFECTIVO" />
</Payments>
<Trailer>
<Line Id="1">Información al final</Line>
<Line Id="2">Información al final</Line>
</Trailer>
</FiscalDoc>
<FiscalDoc>
<CompanyLicCod>AAAABBBB</CompanyLicCod>
<BranchCod>0001</BranchCod>
<POSCod>001</POSCod>
<DocType>F</DocType>
<DocNumber>10002</DocNumber>
<CustomerName>Cliente X &amp; Y</CustomerName>
<CustomerRUC>111111-1-111111 DV00</CustomerRUC>
<CustomerType>04</CustomerType>

Page | 20
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

<CustomerAddress>San Francisco</CustomerAddress>
<Email>[email protected]</Email>
<AddInfo>
<Line Id="1">Numero de pedido: 12345</Line>
<Line Id="2">Entrega en sitio</Line>
</AddInfo>
<Items>
<Item Id="1" Qty="10.00" Code="P001" Desc="Producto ITBMS 7%" Price="10.0000" Tax="1" Com
ments="La propiedad price es precio unitario" dperc="10%" bcode="" />
<Item Id="2" Qty="10.00" Code="P002" Desc="Producto ITBMS 0% Exento" Price="10.0000" Tax=
"0" Comments="El descuento se aplica por % o por monto total de descuento son excluyentes" dam
t="20.00" bcode="" />
</Items>
<Discount amt="0.00" perc="00.00%" />
<Payments>
<Payment Id="1" type="01" amt="176.30" Desc1="EFECTIVO" />
</Payments>
<Trailer>
<Line Id="1">Información al final</Line>
<Line Id="2">Información al final</Line>
</Trailer>
</FiscalDoc>
</Range>

Note: Only use the multiple file format for batch operations.

Page | 21
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Send Methods
There are different shipping methods available such as:

• API RESTful
• Webservice SOAP
• Shared folder
• FTPS
• Email
• Database: direct connection to: MSSQL, Oracle, MySQL, AS400, SQLite, Informix, DB2, etc.

API RESTful
The Rest API methods are provided by the "WebPOS Cloud APIs" platform and allow the use of POST
methods to send invoice files in XML, JSON, SAP iDoc XML and TXT formats. Additionally GET methods to
download transformed and signed XML, PDF, QR of electronic invoice and return values.

Two types of authentication can be used:

- OAUTH 2.0
- ApiKey

If you are thinking of sending via web services to our Cloud, we recommend API REST since it is the latest
technology and the latest security standards are implemented.

API RESTFul samples

WebService SOAP
As described above, except that legacy SOAP messages are used and in each call it is necessary to send
the credentials to validate access to the system.

If you decide on this method for sending XMLs, please check the WSDL in https://fepatest-
api.webposonline.com/wsfepa.asmx

WebServices SOAP samples

Shared Folder
Sending WebPOS format XML files to a local folder on your premises.

Note: Files must be saved using the UTF-8 encoding


Filenames for the sending methods: FTP, Email, Shared Folder:
The name of the xml files must be sent using the following convention:

• Type of document: F,C,D,FE,FI,FZ,FP depending of the document type. See type of


documents.

Page | 22
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

• Hyphen
• Serial: 0001001. The serial is made up of the branch code (4 characters) 0001, followed
by the code of the issuing point in the branch (3 characters) 001. For example, for
branch number 2 and issuing point 3 within the branch, it would be: 0002003.
• Hyphen
• Document number: It is the number of the invoice, credit note or debit note in your
system.
• Extension xml
For example:
F-0001001-10000.xml

FTP over TLS


Sending WebPOS format XML files via FTP using secure TLS protocol.

Email
Sending WebPOS format XML files through an email account that is monitored by the WebPOS service.

Direct Database
Allows the reading of transactions through a view of the database (Header, Detail, Forms of Payment) of
your system through the WebPOS DB Connector tool which allows you to connect to any type of MS SQL
database, Oracle, MySQL, AS400, DB2, Informix, etc. And execute SQL commands for reading and
INSERT or UPDATE commands for writing the returns.

Page | 23
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Return values.
There are several ways to obtain the return values, the developer must decide which of them is the one
that best suits the needs:

• WebService SOAP: to consult the return structure, PDF of fiscal printer or electronic
invoice, signed XML for the case of FE, QR content and image for the case of FE.
• API RESTful: the GetResultFe method is consumed for electronic invoice to get the results.
The URLs for the API environments are defined in the RESTful API section.
• Archivo de resultado en carpeta centralizada en un servidor: For this
option, a WebPOS service is installed on a server that performs the downloads and stores the
result files in a folder. One for each document, following the nomenclature described above.
• FTPS: files can be sent to FTP securely using TLS 1.2.
• Base de datos: Direct write or update to MSSQL, Oracle, AS400, MySQL, Informix, DB2, etc.
databases. A WebPOS service is installed that downloads the results and executes SQL
commands to write or update a table in the database.
• WebHook: are configurable events that are fired to call a SOAP or Http POST method in real
time with the response JSON or XML format. This allows the integration of applications in real
time that require the result of the electronic invoice. Only calls to methods that are under
secure protocol HTTPS TLS are allowed.

Page | 24
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Return structure for electronic invoice.

Property Type Length Definition Notes


CompanyLicCod string 10 Company Code Code given by
WebPOS
Received bool Received by WebPOS
Accepted bool Strucuture OK and
trnasformed
iAmb integer 1 Environment Values:
1=Production
2=Test
BranchCod string 4 Branch number
POSCod string 3 Point of sale number
DocType string 2 Document Type
SystemRef string 50 System reference number.
SecNumber string 10 E.I. sequence generated 0000000001
FeNumber string 19 E.I. serial and sequence Format:
0000-000-
0000000000
Cufe string 66 E.I. unique number
Authorized bool If it Is authorized
AuthNumber string 40 Authorization number
AuthDate DateTime 20 Date of Authorization yyyy-MM-dd
HH:mm:ss
DocDate DateTime 20 Date of the document yyyy-MM-dd
HH:mm:ss
DateSentToDgi DateTime 20 Date sent to the PAC
Service for validation
SentToDgi bool If SenToDgi == true and
Authorized == false then
the document is rejected.
If SentToDgi == false and
Authorized == false and
Received == true and
Accepted == true then the
document is pending for

Page | 25
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

validation or check
IssuedType 2 or 4
Contingency
ConfirmationNbr string 9 9-digit random This is a random
confirmation number number that is
assigned for
security as part
of the CUFE
DgiResp string NVARCHAR(MAX) Response of the validation
with the PAC service
Msg string NVARCHAR(MAX) Additional messages
wasDuplicated bool If the systemRef already
exists in the WebPOS
Database and it is not
rejected
IssuedType integer 1 Type of issue: Normal or 1: Normal
in contingency Contributor
2: Contingency
Contributor
3: Normal end
consumer
4: Contingency
end consumer
XmlFeSigned string NVARCHAR(MAX) Xml transformed signed
QrContent string NVARCHAR(1024) QR contento f the E.I.
QrB64 string NVARCHAR(MAX) QR Image in base 64 string
Base 64
DgiErrMsg string NVARCHAR(MAX) Error messages results of
the validation
PrintInfo Object Special object to obtain This field will be
the text of a receipt only present if
formatted at 48 columns. the customer
(retail) request that.
ExecTime long Time of execution
miliseconds

Page | 26
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Optional Solution Components.


• WebPOS Integration Server. Only if you want to download the authorized signed
XML, PDF, and return values such as CUFE, authorization number, authorization date. A
PC or Server with Intel Core 2 Duo Processor 1.8GHz or higher, 4GB Ram, 100GB of disk
space, Windows 10/2016 Server or higher, IIS, MS SQL 2017 or higher is required.
Insertion of those return values can be done to any database such as MS SQL, Oracle, DB2,
iDB2 / AS400 and others.
• WebPOS FE Client. A PC is required, Intel Core i5 Processor, 4GB Ram, 20GB of disk
space, Windows 7/8.1/10, .Net Framework 4.6.2 or later. It is used for the immediate
printing of electronic invoices with the QR element that contains the electronic signature.

Page | 27
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

WebServices SOAP
The format used for SOAP is XML. The response from the Web methods will also be returned in XML.
The security used for this type of message is the use of the WebPOS license key and an ApiKey. The Api
Key can be managed or changed by the user in the WebPOS portal.

Here are the main methods used:

• CheckRuc: Here are the main methods used.


• SendFileToProcess: it is used to send an invoice document, credit note or debit note to be
processed in the FE system. This method accepts an XML or JSON WebPOS format as a
parameter. Additionally TXT formats, CSV WebPOS format and iDOC XML SAP are also
supported. The content of the file parameter must be enclosed in a CDATA element.

WSDL:
https://fepa-api.webposonline.com/wsfepa.asmx?wsdl

Production SOAP Webservice URL:


https://fepa-api.webposonline.com/wsfepa.asmx

Test SOAP WebService URL:


https://fepatest-api.webpoonline.com/wsfepa.asmx

Note: All information is transmitted using HTTPS / TLS 1.2.

Page | 28
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Sample SendFileToProcess:

POST /wsfprt.asmx HTTP/1.1


Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.webpospanama.com/FPrint/SendFileToProcess"

<?xml version="1.0" encoding="UTF-8"?>


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:fepa="https://webposonline.com/fepa/">
<soapenv:Header/>
<soapenv:Body>
<fepa:SendFileToProcess>
<fepa:data>
<fepa:environment>test</fepa:environment>
<fepa:companyLicCod>AAAABBBB</fepa:companyLicCod>
<fepa:apiKey>00000000-0000-0000-0000-
000000000000</fepa:apiKey>
<fepa:fileStr>><![CDATA[<?xml version="1.0" encoding="utf-
8"?>
<FiscalDoc>
<CompanyLicCod>AAAABBBB</CompanyLicCod>
<BranchCod>0001</BranchCod>
<POSCod>001</POSCod>
<PrintStationId>1</PrintStationId>
<PrinterId>1</PrinterId>
<DocType>F</DocType>
<DocNumber>10001</DocNumber>
<CustomerName>Cliente X &amp; Y</CustomerName>
<CustomerRUC>111111-1-111111 DV00</CustomerRUC>
<CustomerType>04</CustomerType>
<CustomerAddress>San Francisco</CustomerAddress>
<Email>[email protected]</Email>
<AddInfo>
<Line Id="1">Numero de pedido: 12345</Line>
<Line Id="2">Entrega en sitio</Line>
</AddInfo>
<Items>
<Item Id="1" Qty="10.00" Code="P001" Desc="Producto ITBMS 7%"
Price="10.0000" Tax="1" Comments="La propiedad price es precio unitario"
dperc="10%" bcode="" />
<Item Id="2" Qty="10.00" Code="P002" Desc="Producto ITBMS 0% Exento"
Price="10.0000" Tax="0" Comments="El descuento se aplica por % o por monto
total de descuento son excluyentes" damt="20.00" bcode="" />
</Items>
<Discount amt="0.00" perc="00.00%" />
<Payments>
<Payment Id="1" type="01" amt="176.30" Desc1="EFECTIVO" />
</Payments>
<Trailer>
<Line Id="1">Información al final</Line>
<Line Id="2">Información al final</Line>
</Trailer>

Page | 29
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

</FiscalDoc>]]></fepa:fileStr>
</fepa:data>
</fepa:SendFileToProcess>
</soapenv:Body>
</soapenv:Envelope>

Please check the link https://fepatest-api.webposonline.com/wsfepa.asmx for the full list of methods.

Page | 30
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

Web Services API RESTful


Two security schemes are offered with this method. The programmer must decide which of them will be
implemented to comply with the company's security policies.

1. OAUTH 2.0: authentication is done only once, based on a username and password provided
by WebPOS that gives you access to the portal. When authenticating, a valid token is obtained
for a period of time that will be used in the following calls to the Rest API methods.
2. ApiKey: In this scheme, the license code for the company and an API access key are provided.
The ApiKey is a UUID associated with the company in the WebPOS system. Both must be sent in
each call to the Rest API methods.

Note: The developer must decide which authentication method best suits the company's security
policies.

All information is processed using HTTPS / TLS 1.2.

Authentication
Host: https://fepatest-api.webposonline.com/Token
Method: POST
Headers:
Content-Type: text/html; charset=utf-8
Accept: application/json
RequestBody:
username={username}&password={userPassword}&grant_type=password

Response:
{"access_token":"kBKqCinqZPBbfVgDrpbENwlt2D3pkCc5-
IV7RM5DCnTg6PUfZ7nBjG602M5es1GdaSc8xi1QGy_sMDJDHRFikVQ6SaXvYj4dCJ-
zWKDRYbfMifE4OxXvsbtl98WZFBS6OT1wBmtn6Db15At265FBNkI-
kKD1Kh4XIsos_RITMqVhwcKiE8q4cuFgZQIAbIr8KEckulrbiifemUL3m1Zjfv3Legnpce
DcpinmTgoZzJY6PP9_j-Ehddgj-V_eChiyy02VH6rQsyAUUedeUuitweefuP9lOXAOO-
0rVpGn2ftzDpKtvl6-GiP5KnN8jwbcE74TAnsUqwbyXi9oqHu-
Gsuh2C5rURI_Wc3nTM2h9Wr_hPt86wN8yoQ1quVYZPTKjvt6zmfvsYgL3_8cp_L44xQ5Bv
-NdVsMMW_gODellKqUvadp-HMfJO159SX_YNHsx1PNZJxm36vhRCjaW2VAzK-
mnzr5Nxsikbjw5t66mJ_PP_-uWCEQk-
CHFBCWpVxv0kD2UGByYX_9qudYj6Sxl","token_type":"bearer","expires_in":86
400,"userName":"{username}",".issued":"Fri, 06 Dec 2019 22:16:02
GMT",".expires":"Fri, 07 Dec 2019 22:16:02 GMT"}

Notes:
- This method is only used for OAUTH 2.0 authentication and to get
the token used for the other methods.
- User credentials will be provided by WebPOS.

Page | 31
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

APIs List with Token OAuth:


Host URL for Test environment: https://fepatest-api.webposonline.com
Host URL for Production environment: https://fepa-api.webposonline.com

Note: For more information about the APIs you can visit https://developer.webposonline.com

{environment} = prod o test {iAmb} = 1 prod, 2 test

Utilice Headers:
Content-Type: text/plain
Authorization: Bearer {token}

Method Route Parameters Type Authen- Description


tication
Token /token POST Token username={user}&passw
OAuth ord={password}&grant_t
ype=password
CheckRuc /api/fepa/v1/{environment}/Check environment GET Token To verify a RUC, type
Ruc/{ruc}/{tipoRuc} : test o prod OAuth 0=Unknown,
1=Natural,
ruc, 2=Legal,
tipoRuc 3=Government
SendFileToProcess /api/fepa/v1/{environment}/sendF environment POST Token Used to send a file in
ileToProcess/{companyLicCod} , OAuth TXT, JSON format with
companyLic WebPOS specifications
Cod
Query APIs
GetResultFe /api/fepa/v1/{environment}/GetRe environment GET Token Used to obtain data from
sultFe/{companyLicCod}/{cufe} , OAuth the processed electronic
companyLic invoice
Cod, cufe
GetCufeBySystemRef /api/fepa/v1/GetCufeBySystemRef/ companyLic GET Token Used to obtain the Cufe,
{companyLicCod}/{iAmb}/{docTyp Cod, iAmb, OAuth Authorization, Date from
e}/{systemRef} docType, the system reference.
systemRef iAmb: 1=prod, 2=test
GetDocReferenceInfo /api/fepa/v1/GetDocReferenceInfo Test or GET Token Used to obtain data from
/{companyLicCod}/{systemRef}/{d Production OAuth the invoice referenced
ocType}/{iAmb} by a Credit Note or Debit
Note
GetQRData /api/fepa/v1/GetQRData/{compan Test or GET Token To get the content of the
yLicCod}/{cufe} Production OAuth QR. URL of the DGI to
consult the FE.
GetQR /api/fepa/v1/GetQR/{companyLicC Test or GET Token To obtain the data of the
od}/{cufe} Production OAuth QR and the image in
String Base 64 format
GetPdf /api/fepa/v1/GetPdf/{companyLicC Test or GET Token To obtain the standard
od}/{cufe} Production OAuth graphical representation
(CAFE)

Page | 32
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

GetContainer /api/fepa/v1/GetContainer/{compa Test or GET Token To get the FE container,


nyLicCod}/{cufe} Production OAuth which carries the PAC
authorization event. This
is the document that is
sent to the FE receiver.
Other APIs
SendFeByEmail /api/fepa/v1/SendFeByEmail/{com companyLic POST Token To send the container
panyLicCod} Cod OAuth and the PDF to the
recipient
Body:
{
"cufe":
"string",
"emailTo":
"string",
"emailCc":
"string"
}
GetUbics /api/fepa/v1/getUbics Test or GET Token It is used to obtain a list
Production OAuth of Provinces, Districts
and corregimientos
GetPaises /api/fepa/v1/getPaises Test or GET Token To obtain a list of
Production OAuth countries with their ISO
codes
GetCPBSfams /api/fepa/v1/GetCPBSfams Test or GET Token To obtain the
Production OAuth Panamanian family of
categories of goods and
services
GetCPBSegs /api/fepa/v1/GetCPBSsegs Test or GET Token To obtain the segments
Production Oauth of Panamanian
categories of goods and
services
GetMonedas /api/fepa/v1/GetMonedas Test or GET Token To obtain the ISO
Production Oauth currency codes used in
export invoices
SendXmlFileToProcess /api/fepa/v1/test/sendXmlFileToPr Test POST Token Used to send a WebPOS
ocess/{companyLicCod} OAuth format XML file

Notes:

1. Use the URL corresponding to the environment you are using and add the path of the service
you want to invoke.
2. The /Token service must be invoked and the user and password credentials must be passed to
receive a Token for the following calls to the services.
3. In each call to a service with the authentication type OAuth must be included in the header
Authorization Bearer {token}
4. The Token has an expiration date. Before each call you must check the expiration date and time
and if it is expired you must call the /Token service and obtain a new one.

Page | 33
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

5. The {companyLicCod}, username and password are parameters provided by WebPOS.


6. Use a tool like Postman to test the APIs.

Page | 34
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

APIs List with ApiKey authentication:


Host URL for Test environment: https://fepatest-api.webposonline.com
Host URL for Production environment: https://fepa-api.webposonline.com

Method Route Parameters Type Authen- Description


tication
CheckRuc /api/fepa/ak/v1/{environment}/CheckRuc/{apiKey environme GET ApiKey To verify a RUC,
}/{ruc}/{tipoRuc} nt: type
test o prod 0=Unknown,
apiKey 1=Natural,
ruc 2=Legal,
tipoRuc 3=Government
SendFileToProcess /api/fepa/ak/v1/{environment}/sendFileToProcess environme POST ApiKey Used to send a
/{companyLicCod}/{apiKey} nt, file in TXT, JSON
companyLi format with
cCod, WebPOS
apiKey specifications
APIs de consulta
GetResultFe /api/fepa/ak/v1/{environment}/GetResultFe/{com Environme GET ApiKey Used to obtain
panyLicCod}/{apiKey}/{cufe} nt,compan data from the
yLicCod,api processed
Key,cufe electronic
invoice
GetCufeBySystemRef /api/fepa/ak/v1/GetCufeBySystemRef/{companyLi companyLi GET ApiKey Used to obtain
cCod}/{apiKey}/{iAmb}/{docType}/{systemRef} cCod,apiKe the Cufe,
y,iAmb,doc Authorization,
Type,syste Date from the
mRef system
reference
iAmb:
1=Prod,
2=Test
GetDocReferenceInfo /api/fepa/ak/v1/GetDocReferenceInfo/{companyLi companyLi GET ApiKey Used to obtain
cCod}/{apiKey}/{systemRef}/{docType}/{iAmb} cCod,apiKe data from the
y,systemRe invoice
f,docType,i referenced by a
Amb Credit Note or
Debit Note
GetQRData /api/fepa/ak/v1/GetQRData/{companyLicCod}/{ap companyLi GET ApiKey To get the
iKey}/{cufe} cCod,apiKe content of the
y,cufe QR. URL of the
DGI to consult
the FE.
GetQR /api/fepa/ak/v1/GetQR/{companyLicCod}/{apiKey companyLi GET ApiKey To obtain the
}/{cufe} cCod,apiKe data of the QR
y,cufe and the image
in String Base
64 format

Page | 35
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

GetPdf /api/fepa/ak/v1/GetPdf/{companyLicCod}/{apiKey companyLi GET ApiKey To obtain the


}/{cufe} cCod,apiKe standard
y,cufe graphical
representation
(CAFE)
GetContainer /api/fepa/ak/v1/GetContainer/{companyLicCod}/{ companyLi GET ApiKey To get the FE
apiKey}/{cufe} cCod,apiKe container,
y,cufe which carries
the PAC
authorization
event. This is
the document
that is sent to
the FE receiver.
Otros APIs
SendFeByEmail /api/fepa/ak/v1/SendFeByEmail/{companyLicCod} companyLi POST ApiKey To send the
/{apiKey} cCod container and
Body: the PDF to the
{ recipient
"cufe":
"string",

"emailTo":
"string",

"emailCc":
"string"
}
GetUbics /api/fepa/ak/v1/getUbics/{apiKey} Test or GET ApiKey It is used to
Production obtain a list of
Provinces,
Districts and
corregimientos
GetPaises /api/fepa/ak/v1/getPaises/{apiKey} Test or GET ApiKey To obtain a list
Production of countries
with their ISO
codes
GetCPBSfams /api/fepa/ak/v1/GetCPBSfams/{apiKey} Test or GET ApiKey To obtain the
Production Panamanian
family of
categories of
goods and
services
GetCPBSegs /api/fepa/ak/v1/GetCPBSsegs/{apiKey} Test or GET ApiKey To obtain the
Production segments of
Panamanian
categories of
goods and
services

Page | 36
© 2020 WebPOS Panamá
Todos los derechos reservados.
Tel. (507) 392-3020
[email protected]

GetMonedas /api/fepa/ak/v1/GetMonedas/{apiKey} Test or GET ApiKey To obtain the


Production ISO currency
codes used in
export invoices
SendXmlFileToProces /api/fepa/ak/v1/test/sendXmlFileToProcess/{com companyLi POST ApiKey Used to send a
s panyLicCod}/{apiKey} cCod,apiKe WebPOS format
y XML file

Notes:

1. Use the URL corresponding to the environment you are using and add the path of the service
you want to invoke.
2. In each call the ApiKey must be sent.
3. The ApiKey can be changed for security reasons, by the user at any time by accessing their user
profile.
4. The {companyLicCod} and {apiKey} parameters are provided by WebPOS.
5. Use a tool like Postman to test the APIs or SOAP UI to test SOAP web services.

Page | 37

You might also like