Stellar PHP SDK API Documentation

GetCustomerInfoResponse extends Response

Response object for GET /customer endpoint operations.

This response contains the current verification status of a customer and indicates which fields are required or have been provided. The status field determines the customer's position in the KYC verification process.

Status values:

  • ACCEPTED: All required information has been received and verified. Customer is approved.
  • PROCESSING: KYC information is being reviewed. Customer should check back later.
  • NEEDS_INFO: Additional information is required. Check the 'fields' array for required data.
  • REJECTED: Customer information was rejected and they are not permitted to use the service.
Tags
see
https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-get

SEP-12 v1.15.0

Table of Contents

Properties

$fields  : array<string|int, GetCustomerInfoField>|null
$id  : string|null
$message  : string|null
$providedFields  : array<string|int, GetCustomerInfoProvidedField>|null
$status  : string
$httpClient  : Client|null
$rateLimitLimit  : int|null
$rateLimitRemaining  : int|null
$rateLimitReset  : int|null

Methods

fromJson()  : GetCustomerInfoResponse
getFields()  : array<string|int, GetCustomerInfoField>|null
getHttpClient()  : Client|null
Gets the HTTP client used for pagination requests
getId()  : string|null
getMessage()  : string|null
getProvidedFields()  : array<string|int, GetCustomerInfoProvidedField>|null
getRateLimitLimit()  : int|null
Returns X-RateLimit-Limit header from the response.
getRateLimitRemaining()  : int|null
Returns X-RateLimit-Remaining header from the response.
getRateLimitReset()  : int|null
Returns X-RateLimit-Reset header from the response. Seconds until a new window starts.
getStatus()  : string
setHeaders()  : void
Extracts and sets rate limiting information from HTTP response headers
setHttpClient()  : void
Sets the HTTP client for making follow-up requests
loadFromJson()  : void
Loads response data from a JSON array

Properties

$fields

public array<string|int, GetCustomerInfoField>|null $fields = null

An array containing the fields the anchor has not yet received for the given customer of the type provided in the request. Required for customers in the NEEDS_INFO status. See Fields for more detailed information.

$id

public string|null $id = null

ID of the customer, if the customer has already been created via a PUT /customer request.

$message

public string|null $message = null

Human-readable message describing the current state of customer's KYC process.

$providedFields

public array<string|int, GetCustomerInfoProvidedField>|null $providedFields = null

An array containing the fields the anchor has received for the given customer. Required for customers whose information needs verification via customerVerification.

$httpClient

protected Client|null $httpClient = null

$rateLimitLimit

protected int|null $rateLimitLimit = null

$rateLimitRemaining

protected int|null $rateLimitRemaining = null

$rateLimitReset

protected int|null $rateLimitReset = null

Methods

getHttpClient()

Gets the HTTP client used for pagination requests

public getHttpClient() : Client|null
Return values
Client|null

The HTTP client instance, or null if not set

getRateLimitLimit()

Returns X-RateLimit-Limit header from the response.

public getRateLimitLimit() : int|null

This number represents the he maximum number of requests that the current client can make in one hour.

Tags
see
https://developers.stellar.org

Stellar developer docs Rate limiting documentation

Return values
int|null

getRateLimitRemaining()

Returns X-RateLimit-Remaining header from the response.

public getRateLimitRemaining() : int|null

The number of remaining requests for the current window.

Tags
see
https://developers.stellar.org

Stellar developer docs Rate limiting documentation

Return values
int|null

getRateLimitReset()

Returns X-RateLimit-Reset header from the response. Seconds until a new window starts.

public getRateLimitReset() : int|null
Tags
see
https://developers.stellar.org

Stellar developer docs Rate limiting documentation

Return values
int|null

setHeaders()

Extracts and sets rate limiting information from HTTP response headers

public setHeaders(array<string|int, mixed> $headers) : void

This method processes the X-Ratelimit-* headers from the HTTP response and stores them for client access.

Parameters
$headers : array<string|int, mixed>

Associative array of HTTP headers from the response

setHttpClient()

Sets the HTTP client for making follow-up requests

public setHttpClient([Client|null $httpClient = null ]) : void

Paginated responses contain links to next/previous pages. This HTTP client is used when following those links to fetch additional pages.

Parameters
$httpClient : Client|null = null

The Guzzle HTTP client to use for pagination

loadFromJson()

Loads response data from a JSON array

protected loadFromJson(array<string|int, mixed> $json) : void

This method is used internally to populate response objects from parsed JSON. Subclasses override this to extract their specific data fields.

Parameters
$json : array<string|int, mixed>

Associative array of parsed JSON data


        
On this page

Search results