Sep31Customer Info Needed Exception
Exception thrown when the Receiving Anchor needs additional SEP-12 KYC information.
Raised exclusively from POST /transactions when the anchor responds with HTTP 400 and error == "customer_info_needed". The type field, when present, names the specific SEP-12 customer type the Sending Anchor must collect (matching a key from the sep12.sender.types or sep12.receiver.types map in the GET /info response).
Resolution workflow:
Inspect type to determine which SEP-12 customer type to collect.
Call SEP-12
PUT /customerwith the missing KYC fields.Use the returned
idassender_idorreceiver_idin the SEP-31 request.Retry
POST /transactionswith the updated request body.
The exception message interpolates the anchor-supplied type after passing it through the project-wide sanitizer so log-injection and terminal-escape payloads cannot reach application logs via the exception text. The type property itself is exposed unsanitized for programmatic use by the caller.
Example - Handle customer-info-needed:
try {
val response = sep31Service.postTransactions(request, jwt)
} catch (e: Sep31CustomerInfoNeededException) {
println("SEP-12 KYC required; collect fields for type=${e.type}")
// Submit SEP-12 PUT /customer with the missing fields, then retry.
}See also:
Properties
Anchor response body for local debugging — see the rawResponseBody convention on Sep31Exception. null when no body was captured.