question

Danielle Cox avatar image
Danielle Cox asked Danielle Cox commented

ReceiptRegistrationConnector - which tender is printing?

I understand that each tender gets its own receipt and I think this is good. However, I am wanting to add information related to that tender to the receipt. It seems all I get is an orderId, and I can get that order to see the tenders. But how do I know which tender this receipt is for?

Thanks!

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered Danielle Cox commented

No you do not. You only have the order ID. I suppose it's possible given the order to look up the payment and get the tender from the payment, but if there are multiple payments you are out of luck. The Receipt Registration mechanism should really be passing you the payment ID. Then you could get the tender.

The Receipt Registration mechanism is really a prototype that probably should not have ended up in the SDK. Smart Receipts is the approved method to augment the receipt with data. I realize it's less powerful, but the reason is that it works for both web and paper receipt. Receipt Registration can't do that, and it would be "interesting" to implement Receipt Registration for both web and paper receipts.

Disclaimer: I built Receipt Registration, but had nothing to do w/ Smart Receipts. If I had, I would have pushed to have it support the same use cases.

6 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.

Danielle Cox avatar image Danielle Cox commented ·

Yes, I understand that looking at the printed receipt I know which tender it is. However, do I have access to that from the call to public Cursor query(Uri uri, String[] strings, String s, String[] strings2, String s2) as registered? I only see orderId and it lists all tenders and I don't see how to tell the specific tender that this receipt is for. I am wanting to add something to my tender and not others.

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

Ah sorry, let me adjust the answer. I guess reading the question is important.

0 Likes 0 ·
Danielle Cox avatar image Danielle Cox commented ·

Thanks - I created an order with two payments. in the second receipt, the first tender has this line "href": "https://sandbox.dev.clover.com/v3/merchants/AVK6V7V6H43AT/tenders/HB328R84WXW3C", can I use the absence of that to tell which one has been printed? Am I correct that smart receipts only gives the information if they follow to the web - ie the paper receipt will not have the custom information?

What I am trying to do is add something related to that tender to the receipt that payment is on. For example the gift card remaining balance

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

I can't suggest you use something that's not documented. And honestly I don't know I'd have to research what exactly are the semantics and caveats of trying to use that. Smart Receipts works for web and paper receipts. I don't think you can add complex information such as a gift card balance via Smart Receipts. You can basically add a URL.

0 Likes 0 ·
Danielle Cox avatar image Danielle Cox commented ·

Ok, I will deal with the simple case using your receipt mechanism - what do you suggest otherwise? A separate "receipt" printed with the details on it?

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community