Stellar PHP SDK API Documentation

SEP31ReceiveAssetInfo

Asset information for cross-border payments including limits, fees, and KYC requirements.

This class represents the configuration for a specific asset that the Receiving Anchor accepts for cross-border payments. It includes transaction amount limits, fee structures, required SEP-12 KYC types for senders and receivers, and optional SEP-38 quote integration for off-chain asset delivery.

Tags
see
https://github.com/stellar/stellar-protocol/blob/v3.1.0/ecosystem/sep-0031.md#get-info
see
SEP31InfoResponse
see
SEP12TypesInfo

Table of Contents

Properties

$feeFixed  : float|null
$feePercent  : float|null
$fields  : array<string|int, mixed>|null
$maxAmount  : float|null
$minAmount  : float|null
$quotesRequired  : bool|null
$quotesSupported  : bool|null
$receiverSep12Type  : string|null
$senderSep12Type  : string|null
$sep12Info  : SEP12TypesInfo

Methods

__construct()  : mixed
fromJson()  : SEP31ReceiveAssetInfo
Constructs a new instance of SEP31ReceiveAssetInfo by using the given data.

Properties

$feeFixed

public float|null $feeFixed = null

(optional) A fixed fee in units of the Stellar asset. Left blank if there is no fee or fee calculation cannot be modeled using a fixed and percentage fee.

$feePercent

public float|null $feePercent = null

(optional) A percentage fee in percentage points. Left blank if there is no fee or fee calculation cannot be modeled using a fixed and percentage fee.

$fields

since SEP-31 v2.5.0, use SEP-12 PUT /customer instead

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

(deprecated, optional) An object containing the per-transaction parameters required in POST /transactions requests.

DEPRECATED: This field is maintained for backward compatibility only and will be removed in a future version. Pass SEP-9 standard fields via SEP-12 PUT /customer instead.

Migration: Use SEP-12 to register customers with required KYC fields before initiating transactions.

Tags
see
https://github.com/stellar/stellar-protocol/blob/v3.1.0/ecosystem/sep-0012.md
see
https://github.com/stellar/stellar-protocol/blob/v3.1.0/ecosystem/sep-0009.md

$maxAmount

public float|null $maxAmount = null

(optional) Maximum amount. No limit if not specified.

$minAmount

public float|null $minAmount = null

(optional) Minimum amount. No limit if not specified.

$quotesRequired

public bool|null $quotesRequired = null

(optional) If true, the Receiving Anchor can only deliver an off-chain asset listed in the SEP-38 GET /prices response in exchange for receiving the Stellar asset.

$quotesSupported

public bool|null $quotesSupported = null

(optional) If true, the Receiving Anchor can deliver the off-chain assets listed in the SEP-38 GET /prices response in exchange for receiving the Stellar asset.

$receiverSep12Type

Use sep12.receiver.types array instead

public string|null $receiverSep12Type = null

(deprecated, optional) The value of the type parameter the Sending Anchor should use for a SEP-12 GET /customer request. This field can be omitted if no KYC is necessary.

DEPRECATED: Use values from sep12.receiver.types instead if any are present. This field is maintained for backward compatibility only.

Tags
see
SEP12TypesInfo

$senderSep12Type

Use sep12.sender.types array instead

public string|null $senderSep12Type = null

(deprecated, optional) The value of the type parameter the Sending Anchor should use for a SEP-12 GET /customer request. This field can be omitted if no KYC is necessary.

DEPRECATED: Use values from sep12.sender.types instead if any are present. This field is maintained for backward compatibility only.

Tags
see
SEP12TypesInfo

Methods

__construct()

public __construct(SEP12TypesInfo $sep12Info[, float|null $minAmount = null ][, float|null $maxAmount = null ][, float|null $feeFixed = null ][, float|null $feePercent = null ][, string|null $senderSep12Type = null ][, string|null $receiverSep12Type = null ][, array<string|int, mixed>|null $fields = null ][, bool|null $quotesSupported = null ][, bool|null $quotesRequired = null ]) : mixed
Parameters
$sep12Info : SEP12TypesInfo

an object containing the description of required KYC fields.

$minAmount : float|null = null

(optional) Minimum amount. No limit if not specified.

$maxAmount : float|null = null

(optional) Maximum amount. No limit if not specified.

$feeFixed : float|null = null

(optional) A fixed fee in units of the Stellar asset. Left blank if there is no fee or fee calculation cannot be modeled using a fixed and percentage fee.

$feePercent : float|null = null

(optional) A percentage fee in percentage points. Left blank if there is no fee or fee calculation cannot be modeled using a fixed and percentage fee.

$senderSep12Type : string|null = null

(deprecated, optional) The value of the type parameter the Sending Anchor should use for a SEP-12 GET /customer request. This field can be omitted if no KYC is necessary. Use a value from sep12.sender.types instead if any are present.

$receiverSep12Type : string|null = null

(deprecated, optional) The value of the type parameter the Sending Anchor should use for a SEP-12 GET /customer request. This field can be omitted if no KYC is necessary. Use a values from sep12.receiver.types instead if any are present.

$fields : array<string|int, mixed>|null = null

(deprecated, optional) An object containing the per-transaction parameters required in POST /transactions requests. Pass SEP-9 fields via SEP-12 PUT /customer instead.

$quotesSupported : bool|null = null

(optional) If true, the Receiving Anchor can deliver the off-chain assets listed in the SEP-38 GET /prices response in exchange for receiving the Stellar asset.

$quotesRequired : bool|null = null

(optional) If true, the Receiving Anchor can only deliver an off-chain asset listed in the SEP-38 GET /prices response in exchange for receiving the Stellar asset.

fromJson()

Constructs a new instance of SEP31ReceiveAssetInfo by using the given data.

public static fromJson(array<string|int, mixed> $json) : SEP31ReceiveAssetInfo
Parameters
$json : array<string|int, mixed>

the data to construct the object from.

Return values
SEP31ReceiveAssetInfo

the object containing the parsed data.


        
On this page

Search results