question

Jeffrey Blattman avatar image
Jeffrey Blattman asked grof answered

How can I add text / images to customer receipts?

I want to add some arbitrary text, or an image to the end of a customer receipt. How can I do this?

10 |2000 characters needed characters left characters exceeded

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered rahul43210 commented

The approved method is Smart Receipts. Smart Receipts allow you to add text, and a URL to the end of customer receipts. You cannot add images.

You can also use ReceiptRegistrationConnector, which is found in the Clover Android SDK,

This is a client-side only solution. It allows you to add images and / or text to the end of receipts, but web receipts will not contain this information. In a nutshell, a developer that wants to use Receipt Generator must author a content provider that responds to a well-defined content type. The content provider returns the data for the receipt: an image, and or text.

See ReceiptRegistrationTestActivity for an example of how to register your content provider with Clover, and ReceiptRegistrationTestProvider for an example content provider that generates images and text for receipts.

6 comments
10 |2000 characters needed characters left characters exceeded

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

so there's no way to add dynamic text to a web receipt? As far as I know using smart receipts allows you only to add the same text to all merchants using your app. Not dynamic text

0 Likes 0 ·

Good question @Niv

0 Likes 0 ·

if i want to test smart receipt then how it will be print?

0 Likes 0 ·

@deven You can email or view it on the web.

0 Likes 0 ·

@Niv Developer's have successfully used the Receipt Registration mechanism I linked above to add dynamic content. Smart receipts are not for dynamic text. You can add dynamic content at the Smart Receipt link destination however.

0 Likes 0 ·
Show more comments
grof avatar image
grof answered
Hi all, is ReceiptRegistrationConnector still the way to add custom text and images on printed receipts?

First I implemented it myself but it didn't work, now I checked out sdk examples ( ReceiptRegistrationTestActivity and ReceiptRegistrationTestProvider) but it doesn't work also.

One thing I noticed is that this part of example was removed (maybe obsolete).
Is there some kind of permission/setting that needs to be set on a test device/merchant?

Thank you
10 |2000 characters needed characters left characters exceeded

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