For the most part, they are just words which don't have any inherent meaning. Different payment gateways use different terminology, which adds to the confusion.
That said, Omnipay has standardized on your convention (2):
Id
always refers to an identifier generated by your own application (e.g.transactionId
sent when initiating a new payment)Reference
always refers to an identifier generated by the payment gateway (e.g.transactionReference
orcardReference
returned in the response, ortransactionReference
sent when requesting a refund at later date)