Stellar PHP SDK API Documentation

NaturalPersonKYCFields

KYC and AML fields for natural persons (individual customers).

This class provides standardized fields for collecting Know Your Customer (KYC) and Anti-Money Laundering (AML) information about individual persons in compliance with SEP-09 specification. It includes personal identification, contact information, address details, tax information, and supporting documentation.

PRIVACY AND SECURITY WARNING: This class handles highly sensitive Personally Identifiable Information (PII) and KYC data. Implementers MUST ensure:

  • Transmission only over HTTPS/TLS connections
  • Encryption at rest for all stored KYC data
  • Compliance with applicable data protection regulations (GDPR, CCPA, etc.)
  • Implementation of proper access controls and audit logging
  • Secure data retention and deletion policies
  • Customer consent management for data collection and processing
  • Binary fields (photos, documents) must be base64 encoded for transmission
Tags
see
https://github.com/stellar/stellar-protocol/blob/v1.17.0/ecosystem/sep-0009.md

SEP-09 v1.17.0 Specification

Table of Contents

Constants

ADDITIONAL_NAME_KEY  = 'additional_name'
ADDRESS_COUNTRY_CODE_KEY  = 'address_country_code'
ADDRESS_KEY  = 'address'
BIRTH_COUNTRY_CODE_KEY  = 'birth_country_code'
BIRTH_DATE_KEY  = 'birth_date'
BIRTH_PLACE_KEY  = 'birth_place'
CITY_KEY  = 'city'
EMAIL_ADDRESS_KEY  = 'email_address'
EMPLOYER_ADDRESS_KEY  = 'employer_address'
EMPLOYER_NAME_KEY  = 'employer_name'
FIRST_NAME_KEY  = 'first_name'
ID_COUNTRY_CODE_KEY  = 'id_country_code'
ID_EXPIRATION_DATE_KEY  = 'id_expiration_date'
ID_ISSUE_DATE_KEY  = 'id_issue_date'
ID_NUMBER_KEY  = 'id_number'
ID_TYPE_KEY  = 'id_type'
IP_ADDRESS_KEY  = 'ip_address'
LANGUAGE_CODE_KEY  = 'language_code'
LAST_NAME_KEY  = 'last_name'
MOBILE_NUMBER_FORMAT_KEY  = 'mobile_number_format'
MOBILE_NUMBER_KEY  = 'mobile_number'
NOTARY_APPROVAL_OF_PHOTO_ID_KEY  = 'notary_approval_of_photo_id'
OCCUPATION_KEY  = 'occupation'
PHOTO_ID_BACK_KEY  = 'photo_id_back'
PHOTO_ID_FRONT_KEY  = 'photo_id_front'
PHOTO_PROOF_RESIDENCE_KEY  = 'photo_proof_residence'
POSTAL_CODE_KEY  = 'postal_code'
PROOF_OF_INCOME_KEY  = 'proof_of_income'
PROOF_OF_LIVENESS_KEY  = 'proof_of_liveness'
REFERRAL_ID_KEY  = 'referral_id'
SEX_KEY  = 'sex'
STATE_OR_PROVINCE_KEY  = 'state_or_province'
TAX_ID_KEY  = 'tax_id'
TAX_ID_NAME_KEY  = 'tax_id_name'

Properties

$additionalName  : string|null
$address  : string|null
$addressCountryCode  : string|null
$birthCountryCode  : string|null
$birthDate  : string|null
$birthPlace  : string|null
$cardKYCFields  : CardKYCFields|null
$city  : string|null
$emailAddress  : string|null
$employerAddress  : string|null
$employerName  : string|null
$financialAccountKYCFields  : FinancialAccountKYCFields|null
$firstName  : string|null
$idCountryCode  : string|null
$idExpirationDate  : DateTime|null
$idIssueDate  : DateTime|null
$idNumber  : string|null
$idType  : string|null
$ipAddress  : string|null
$languageCode  : string|null
$lastName  : string|null
$mobileNumber  : string|null
$mobileNumberFormat  : string|null
$notaryApprovalOfPhotoId  : string|null
$occupation  : int|null
$photoIdBack  : string|null
$photoIdFront  : string|null
$photoProofResidence  : string|null
$postalCode  : string|null
$proofOfIncome  : string|null
$proofOfLiveness  : string|null
$referralId  : string|null
$sex  : string|null
$stateOrProvince  : string|null
$taxId  : string|null
$taxIdName  : string|null

