GetCustomerInfoRequest

data class GetCustomerInfoRequest(val jwt: String, val id: String? = null, val account: String? = null, val memo: String? = null, val memoType: String? = null, val type: String? = null, val transactionId: String? = null, val lang: String? = null)

Request for retrieving customer KYC information and status from a SEP-12 anchor.

Used to check what information an anchor requires for a customer, or to verify the current status of a customer's KYC process. This endpoint serves two purposes:

  1. Discover required fields for new customers

  2. Check KYC status for existing customers

Customer identification methods:

  • Use id if you have a customer ID from a previous registration

  • Use JWT sub value for account identification (recommended)

  • Use account and memo/memoType for backwards compatibility

  • Use transactionId when KYC requirements depend on transaction details

Example - Check required fields for new customer:

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

val response = kycService.getCustomerInfo(request)
if (response.status == CustomerStatus.NEEDS_INFO) {
println("Required fields: ${response.fields?.keys}")
}

Example - Check existing customer status:

val request = GetCustomerInfoRequest(
jwt = authToken,
id = customerId
)

val response = kycService.getCustomerInfo(request)
println("Status: ${response.status}")

Example - With transaction context:

val request = GetCustomerInfoRequest(
jwt = authToken,
id = customerId,
transactionId = "abc123",
type = "sep6-deposit"
)

val response = kycService.getCustomerInfo(request)
// May require additional fields based on transaction amount

Example - Shared account with memo:

val request = GetCustomerInfoRequest(
jwt = authToken,
account = sharedAccountId,
memo = "user_12345",
memoType = "id"
)

See also:

Constructors

Link copied to clipboard
constructor(jwt: String, id: String? = null, account: String? = null, memo: String? = null, memoType: String? = null, type: String? = null, transactionId: String? = null, lang: String? = null)

Properties

Link copied to clipboard

Stellar account ID - deprecated, use JWT sub value instead (optional)

Link copied to clipboard
val id: String?

Customer ID from previous PUT request (optional)

Link copied to clipboard
val jwt: String

JWT token from SEP-10 or SEP-45 authentication

Link copied to clipboard
val lang: String?

Language code (ISO 639-1) for descriptions (optional)

Link copied to clipboard
val memo: String?

Memo for shared accounts (optional)

Link copied to clipboard

Type of memo - deprecated, should always be 'id' (optional)

Link copied to clipboard

Associated transaction ID (optional)

Link copied to clipboard
val type: String?

KYC type (e.g., 'sep6-deposit', 'sep31-sender') (optional)