Stellar PHP SDK API Documentation

SEP31RefundPayment

Individual refund payment details within a cross-border payment refund.

This class represents a single refund payment transaction sent back to the Sending Anchor, including the Stellar transaction hash, refunded amount, and associated fee. Multiple refund payments may exist for a single transaction.

Refund Calculation:

  • Net amount returned to sender: amount - fee
  • Total refund amount: sum of all refund payments
  • Fee is deducted from the refunded amount
Tags
see
https://github.com/stellar/stellar-protocol/blob/v3.1.0/ecosystem/sep-0031.md#refund-payment-object-schema
see
SEP31Refunds

Table of Contents

Properties

$amount  : string
$fee  : string
$id  : string

Methods

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

Properties

Methods

__construct()

public __construct(string $id, string $amount, string $fee) : mixed
Parameters
$id : string

The Stellar transaction hash of the refund payment (not guaranteed to be unique).

$amount : string

The amount sent back to the Sending Anchor, in units of amount_in_asset.

$fee : string

The amount charged as a fee for processing the refund, in units of amount_in_asset.

fromJson()

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

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

the data to construct the object from.

Return values
SEP31RefundPayment

the object containing the parsed data.


        
On this page

Search results