My company runs a webshop. We work with a partner that gives discount vouchers to our customers after they buy (the vouchers can be used in other online shops) and also gives vouchers for our shop to customers of other shops. For this purpose, the partner asks us to send them some data about our customers and their respective order on our payment complete page. They want us to do this by setting some javascript variables and including a javascript from their server, which will also display an advertisement banner on our payment complete page.
I already learned that including advertisements banners bears some risk. It seems that our company already made the decision to accept this risk for this partner.
Now I am worried about one particular point. The data that the partner wants us to send also includes our customer's session id, in order to "recognize double requests" as the partner states. I think we should not sent the real session id to the partner, because with this information the partner could fake the customer's identity on our site. Therefore, I would like to send a hash of the session id instead. With this, the partner should still be able to recognize double requests without being able to fake the customer's identity.
Does this make sense? Or does the partner, by the fact that we include a javascript from their server, already have ways to do more harm than they could possible do by knowing the session id? We store the session id in an HttpOnly cookie (for the connection between our server and our customer).
If it makes sense to hash the session id, what hash function would be a good choice?