Sep31TransactionStatus

Enumeration of SEP-31 transaction lifecycle statuses defined by the spec.

Each constant carries the lowercase wire form (value) used by the Receiving Anchor in GET /transactions/:id responses. The SDK keeps Sep31TransactionResponse.status as a raw String so new spec statuses are accepted without an SDK release; use fromString when typed dispatch is preferred.

Usage

val response: Sep31TransactionResponse = sep31Service.getTransaction(id = "tx-id", jwt = jwt)
when (Sep31TransactionStatus.fromString(response.status)) {
Sep31TransactionStatus.PENDING_SENDER -> println("Awaiting Sending Anchor payment")
Sep31TransactionStatus.COMPLETED -> println("Delivered to Receiving Client")
null -> println("Unknown status: ${response.status}")
else -> println("Status: ${response.status}")
}

See also

Entries

Link copied to clipboard

Awaiting payment from the Sending Anchor.

Link copied to clipboard

Stellar payment submitted by the Sending Anchor but not yet confirmed on-network.

Link copied to clipboard

Customer KYC information must be updated via SEP-12 before the transaction can advance.

Link copied to clipboard

Per-transaction fields require an update (legacy; superseded by SEP-12).

Link copied to clipboard

Payment is being processed by the Receiving Anchor.

Link copied to clipboard

Payment was submitted to an external (off-chain) network but is not yet confirmed.

Link copied to clipboard

Funds successfully delivered to the Receiving Client.

Link copied to clipboard

Funds were refunded to the Sending Anchor; inspect Sep31TransactionResponse.refunds for details.

Link copied to clipboard

Transaction abandoned or the underlying SEP-38 quote expired.

Link copied to clipboard

Catch-all for unspecified errors; inspect Sep31TransactionResponse.statusMessage for context.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int
Link copied to clipboard

The exact lowercase wire form used in SEP-31 JSON payloads.

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.