CloudPark CloudPark Integration API

Certified integrator

Zanthus

Integration model: Zanthus POS (native integration) · Full API guide: Store Integration

The Zanthus POS already talks to CloudPark through its generic end-of-transaction web service. See how to set up Zeus Manager and the POS files.

How it works at the checkout

The Zanthus POS already has the CloudPark integration: there is nothing to develop. It uses Zanthus's own ZFIMTRN library (end-of-transaction notification, in generic webservice mode), which calls CloudPark during the sale.

Payment phasethe POS asks for the TICKET field and the operator reads the barcode of the parking ticket.
The POS calls CloudParkwith the ticket number and the purchase amount.
CloudPark applies the discountaccording to the parking lot's purchase tiers and returns the amount still to be paid (if any).
The POS shows and printsthe message. If an amount is left, it is added to the sale total and, after payment, the POS confirms it to CloudPark.

Prerequisites

  • Zeus Manager 2.14.143.130 or later, with the database scripts up to date.
  • Zeus Frente de Loja (CODFON) 2.14.140.128 or later.
  • The POS terminals must reach the CloudPark address over HTTPS (port 443). Allow it in the store's firewall/proxy.

Settings

Sandbox (testing)Production
Addresssandbox.cloudpark.com.br:443Provided by CloudPark for each parking lot
Pathapi/v1/integration/pdvzanthus
AuthenticationNone. The call does not use a token.

The library appends ZFimTrnPortType to the path, so the URL called is https://sandbox.cloudpark.com.br/api/v1/integration/pdvzanthusZFimTrnPortType.

1. Parameters in Zeus Manager

In Administração > Valores de Parâmetros (parameter values), group 47 – Interface com Sistemas:

FieldParameterValue
Tp 1a IntegraA00IBA10 (generic webservice). The file names in step 3 use this number.
Opção 1a IntegraA00IBBDepends on how the store operates. With bit 0 set (add 1), the operator cannot skip entering the ticket; without it, the operator can skip with the Subtotal key (customer without parking).

If the 1st integration is already used by another system, use the second one: A00IBC (type) and A00IBD (options).

2. Payment method

In Cadastros > Recebimentos e Pagamentos (payment methods), Índices tab, Opções de Operação field: check 00256 – Notifica fim de transação.

3. Files on the POS

In the /Zanthus/Zeus/pdvJava directory of each POS, create the two files below (the 10 in the name is the type chosen in step 1).

ZFIMTRN1000.CFG: access to CloudPark

ZFIMTRN1000.CFG (sandbox)
endereco=sandbox.cloudpark.com.br:443
path=api/v1/integration/pdvzanthus
opcoes=63
timeout=30

In production, replace endereco with the address provided by CloudPark. timeout is the time, in seconds, that the POS waits for the response. If the store reaches the internet through a proxy, set it in the proxy= parameter.

FIMTRN10.CFG: ticket field

FIMTRN10.CFG
Descritor=|1|TICKET          0712010000|

With the descriptor in the file, the POS does not need to ask CloudPark which fields to collect. It defines one field:

PartValueMeaning
Label (16 positions)TICKET + 10 spacesText on the POS display
Validation algorithm07
Length12Up to 12 digits
Magnetic card / optical reading / pinpad0 1 0Input through the barcode reader
Keyboard, identification, reserved0 0 0

What the POS sends and receives

This part is handled by the Zanthus library; it is a reference for checking the logs. The POS calls the ZFimTrnAcesso method (SOAP) with a <ZFimTrn> XML in the xml_de_ida argument, and CloudPark responds in xml_de_resposta, in ISO-8859-1.

Calculate (request 1)

FieldTypeDescription
campo01required text Ticket number read by the reader (the final check digit is accepted).
valorrequired number Purchase amount, with a decimal point (e.g. 80.00).
loja, pdv, cupom integer Sale identification (store, POS, receipt), for logging only.

Response:

FieldTypeDescription
resultado integer 4 = success, the POS continues the sale. 2 = error (the operator can try again or give up).
exibicao / impressao text Message for the display and for the receipt (e.g. Validado com sucesso).
titulo / rodape text Window title and footer (Ticket: 400045265).
sem_confirmar integer 1 = the discount covered everything, there is nothing to charge or confirm. 0 = there is an amount to charge.
valor number Parking amount still to be paid, added to the sale.
duracao integer Minutes the customer has to leave after the discount.

Confirm (request 4)

Sent after payment, when the calculation response came with sem_confirmar equal to 0. It carries the same fields plus cobrado, the parking amount actually charged. CloudPark records the payment on the ticket and responds Pagamento confirmado! (payment confirmed).

Messages shown on the POS

MessageWhat to do
Validado com sucesso (validated successfully)Nothing: the customer's exit is released.
Valor pendente, valide no estacionamento / O valor a ser pago é R$ X (amount pending / amount to be paid)The discount did not cover the whole stay. The amount is added to the sale (or the customer pays at the parking lot's kiosk).
Esse ticket já foi validado (ticket already validated)The ticket has already received the discount. Reading it again does not apply the discount twice.
Valor da compra não da abono ao estacionamento (purchase amount does not qualify for a parking discount)The purchase does not reach the lowest tier. The customer pays for parking normally.
Ticket X não encontrado (ticket not found)Check the barcode reading. If it persists, direct the customer to the parking lot's checkout.

Test on the sandbox

With ZFIMTRN1000.CFG pointing to the sandbox, make test sales with these tickets (the sandbox gives a discount for purchases from R$ 50.00):

TicketResult with a purchase of R$ 50.00 or more
400045265"Validado com sucesso"; nothing to charge (sem_confirmar = 1).
379924820Amount pending: R$ 15.35 to charge (sem_confirmar = 0, the POS confirms afterwards).
384745455"Esse ticket já foi validado" (ticket already validated).
403045263"Ticket não encontrado" (ticket not found).

With a purchase below R$ 50.00, any valid ticket responds that the amount does not qualify for a discount. You can also simulate the POS call straight from the browser:

Try it on the sandbox

Send the real request to the sandbox and see the response right here. Pick a test scenario or edit the fields; the test token is already filled in.

POST
POS call (calculate or confirm)/api/v1/integration/pdvzanthusZFimTrnPortType

Going to production

  1. Agree on the discount tiers with the parking lot; CloudPark sets them up.
  2. Ask CloudPark for the parking lot's address and replace endereco in ZFIMTRN1000.CFG on every POS.
  3. Make a real test sale with a parking ticket and check the discount at the exit kiosk.

FAQ

Is a token required?

No. The Zanthus POS call does not use authentication. Keep the address restricted to the store's network.

The payment was confirmed, but the ticket was not settled.

Check that the confirmation (request 4) was sent with cobrado greater than zero. Without that amount CloudPark only returns the message, without recording a payment.

Can I resend the same reading if the response did not arrive?

Yes. A ticket that already has the discount returns success again, without applying the discount twice.

The POS only shows "connection error".

The POS could not reach CloudPark: check endereco, that port 443 is open and the store's proxy. If your POS version does not support HTTPS, talk to us before setting it up.