Sep08PostActionResponse

Represents the response from a SEP-8 action URL after the user completes a required action (e.g., KYC verification) via the postAction endpoint.

When the approval server returns an Sep08PostTransactionResponse.ActionRequired response, the client directs the user to the action URL. After the action is completed, the action URL returns one of two possible outcomes, each modeled as a subclass of this sealed class. The response type is determined by the result field in the JSON response.

Response Types

  • Done: No further action is required. The client should resubmit the original transaction to the approval server.

  • NextUrl: The user must visit another URL to continue the process (e.g., a multi-step verification flow).

Usage

val json = Json.parseToJsonElement(responseBody).jsonObject
val response = Sep08PostActionResponse.fromJson(json)

when (response) {
is Sep08PostActionResponse.Done -> {
// Resubmit the original transaction to the approval server
}
is Sep08PostActionResponse.NextUrl -> {
// Direct the user to response.nextUrl
}
}

See also

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard

No further action is required from the user.

Link copied to clipboard
data class NextUrl(val nextUrl: String, val message: String? = null) : Sep08PostActionResponse

The user must visit another URL to continue the action flow.