Methods

fields()  : array<string|int, mixed>
Returns all non-null KYC fields as an associative array.
files()  : array<string|int, string>
Returns all non-null binary file fields as an associative array.

Constants

NOTARY_APPROVAL_OF_PHOTO_ID_KEY

public mixed NOTARY_APPROVAL_OF_PHOTO_ID_KEY = 'notary_approval_of_photo_id'

Properties

$address

public string|null $address = null

Entire address (country, state, postal code, street address, etc.) as a multi-line string

$addressCountryCode

public string|null $addressCountryCode = null

Country code for current address (ISO 3166-1 alpha-3)

$birthCountryCode

public string|null $birthCountryCode = null

Country code of birth (ISO 3166-1 alpha-3)

$birthDate

public string|null $birthDate = null

Date of birth in ISO 8601 format (e.g. 1976-07-04)

$birthPlace

public string|null $birthPlace = null

Place of birth (city, state, country; as on passport)

$idCountryCode

public string|null $idCountryCode = null

Country issuing passport or photo ID (ISO 3166-1 alpha-3)

$idExpirationDate

public DateTime|null $idExpirationDate = null

ID expiration date (ISO 8601 format)

$idType

public string|null $idType = null

Type of photo ID (e.g. passport, drivers_license, id_card)

$mobileNumber

public string|null $mobileNumber = null

Mobile phone number with country code in E.164 format

$mobileNumberFormat

public string|null $mobileNumberFormat = null

Expected format of the mobile_number field (e.g. E.164, hash). Defaults to E.164 if not specified.

$notaryApprovalOfPhotoId

public string|null $notaryApprovalOfPhotoId = null

Image of notary's approval of photo ID or passport (base64 encoded)

$photoIdBack

public string|null $photoIdBack = null

Image of back of user's photo ID or passport (base64 encoded)

$photoIdFront

public string|null $photoIdFront = null

Image of front of user's photo ID or passport (base64 encoded)

$photoProofResidence

public string|null $photoProofResidence = null

Image of a utility bill, bank statement or similar with the user's name and address (base64 encoded)

$postalCode

public string|null $postalCode = null

Postal or other code identifying user's locale

$proofOfIncome

public string|null $proofOfIncome = null

Image of user's proof of income document (base64 encoded)

$proofOfLiveness

public string|null $proofOfLiveness = null

Video or image file of user as a liveness proof (base64 encoded)

$referralId

public string|null $referralId = null

User's origin (such as an id in another application) or a referral code

$stateOrProvince

public string|null $stateOrProvince = null

Name of state/province/region/prefecture

$taxId

public string|null $taxId = null

Tax identifier of user in their country (e.g. social security number in US)

$taxIdName

public string|null $taxIdName = null

Name of the tax ID (e.g. SSN or ITIN in the US)

Methods

fields()

Returns all non-null KYC fields as an associative array.

public fields() : array<string|int, mixed>

This method collects all populated natural person KYC fields including nested financial account and card fields, returning them as key-value pairs suitable for submission to SEP-09 compliant services.

Return values
array<string|int, mixed>

Associative array of field keys to values

files()

Returns all non-null binary file fields as an associative array.

public files() : array<string|int, string>

This method collects all populated binary file fields (photos, documents) that are base64 encoded, returning them as key-value pairs for file upload to SEP-09 compliant services.

Return values
array<string|int, string>

Associative array of file field keys to base64 encoded values


        
On this page

Search results