Sep31Transaction Response
Full state of a SEP-31 cross-border payment transaction.
Returned by GET /transactions/:id and PATCH /transactions/:id. Captures the transaction's lifecycle status, on-chain payment instructions, amount and fee breakdown, refund aggregate, and any required-info-update prompts.
Amount fields (amountIn, amountInAsset, amountOut, amountOutAsset, amountFee, amountFeeAsset) are String? (not numeric) because SEP-31 amounts must preserve decimal precision. Callers convert to a domain-specific numeric type at the application boundary.
The status field is kept as raw String. Use Sep31TransactionStatus.fromString for typed status handling. The SDK does not internally compare against the enum so a new spec status does not require an SDK release.
statusEta is Long? (not Int?) because anchors that emit multi-day ETAs in seconds exceed Int range; the SEP-31 spec types this as number.
The requiredInfoUpdates map is parsed with primitive-leaf semantics: every value at every depth is either a String, Boolean, Long, Double, or null, never a kotlinx.serialization.json.JsonElement instance. Callers can walk the structure with simple as Map<String, Any?> and as List<Any?> casts.
Usage
val response = sep31Service.getTransaction(id = "11111111-1111-1111-1111-111111111111", jwt = jwt)
println("Status: ${response.status}")
println("Amount in: ${response.amountIn} ${response.amountInAsset ?: "(stellar asset)"}")
response.feeDetails?.let { println("Fees: ${it.total} ${it.asset}") }See also
Constructors
Properties
Deprecated fee asset. Use feeDetails instead.
SEP-38 Asset Identification of the inbound asset.
SEP-38 Asset Identification of the delivered asset.
UTC ISO 8601 completion timestamp.
External (off-chain) transaction identifier for the final delivery.
Structured fee breakdown (replaces amountFee / amountFeeAsset).
Structured refund aggregate.
Human-readable message accompanying requiredInfoUpdates. Populated only when status is pending_transaction_info_update. That flow is deprecated as of SEP-31 v3.0.0 — new integrations route updates through the SEP-12 pending_customer_info_update path instead and will never observe this field set.
Fields requiring updates from the Sending Anchor, in the same shape as the asset object's deprecated fields map. Leaves are primitive Kotlin types only. Populated only when status is pending_transaction_info_update; see the note on requiredInfoMessage for why new integrations should not depend on this field.
Lifecycle status as a raw string. Use Sep31TransactionStatus.fromString to map to the enum.
Human-readable status description.
Receiving Anchor's Stellar account that the Sending Anchor pays to.
Memo attached to the on-chain payment.
Type of stellarMemo (text, hash, or id).
Stellar transaction hash of the on-chain payment initiating the transfer.