Sep38Fee Detail
@Serializable
Detailed breakdown of a single fee component.
Provides transparency about individual fees that make up the total fee for an exchange operation. Each detail represents one type of fee charged by the anchor (e.g., network fee, processing fee, conversion fee).
The sum of all amount values across all fee details should equal the total fee amount specified in the parent Sep38Fee object.
Example - Network fee:
val networkFee = Sep38FeeDetail(
name = "Network fee",
amount = "5.00",
description = "Fee charged to cover blockchain transaction costs"
)Content copied to clipboard
Example - Processing fee:
val processingFee = Sep38FeeDetail(
name = "Processing fee",
amount = "10.00",
description = "Fee for processing the exchange operation"
)Content copied to clipboard
Example - Fee without description:
val serviceFee = Sep38FeeDetail(
name = "Service fee",
amount = "8.40"
)
// Description is optionalContent copied to clipboard
Example - Displaying fee breakdown to users:
val quote = sep38Service.postQuote(request, jwtToken)
println("Total fee: ${quote.fee.total} ${quote.fee.asset}")
quote.fee.details?.forEach { detail ->
println(" ${detail.name}: ${detail.amount}")
detail.description?.let { println(" ($it)") }
}
// Output:
// Total fee: 42.00 iso4217:BRL
// PIX fee: 12.00
// (Fee charged in order to process the outgoing PIX transaction.)
// Brazilian conciliation fee: 15.00
// (Fee charged in order to process conciliation costs with intermediary banks.)
// Service fee: 15.00Content copied to clipboard
See also:
Sep38Fee which contains the total fee and optional details list
Sep38PriceResponse and Sep38QuoteResponse which include fee information