GetCustomerInfoProvidedField

@Serializable
data class GetCustomerInfoProvidedField(val type: String, val description: String, val choices: List<String>? = null, val optional: Boolean? = null, val status: FieldStatus? = null, val error: String? = null)

Represents a field that the anchor has already received from the customer in SEP-12.

Defines a piece of information the anchor has received for the customer, along with its verification status. Used in GetCustomerInfoResponse to communicate which fields have been provided and their current verification state.

This object is not required unless one or more provided fields require verification via the verification endpoint. If the server does not wish to expose which fields were accepted or rejected, the status property may be omitted.

Field attributes:

  • type: Data type of the field value (string, binary, number, date)

  • description: Human-readable description of the field

  • choices: Optional array of valid values (for reference)

  • optional: Whether the field is optional

  • status: Verification status (ACCEPTED, PROCESSING, REJECTED, VERIFICATION_REQUIRED)

  • error: Human-readable error message if status is REJECTED

Example - Accepted field:

GetCustomerInfoProvidedField(
type = "string",
description = "Legal last name",
choices = null,
optional = false,
status = FieldStatus.ACCEPTED,
error = null
)

Example - Rejected field with error:

GetCustomerInfoProvidedField(
type = "string",
description = "Email address",
choices = null,
optional = false,
status = FieldStatus.REJECTED,
error = "Invalid email format"
)

Example - Field requiring verification:

GetCustomerInfoProvidedField(
type = "string",
description = "Mobile phone number",
choices = null,
optional = false,
status = FieldStatus.VERIFICATION_REQUIRED,
error = null
)

Example - Checking provided fields:

val response = kycService.getCustomerInfo(request)

response.providedFields?.forEach { (fieldName, fieldInfo) ->
when (fieldInfo.status) {
FieldStatus.ACCEPTED -> {
println("$fieldName: Verified successfully")
}
FieldStatus.PROCESSING -> {
println("$fieldName: Under review")
}
FieldStatus.REJECTED -> {
println("$fieldName: Rejected - ${fieldInfo.error}")
// Prompt user to correct and resubmit
}
FieldStatus.VERIFICATION_REQUIRED -> {
println("$fieldName: Verification code required")
// Prompt user to enter code sent via email/SMS
}
null -> {
println("$fieldName: Provided (status unknown)")
}
}
}

See also:

Constructors

Link copied to clipboard
constructor(type: String, description: String, choices: List<String>? = null, optional: Boolean? = null, status: FieldStatus? = null, error: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "choices")
val choices: List<String>?

Optional array of valid values for this field

Link copied to clipboard
@SerialName(value = "description")
val description: String

Human-readable description of this field

Link copied to clipboard
@SerialName(value = "error")
val error: String?

Human-readable error description if status is REJECTED

Link copied to clipboard
@SerialName(value = "optional")
val optional: Boolean?

Whether this field is optional

Link copied to clipboard
@SerialName(value = "status")
val status: FieldStatus?

The verification status of this field (may be null if not exposed)

Link copied to clipboard
@SerialName(value = "type")
val type: String

The data type of the field value (string, binary, number, date)