Stellar PHP SDK API Documentation

SEP08PostTransactionActionRequired extends SEP08PostTransactionResponse

Response indicating user action is required before transaction approval.

This response means the user must complete an action before the transaction can be approved. The approval service provides a URL that facilitates the action. Upon completion, the wallet resubmits the original transaction to the approval server.

Action Method Workflow:

  • GET (or not specified): Open action_url in browser, optionally passing action_fields as query parameters
  • POST: Send action_fields as JSON in request body. Server responds with:
    • no_further_action_required: Can resubmit transaction immediately
    • follow_next_url: User must visit next_url in browser for additional action

The action_fields array references SEP-9 Standard KYC/AML field names that the client may already possess, allowing the server to skip collecting this information from the user. Examples include: email_address, mobile_number, first_name, last_name, etc.

HTTP Status Code: 200

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

SEP-0008 v1.7.4

see
https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md

SEP-0009 KYC/AML Fields

Table of Contents

Properties

$actionFields  : array<string|int, mixed>|null
$actionMethod  : string
$actionUrl  : string
$message  : 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 $message, string $actionUrl[, string $actionMethod = 'GET' ][, array<string|int, string>|null $actionFields = null ]) : mixed
Parameters
$message : string

A human-readable string containing information regarding the action required.

$actionUrl : string

A URL that allows the user to complete the actions required to have the transaction approved.

$actionMethod : string = 'GET'

GET or POST, indicating the type of request that should be made to the action_url.

$actionFields : array<string|int, string>|null = null

An array of additional fields defined by SEP-9 Standard KYC/AML fields that the client may optionally provide to the approval service when sending the request to the action_url so as to circumvent the need for the user to enter the information manually.

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