Sep31Transaction Info Needed Exception
Deprecated
SEP-31 v2.5.0 deprecated per-transaction fields. Use SEP-12 PUT /customer instead.
Exception thrown when the Receiving Anchor reports missing per-transaction fields.
Raised exclusively from POST /transactions when the anchor responds with HTTP 400 and error == "transaction_info_needed". The fields map mirrors the deprecated fields shape from GET /info and describes the per-transaction parameters the Sending Anchor must supply on retry.
The leaves of the fields map are always primitive Kotlin types (String, Boolean, Long, Double, or null) — never kotlinx.serialization.json.JsonElement instances. Callers can safely walk the nested Map<String, Any?> and List<Any?> structure without performing JsonElement casts.
Resolution workflow (legacy):
Inspect fields for the missing per-transaction parameters.
Populate the
fieldsmap on the nextSep31PostTransactionsRequestand retry.
The per-transaction fields workflow is deprecated. New integrations should register customer KYC via SEP-12 PUT /customer and pass sender_id / receiver_id instead.
Example - Handle transaction-info-needed:
try {
val response = sep31Service.postTransactions(request, jwt)
} catch (e: Sep31TransactionInfoNeededException) {
@Suppress("DEPRECATION")
println("Missing transaction fields: ${e.fields?.keys}")
// Populate the legacy fields map and retry, or migrate to SEP-12.
}See also:
Properties
Anchor response body for local debugging — see the rawResponseBody convention on Sep31Exception. null when no body was captured.