question

gaurav avatar image
gaurav Suspended asked sam Deactivated edited

How to update customer receipt with some text after the payment is successful.

I want to add some text to the customer receipt once the payment is complete. So if user uses sale app and default merchant receipt get printed after the payment is processed successfully. Now when user clicks on print customer receipt I want to add some text to it so that when ever the customer receipt is printed that custom text information will be added to it. Is there is any clover api through which it can be achieved for the default sale app or custom app which is using clover sale app to process sale.
PaymentsPrint
10 |2000

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

1 Answer

sam avatar image
sam Deactivated answered sam Deactivated edited
You could use the `Note` field in orders and payment receipts. Listen for completed payment using broadcast listener with intent-filter: `Intents.ACTION_PAYMENT_PROCESSED`

You can programmatically edit `Note` using either the Android Clover SDK or REST API:
https://clover.github.io/clover-android-sdk/com/clover/sdk/v3/order/Order.html#setNote-java.lang.String-
`order.setNote(String note);`
or
https://sandbox.dev.clover.com/api_docs/#!/orders/...
`POST v3/.../orders/{orderID}` with body: `{"note": "my_note"}`

Make sure to select print note in the receipt Setup app:


screen.png (116.0 KiB)
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