Transaction metadata is a section of data that gets added to a transaction after it is processed. Any transaction that gets included in a ledger has metadata, regardless of whether it is successful. The transaction metadata describes the outcome of the transaction in detail.
Warning: The changes described in transaction metadata are only final if the transaction is in a validated ledger version.
Some fields that may appear in transaction metadata include:
||Array||List of ledger objects that were created, deleted, or modified by this transaction, and specific changes to each.|
||Currency Amount||DEPRECATED. Replaced by
||Unsigned Integer||The transaction's position within the ledger that included it. (For example, the value
||String||A result code indicating whether the transaction succeeded or how it failed.|
||Currency Amount||The Currency Amount actually received by the
Amount of a Payment transaction indicates the amount to deliver to the
Destination, so if the transaction was successful, then the destination received that much -- except if the transaction was a partial payment. (In that case, any positive amount up to
Amount might have arrived.) Rather than choosing whether or not to trust the
Amount field, you should use the
delivered_amount field of the metadata to see how much actually reached its destination.
delivered_amount field of transaction metadata is included in all successful Payment transactions, and is formatted like a normal currency amount. However, the delivered amount is not available for transactions that meet both of the following criteria:
- Is a partial payment
- Included in a validated ledger before 2014-01-20
If both conditions are true, then
delivered_amount contains the string value
unavailable instead of an actual amount. If this happens, you can only figure out the actual delivered amount by reading the AffectedNodes in the transaction's metadata.
See also: Partial Payments