question

khurram avatar image
khurram asked David Marginian Deactivated edited

Online order using REST API is printing twice

Hi,

We have our own mobile phone apps developed using clover REST Api and customers are using to place orders. We are facing an issue that every order comes from our apps is getting printed twice.

Our app is working in 19 locations and in every location we have 2 clover register devices and each register have our printing app installed.

Because of this problem we have lot of issues to handling orders so need your help please to solve the issue. Please let us know if there is any specific setting we can make in our code to solve this.
REST APIClover Android SDKPrint
16 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·

Your app is printing the orders? What is the print trigger?

0 Likes 0 ·
khurram avatar image khurram David Marginian ♦♦ commented ·

Thanks for your reply. As soon as new order comes from our mobile phone apps then our printing app which we have installed in clover register send the printing request

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ khurram commented ·

I am asking for details on what the print trigger is, otherwise I have to make assumptions. Does your architecture have its own messaging system? Or does your app rely on an order create listener on the device? What exactly does your app do to determine there is an order that needs to be printed? All orders will sync to all Clover devices so this seems to be expected behavior.

0 Likes 0 ·
Show more comments
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

To be clear, is the issue that on a single device printing results in 2 receipts, or that you are multiple devices are each printing one receipt?

0 Likes 0 ·
khurram avatar image khurram Jeffrey Blattman ♦♦ commented ·

We have two clover devices and each printing once.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ khurram commented ·

I see two options:

1) Jeff gave me this idea. Basically, you can have a configuration option in your app where you allow the merchant to select what printer they want to use for online orders (the merchant endpoint allows you to expand printers). Then your app can check which printer was configured and only print if a match is found.

2) My original idea, implement some short of messaging service that only delivers the print request to a single device.

Keep in mind, querying for orders as you are doing now may eventually lead to rate-limits so that is something you need to change as well.

0 Likes 0 ·
Show more comments

1 Answer

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

Closing this post. The developer's application needs to be intelligent enough to print to a specific printer. This can be accomplished via configuration/code in the 3rd party app (allow merchants to select which printer orders should be printed on).

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community