Stellar PHP SDK API Documentation

SEP08PostTransactionRejected extends SEP08PostTransactionResponse

Response indicating the transaction is not compliant and cannot be revised.

This response means the transaction violates the issuer's compliance criteria in a way that cannot be corrected by adding additional operations or modifications. The wallet should display the error message to the user explaining why the transaction was rejected.

Common rejection reasons:

  • Destination account is blocked or sanctioned
  • Transaction amount exceeds velocity limits that cannot be split
  • Source or destination is in a restricted jurisdiction
  • Asset holder has incomplete or expired KYC information
  • Transaction violates regulatory constraints

The wallet should not retry rejected transactions without addressing the underlying compliance issue described in the error message.

HTTP Status Code: 400

Tags
see
https://github.com/stellar/stellar-protocol/blob/v1.7.4/ecosystem/sep-0008.md#rejected

SEP-0008 v1.7.4

Table of Contents

Properties

$error  : string

Methods

__construct()  : mixed
Constructor.
fromJson()  : SEP08PostTransactionResponse
Factory method to construct a transaction response object from JSON data.

Properties

Methods

__construct()

Constructor.

public __construct(string $error) : mixed
Parameters
$error : string

A human-readable string explaining why the transaction is not compliant and could not be made compliant.

fromJson()

Factory method to construct a transaction response object from JSON data.

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

Parses the JSON response from an approval server and instantiates the appropriate concrete response class based on the 'status' field value.

Status Mapping:

  • "success" -> SEP08PostTransactionSuccess
  • "revised" -> SEP08PostTransactionRevised
  • "pending" -> SEP08PostTransactionPending
  • "action_required" -> SEP08PostTransactionActionRequired
  • "rejected" -> SEP08PostTransactionRejected
Parameters
$json : array<string|int, mixed>

Decoded JSON response from approval server

Tags
throws
SEP08InvalidPostTransactionResponse

If status field is missing, unknown, or required fields for the given status are missing

Return values
SEP08PostTransactionResponse —

Concrete subclass instance based on status field

On this page

Search results