Illustration of ISO 8583 message field layout used for field F37

F37-RETRIEVAL REFERENCE NUMBER:
A code generated by the bank that initiates the transaction, used to uniquely track the transaction. It is a 12-character alphanumeric value.

F37 consists of the following parts:

PositionValue
1-4Julian date (YDDD) - Equivalent of P.7-Transmission Date and Time
5-6Hour of P.7-Transmission date and time (HH)
7-12Actual terminal sequence number - Equivalent of P.11-STAN

Difference between RRN and STAN

The F37 (RRN) and F11 (STAN) fields are often confused. STAN is a 6-digit counter used to track a transaction within the system that sends the message, and it wraps around at regular intervals. RRN, on the other hand, is a 12-character reference used so that the transaction can be located over a much longer period of time. As shown in the structure above, because RRN combines date, time, and STAN information together, it stays unique for far longer than STAN does.

What is a Julian date?

In the Julian date format used in the first four digits of the RRN, the last digit of the year and the day of the year are included. For example, for the 45th day of 2019 (February 14), the value would be 9045. This format allows the date information to fit into 4 digits.

Stays the same throughout the transaction

The RRN is generated once by the party that initiates the transaction. The same RRN is used in the response, cancellation, advice, and clearing records belonging to that same transaction. This allows all records of the transaction at its different stages to be matched with one another.

Different formats

The structure above is a commonly used format, but it is not mandatory. Some networks and banks may generate the RRN using different methods. What matters is that the value is 12 characters long and uniquely identifies the transaction.