Stellar PHP SDK API Documentation

ClaimableBalanceResponse extends Response

Represents a claimable balance on the Stellar network

This response contains comprehensive claimable balance details including the balance ID, asset type and amount, sponsor, claimants with predicates, and modification history. Claimable balances are ledger entries that hold funds which can be claimed by specified accounts when predicate conditions are met, enabling use cases like payment splitting, airdrops, and conditional payments.

Key fields:

  • Unique balance ID for claiming
  • Asset and amount available to claim
  • Sponsor account funding the reserve
  • List of claimants with claiming predicates
  • Ledger modification history

Returned by Horizon endpoints:

  • GET /claimable_balances - All claimable balances
  • GET /claimable_balances/{claimable_balance_id} - Specific balance details
  • GET /claimants/{account_id}/claimable_balances - Balances claimable by an account
Tags
see
ClaimantsResponse

For the list of claimants

see
ClaimantResponse

For individual claimant details

see
ClaimableBalanceLinksResponse

For related navigation links

see
https://developers.stellar.org

Stellar developer docs Horizon Claimable Balances API

since
1.0.0

Table of Contents

Properties

$httpClient  : Client|null
$rateLimitLimit  : int|null
$rateLimitRemaining  : int|null
$rateLimitReset  : int|null

Methods

fromJson()  : ClaimableBalanceResponse
getAmount()  : string
Gets the amount of the asset available to claim
getAsset()  : Asset
Gets the asset held in this claimable balance
getBalanceId()  : string
Gets the unique identifier for this claimable balance
getClaimants()  : ClaimantsResponse
Gets the list of claimants who can claim this balance
getHttpClient()  : Client|null
Gets the HTTP client used for pagination requests
getLastModifiedLedger()  : int
Gets the ledger sequence number when this balance was last modified
getLastModifiedTime()  : string|null
Gets the timestamp when this balance was last modified
getLinks()  : ClaimableBalanceLinksResponse
Gets the links to related resources for this claimable balance
getPagingToken()  : string
Gets the paging token for this claimable balance in list results
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.
getSponsor()  : string
Gets the account sponsoring the reserves for this claimable balance
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

$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

getAmount()

Gets the amount of the asset available to claim

public getAmount() : string
Return values
string

The claimable amount

getBalanceId()

Gets the unique identifier for this claimable balance

public getBalanceId() : string
Return values
string

The claimable balance ID used for claiming operations

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

getLastModifiedLedger()

Gets the ledger sequence number when this balance was last modified

public getLastModifiedLedger() : int
Return values
int

The last modified ledger sequence

getLastModifiedTime()

Gets the timestamp when this balance was last modified

public getLastModifiedTime() : string|null
Return values
string|null

The last modified time in ISO 8601 format, or null if not available

getPagingToken()

Gets the paging token for this claimable balance in list results

public getPagingToken() : string
Return values
string

The paging token used for cursor-based pagination

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

getSponsor()

Gets the account sponsoring the reserves for this claimable balance

public getSponsor() : string
Return values
string

The sponsor account ID

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