Sep31FeeDetails

data class Sep31FeeDetails(val total: String, val asset: String, val details: List<Sep31FeeDetailsDetails>? = null)

Fee breakdown applied to a SEP-31 transaction.

Replaces the deprecated amount_fee / amount_fee_asset fields with a structured object containing the aggregate fee (total), the fee asset (asset), and an optional list of line items (details) that further decompose the total.

The total field is String (not numeric) because SEP-31 amounts must preserve decimal precision; callers convert to a domain-specific numeric type at the application boundary.

Usage

val response = sep31Service.getTransaction(id = "tx-id", jwt = jwt)
val fees = response.feeDetails ?: return
println("Total fee: ${fees.total} ${fees.asset}")
for (line in fees.details.orEmpty()) {
println(" ${line.name}: ${line.amount}")
}

See also

Constructors

Link copied to clipboard
constructor(total: String, asset: String, details: List<Sep31FeeDetailsDetails>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

SEP-38 Asset Identification Format string identifying the fee asset.

Link copied to clipboard

Optional list of fee line items whose Sep31FeeDetailsDetails.amount values sum to total. null when the anchor does not decompose the fee.

Link copied to clipboard

Aggregate fee charged in units of asset. Preserve as String to avoid floating-point precision loss.