2019-03-25 19:44:40 +00:00
---
2021-09-30 10:31:47 +00:00
summary: 'an optional flag that is added to identify transactions to merchants, consisting of 64 hexadecimal characters'
2019-03-25 19:44:40 +00:00
terms: ["payment-ID", "payment-IDs"]
---
2020-08-16 17:11:02 +00:00
{% include disclaimer.html translated="no" translationOutdated="no" %}
2021-09-30 10:31:47 +00:00
2021-01-29 09:22:17 +00:00
*Note:* Long Payment IDs have been removed since release 0.15; it's not possible to use them anymore. More info in the [blog post ]({{ site.baseurl_root }}/2019/06/04/Long-Payment-ID-Deprecation.html ) that announced their deprecation.
2020-01-04 10:30:46 +00:00
2019-03-25 19:44:40 +00:00
### The Basics
2021-09-30 10:31:47 +00:00
Payment ID is an **arbitrary** and **optional** transaction attachment that
consists of 32 bytes (64 hexadecimal characters) or 8 bytes (in the case of
integrated addresses).
2019-03-25 19:44:40 +00:00
2021-09-30 10:31:47 +00:00
The Payment ID is usually used to identify transactions to merchants and
exchanges: Given the intrinsic privacy features built into Monero, where a
single public address is usually used for incoming transactions, the Payment
ID is especially useful to tie incoming payments with user accounts.
2019-03-25 19:44:40 +00:00
### Compact Payment IDs and Integrated Addresses
2021-09-30 10:31:47 +00:00
Since the 0.9 Hydrogen Helix version, Payment IDs can be encrypted and
embedded in a payment address. The Payment IDs of this type should be
64-bits and are encrypted with a random one-time key known only to the
sender and receiver.
2019-03-25 19:44:40 +00:00
### Creating a Payment ID
2021-09-30 10:31:47 +00:00
It is recommended to use the official wallet's `integrated_address` command
to automatically generate Integrated Addresses that contain Compact Payment
IDs. If you want to use the command line, you can generate Payment IDs as
follows:
2019-03-25 19:44:40 +00:00
Creating a compact Payment ID for an Integrated Address:
```# openssl rand -hex 8```
Creating an old-style Payment ID:
```# openssl rand -hex 32```