Payment Reference
In the Reference-based Payment Networks, Payments are linked to Requests via a paymentReference
which is derived from the requestId
and payment recipient address.
This paymentReference
consists of the last 8 bytes of a salted hash of the requestId
and payment recipient address, concatenated :
requestId
is the id of the requestsalt
is a random number with at least 8 bytes of randomness. It must be unique to each requestaddress
is the payment address for payments, the refund address for refundslowercase()
transforms all characters to lowercasehash()
is a keccak256 hash functionlast8Bytes()
take the last 8 bytes
Use the PaymentReferenceCalculator to calculate the payment reference.
Last updated