getCustomerInfo

Retrieves customer information and KYC status from the anchor.

This endpoint serves two primary purposes:

  1. Discover required fields: If no customer exists, returns the fields needed to register

  2. Check KYC status: For existing customers, returns current status and additional requirements

Return

GetCustomerInfoResponse with status and field requirements

Parameters

request

GetCustomerInfoRequest containing authentication and identification

Throws

If customer not found (404)

If JWT token is invalid (401)

For other errors

Example:

val request = GetCustomerInfoRequest(
jwt = authToken,
account = userAccountId,
type = "sep31-sender"
)
val response = kycService.getCustomerInfo(request)

when (response.status) {
CustomerStatus.NEEDS_INFO -> {
response.fields?.forEach { (fieldName, fieldInfo) ->
println("Field: $fieldName - ${fieldInfo.description}")
}
}
CustomerStatus.ACCEPTED -> println("Customer approved")
else -> println("Status: ${response.status}")
}