Sep31TransactionResponse

data class Sep31TransactionResponse(val id: String, val status: String, val statusEta: Long? = null, val statusMessage: String? = null, val amountIn: String? = null, val amountInAsset: String? = null, val amountOut: String? = null, val amountOutAsset: String? = null, val amountFee: String? = null, val amountFeeAsset: String? = null, val feeDetails: Sep31FeeDetails? = null, val quoteId: String? = null, val stellarAccountId: String? = null, val stellarMemoType: String? = null, val stellarMemo: String? = null, val startedAt: String? = null, val updatedAt: String? = null, val completedAt: String? = null, val stellarTransactionId: String? = null, val externalTransactionId: String? = null, val refunded: Boolean? = null, val refunds: Sep31Refunds? = null, val requiredInfoMessage: String? = null, val requiredInfoUpdates: Map<String, Any?>? = null)

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

Link copied to clipboard
constructor(id: String, status: String, statusEta: Long? = null, statusMessage: String? = null, amountIn: String? = null, amountInAsset: String? = null, amountOut: String? = null, amountOutAsset: String? = null, amountFee: String? = null, amountFeeAsset: String? = null, feeDetails: Sep31FeeDetails? = null, quoteId: String? = null, stellarAccountId: String? = null, stellarMemoType: String? = null, stellarMemo: String? = null, startedAt: String? = null, updatedAt: String? = null, completedAt: String? = null, stellarTransactionId: String? = null, externalTransactionId: String? = null, refunded: Boolean? = null, refunds: Sep31Refunds? = null, requiredInfoMessage: String? = null, requiredInfoUpdates: Map<String, Any?>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Deprecated aggregate fee charged by the anchor. Use feeDetails instead.

Link copied to clipboard

Deprecated fee asset. Use feeDetails instead.

Link copied to clipboard

Amount of the Stellar asset received or to be received by the Receiving Anchor.

Link copied to clipboard

SEP-38 Asset Identification of the inbound asset.

Link copied to clipboard

Amount sent or to be sent by the Receiving Anchor to the Receiving Client.

Link copied to clipboard

SEP-38 Asset Identification of the delivered asset.

Link copied to clipboard

UTC ISO 8601 completion timestamp.

Link copied to clipboard

External (off-chain) transaction identifier for the final delivery.

Link copied to clipboard

Structured fee breakdown (replaces amountFee / amountFeeAsset).

Link copied to clipboard
val id: String

Transaction identifier matching the id returned by POST /transactions.

Link copied to clipboard

SEP-38 quote id used to create this transaction.

Link copied to clipboard

Deprecated boolean indicating full refund. Use refunds instead.

Link copied to clipboard

Structured refund aggregate.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

UTC ISO 8601 timestamp when the transaction was created.

Link copied to clipboard

Lifecycle status as a raw string. Use Sep31TransactionStatus.fromString to map to the enum.

Link copied to clipboard

Estimated seconds until the next status change. null when not reported.

Link copied to clipboard

Human-readable status description.

Link copied to clipboard

Receiving Anchor's Stellar account that the Sending Anchor pays to.

Link copied to clipboard

Memo attached to the on-chain payment.

Link copied to clipboard

Type of stellarMemo (text, hash, or id).

Link copied to clipboard

Stellar transaction hash of the on-chain payment initiating the transfer.

Link copied to clipboard

UTC ISO 8601 timestamp of the last status transition.