Plug-in support


I am interested in writing a plug-in for SambaPOS that upon closing a ticket executes a custom action. The action could be arbitrary, but in any case would involve network operation. It would be great if the plug-in could be configured from within SambaPOS, but it is not a requirement. Can you please advise how to achieve this? Ultimately, I may be interested in offering the plug-in in the SambaPOS marketplace.


What does the plug in do?

V4 will no longer receive updates v5 is the current version.

In short, the Czech Republic is marching towards electronic records of sales

The plug-in shall send a record for each sale to a central server provided by the government of the Czech Republic.

I see that V5 is out, but is not free. So let me rephrase the question to how difficult is to achieve such thing on V4 and V5.


V5 would offer the possibility of using scripts to send the sales to government depending on what format they are expecting to receive.

V4 will not receive further updates so something like this would be nearly impossible for v4. With v5 its probably possible now to do what your wanting without having to code a plugin we have powerful scripting support in v5.

The message to the government needs to be exactly as per the specification. SOAP message using client SSL certificate for authentication, not sure if that is available in the scripting language. Anyway, can you please point me at some documentation?

This forum is the best documentation. Do some searches in v5 categories also you can find lots of features listed in the v5 features compilation thread. V5 release category also documents features as they are released.

SOAP is XML isnt it? There is a helper for posting XML, not so sure about the certificate, My JSON based API scripts only required user & pass.

Yes SOAP is XML. I am using SOAP with TimeTrex integration.

1 Like

So certificate might be the only hurdle, not had to deal with that myself…

I may be wrong about the client SSL authentication. I am quickly looking at the spec and it rather seems to be used for computing an HMAC of the message.

Are there some docs for the scripting language?

We should be able to use jscript to send a SOAP request with SSL Certificate.[quote=“Vladimir_Lapacek, post:12, topic:11354”]
Are there some docs for the scripting language?

We are using JSCRIPT so you might start studying that. You can install v5 and use it in trial mode for testing before purchase. No need to purchase until you decide if you want to go live or not. Trial mode is unrestricted for 500 tickets.

1 Like

There is lots of info and examples on the forum.
The code is JScript which you can google. Very similar to Java.

@Vladimir_Lapacek here is documentation of most features in v5. There are a lot of features not part of this post but this should get you started.

Here is a basic example of using the scripting to create custom weather tile that feeds data from weatherunderground api using jscript:

Here is a tutorial to help migrate to v5 from v4 while keeping v4 database in tact.


My PMS topic also has allot of info from while I was learning and also some scripts you might be able to take parts from if you adjust the formatting from JSON to XML