PutCustomerInfoRequest
public struct PutCustomerInfoRequest : Sendable
Request parameters for uploading customer information via SEP-0012.
This struct encapsulates all the parameters needed to upload KYC information to an anchor in an authenticated and idempotent fashion. The endpoint is used to register new customers or update existing customer information. It supports submitting SEP-9 fields for natural persons, organizations, financial accounts, and cards, as well as custom fields and files.
When uploading binary fields such as photo_id_front, the request uses multipart/form-data content type. Binary fields should be submitted after all other fields as some web servers require this for proper stream processing.
See also:
-
JWT previously received from the anchor via the SEP-10 authentication flow.
Declaration
Swift
public var jwt: String -
The id value returned from a previous call to this endpoint. If specified, no other parameter is required.
Declaration
Swift
public var id: String? -
The server should infer the account from the sub value in the SEP-10 JWT to identify the customer. The account parameter is only used for backwards compatibility, and if explicitly provided in the request body it should match the sub value of the decoded SEP-10 JWT.
Declaration
Swift
public var account: String? -
The client-generated memo that uniquely identifies the customer. If a memo is present in the decoded SEP-10 JWT’s sub value, it must match this parameter value. If a muxed account is used as the JWT’s sub value, memos sent in requests must match the 64-bit integer subaccount ID of the muxed account.
Declaration
Swift
public var memo: String? -
Type of memo. One of text, id or hash. Deprecated because memos should always be of type id, although anchors should continue to support this parameter for outdated clients. If hash, memo should be base64-encoded. If a memo is present in the decoded SEP-10 JWT’s sub value, this parameter can be ignored.
Declaration
Swift
public var memoType: String? -
The type of the customer as defined in the SEP-12 Type Specification. Different types of customers may require different KYC fields.
Declaration
Swift
public var type: String? -
The transaction id with which the customer’s info is associated. This is used when information from the customer depends on the transaction, such as when more information is required for larger amounts.
Declaration
Swift
public var transactionId: String? -
One or more of the natural person KYC fields as defined in SEP-9.
Declaration
Swift
public var fields: [KYCNaturalPersonFieldsEnum]? -
One or more of the organization KYC fields as defined in SEP-9.
Declaration
Swift
public var organizationFields: [KYCOrganizationFieldsEnum]? -
One or more of the financial account KYC fields as defined in SEP-9.
Declaration
Swift
public var financialAccountFields: [KYCFinancialAccountFieldsEnum]? -
One or more of the card KYC fields as defined in SEP-9.
Declaration
Swift
public var cardFields: [KYCCardFieldsEnum]? -
Additional custom fields to be submitted with the request.
Declaration
Swift
public var extraFields: [String : String]? -
Additional custom binary files to be submitted with the request.
Declaration
Swift
public var extraFiles: [String : Data]? -
Creates a new customer information upload request.
Declaration
Swift
public init(jwt: String)Parameters
jwtJWT previously received from the anchor via SEP-10 authentication
-
Converts the request parameters to a dictionary of data for multipart form submission.
This method processes all KYC fields and organizes them according to SEP-9 requirements. Binary fields (such as photo_id_front) are collected separately and placed at the end of the parameters dictionary to comply with web server requirements for stream processing.
Declaration
Swift
public func toParameters() -> [String : Data]Return Value
Dictionary mapping parameter names to their Data representations
View on GitHub
Install in Dash