
Give your payment a reference
Memos and invoice identifiers can help apps match on-ledger payments to orders. Memo data is public. Keep private information out.
Kev is organising $XYZ hoodie orders for the community. Two customers send XRP payments for the same amount. One customer is paying for order INV-1043, while another is paying for ORD-7789. Looking at the amounts alone will not tell Kev which order each payment belongs to.
A payment reference gives his app something to match against its order records. On the XRP Ledger, memos and the InvoiceID field can help make that connection.
What does a memo do?
A memo attaches extra information to a transaction. For Kev’s hoodie orders, that could be a short order reference such as INV-1043.
The customer includes the reference using a wallet or payment app that supports memos. Kev’s app reads it from the transaction and looks up the matching order.
At the protocol level, memo data is represented in hexadecimal. An app can convert ordinary text into that format and display it as readable text again. Encoding is not encryption: putting a reference into hexadecimal does not make it private.
How is an invoice identifier different?
XRPL Payment transactions also support an optional InvoiceID. This is a 256-bit identifier, represented as 64 hexadecimal characters, rather than a free-text invoice label.
Kev’s checkout could generate an identifier and store its connection to INV-1043 in his shop’s own database. When a payment includes that identifier, the app can match it to the order.
The ledger does not create the invoice or decide whether it has been paid correctly. Kev’s software must check the validated transaction, its result, the receiving address, and the asset and amount actually delivered before marking the order paid.
What should stay out of a payment reference?
Memos and invoice identifiers form part of the public transaction record. Keep names, home addresses, email addresses, passwords and wallet secrets out of them.
Kev can keep customer details in his private order system and put only an opaque reference on the ledger. Even a reference can reveal information if someone can connect it to other records.
A memo also does not replace a destination tag required by a receiving service. Follow that service’s instructions for each field.
Kev’s tip: Use a reference to find the order, then verify the payment before ticking it off. Keep the customer’s personal details off the ledger.
Sources
#XRPLEducationMonth