Payment
extends DomainValue
in package
A payment intent tied to an order, including its amount, execution state, required action, and settlement details.
This immutable value hydrates decoded API snake_case data into typed camelCase properties.
Use fromArray() for wire data; toArray(), array access, and JSON serialization expose the API
wire representation. Nullable properties correspond to optional API fields.
Tags
Table of Contents
Properties
- $amount : Amount
- Monetary amount in integer minor units and its currency.
- $balanceTransaction : BalanceTransaction|null
- Merchant balance entry caused by a payment or refund. `type` describes the semantic source, not direction. A payment transaction contains `payment_id`; a refund transaction contains `refund_id`. Exactly one matching reference is present.
- $billingDetails : BillingDetails|null
- Billing Details value for this payment.
- $canceledAt : DateTimeImmutable|null
- When payment was canceled.
- $customer : Customer|null
- Customer value for this payment.
- $dueAt : DateTimeImmutable|null
- When payment becomes overdue.
- $executedAt : DateTimeImmutable|null
- When payment execution started.
- $expiredAt : DateTimeImmutable|null
- When payment expired.
- $failedAt : DateTimeImmutable|null
- When payment failed.
- $id : string
- Payment intent ID.
- $initiatedAt : DateTimeImmutable
- When we kicked off the payment intent.
- $latestAttempt : Attempt|null
- Most recent payment attempt details.
- $latestError : Error|null
- Latest Error value for this payment.
- $nextAction : NextAction|null
- Next action required to complete a payment.
- $paidAt : DateTimeImmutable|null
- When payment completed successfully.
- $paidOffline : bool|null
- Whether payment was recorded as received outside Inttegro.
- $paymentMethod : PaymentMethod|null
- Payment Method value for this payment.
- $paymentMethodTypes : array<int, string>|null
- Payment Method Types value for this payment.
- $payoutConfiguration : PayoutConfiguration|null
- Payout configuration for this payment.
- $statementDescriptor : string
- Optional statement descriptor shown on the customer's bank statement.
- $status : string
- Payment state.
Methods
- __construct() : mixed
- Hydrates a Payment from decoded Inttegro API data.
- fromArray() : static
- Creates a Payment from its decoded API wire representation.
- isPaid() : bool
- Reports whether the resource's payment has completed successfully.
- isTerminal() : bool
- Reports whether the resource has reached a terminal lifecycle state.
- jsonSerialize() : array<string, mixed>
- Returns the same API wire object as `toArray()` for `json_encode()`.
- offsetExists() : bool
- Reports whether a non-null property exists for a PHP or API field name.
- offsetGet() : mixed
- Reads a typed property through PHP `ArrayAccess`.
- offsetSet() : void
- Rejects mutation because domain values are immutable.
- offsetUnset() : void
- Rejects unsetting because domain values are immutable.
- requiredAction() : NextAction|null
- Returns the next required payment action, or null when no action is required.
- requiresAction() : bool
- Reports whether the payment requires additional customer or merchant action.
- toArray() : array<string, mixed>
- Converts typed properties back to the API's wire representation.
Properties
$amount read-only
Monetary amount in integer minor units and its currency.
public
Amount
$amount
Required response field. PHP type: Amount; wire field: amount (object).
$balanceTransaction read-only
Merchant balance entry caused by a payment or refund. `type` describes the semantic source, not direction. A payment transaction contains `payment_id`; a refund transaction contains `refund_id`. Exactly one matching reference is present.
public
BalanceTransaction|null
$balanceTransaction
Optional response field. PHP type: \Inttegro\BalanceTransaction\BalanceTransaction|null;
wire field: balance_transaction (object).
$billingDetails read-only
Billing Details value for this payment.
public
BillingDetails|null
$billingDetails
Optional response field. PHP type: \Inttegro\Payment\BillingDetails|null; wire field:
billing_details (object).
$canceledAt read-only
When payment was canceled.
public
DateTimeImmutable|null
$canceledAt
Optional response field. PHP type: DateTimeImmutable|null; wire field: canceled_at
(ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$customer read-only
Customer value for this payment.
public
Customer|null
$customer
Optional response field. PHP type: \Inttegro\Order\Customer|null; wire field: customer
(object).
$dueAt read-only
When payment becomes overdue.
public
DateTimeImmutable|null
$dueAt
Optional response field. PHP type: DateTimeImmutable|null; wire field: due_at (ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$executedAt read-only
When payment execution started.
public
DateTimeImmutable|null
$executedAt
Optional response field. PHP type: DateTimeImmutable|null; wire field: executed_at
(ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$expiredAt read-only
When payment expired.
public
DateTimeImmutable|null
$expiredAt
Optional response field. PHP type: DateTimeImmutable|null; wire field: expired_at
(ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$failedAt read-only
When payment failed.
public
DateTimeImmutable|null
$failedAt
Optional response field. PHP type: DateTimeImmutable|null; wire field: failed_at
(ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$id read-only
Payment intent ID.
public
string
$id
Required response field. PHP type: string; wire field: id (string).
$initiatedAt read-only
When we kicked off the payment intent.
public
DateTimeImmutable
$initiatedAt
Required response field. PHP type: DateTimeImmutable; wire field: initiated_at (ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$latestAttempt read-only
Most recent payment attempt details.
public
Attempt|null
$latestAttempt
Optional response field. PHP type: \Inttegro\Payment\Attempt|null; wire field:
latest_attempt (object).
$latestError read-only
Latest Error value for this payment.
public
Error|null
$latestError
Optional response field. PHP type: \Inttegro\Payment\Error|null; wire field: latest_error
(object).
$nextAction read-only
Next action required to complete a payment.
public
NextAction|null
$nextAction
Optional response field. PHP type: \Inttegro\Payment\NextAction|null; wire field:
next_action (object).
$paidAt read-only
When payment completed successfully.
public
DateTimeImmutable|null
$paidAt
Optional response field. PHP type: DateTimeImmutable|null; wire field: paid_at (ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$paidOffline read-only
Whether payment was recorded as received outside Inttegro.
public
bool|null
$paidOffline
Optional response field. PHP type: bool|null; wire field: paid_offline (boolean).
$paymentMethod read-only
Payment Method value for this payment.
public
PaymentMethod|null
$paymentMethod
Optional response field. PHP type: \Inttegro\Payment\PaymentMethod|null; wire field:
payment_method (object).
$paymentMethodTypes read-only
Payment Method Types value for this payment.
public
array<int, string>|null
$paymentMethodTypes
Optional response field. PHP type: list<string>|null; wire field: payment_method_types
(array<string>).
$payoutConfiguration read-only
Payout configuration for this payment.
public
PayoutConfiguration|null
$payoutConfiguration
Optional response field. PHP type: \Inttegro\Payment\PayoutConfiguration|null; wire field:
payout_configuration (object).
$statementDescriptor read-only
Optional statement descriptor shown on the customer's bank statement.
public
string
$statementDescriptor
Required response field. PHP type: string; wire field: statement_descriptor (string).
$status read-only
Payment state.
public
string
$status
Required response field. PHP type: string; wire field: status (string).
Compare against Status cases by using their ->value strings.
Methods
__construct()
Hydrates a Payment from decoded Inttegro API data.
public
__construct(array<string, mixed> $data) : mixed
Parameters
- $data : array<string, mixed>
-
Wire object keyed by
snake_caseAPI field names.
fromArray()
Creates a Payment from its decoded API wire representation.
public
static fromArray(array<string, mixed> $data) : static
Parameters
- $data : array<string, mixed>
-
Wire object keyed by
snake_caseAPI field names.
Return values
static —A typed, immutable Payment value.
isPaid()
Reports whether the resource's payment has completed successfully.
public
isPaid() : bool
Return values
boolisTerminal()
Reports whether the resource has reached a terminal lifecycle state.
public
isTerminal() : bool
Return values
booljsonSerialize()
Returns the same API wire object as `toArray()` for `json_encode()`.
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>offsetExists()
Reports whether a non-null property exists for a PHP or API field name.
public
offsetExists(mixed $offset) : bool
Both paymentId and payment_id address the same typed property.
Parameters
- $offset : mixed
-
PHP
camelCaseor wiresnake_casefield name.
Return values
booloffsetGet()
Reads a typed property through PHP `ArrayAccess`.
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
-
PHP
camelCaseor wiresnake_casefield name.
Return values
mixed —The PHP-native property value.
offsetSet()
Rejects mutation because domain values are immutable.
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
-
Ignored field name.
- $value : mixed
-
Ignored replacement value.
Tags
offsetUnset()
Rejects unsetting because domain values are immutable.
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
-
Ignored field name.
Tags
requiredAction()
Returns the next required payment action, or null when no action is required.
public
requiredAction() : NextAction|null
Return values
NextAction|nullrequiresAction()
Reports whether the payment requires additional customer or merchant action.
public
requiresAction() : bool
Return values
booltoArray()
Converts typed properties back to the API's wire representation.
public
toArray() : array<string, mixed>
Property names become snake_case. Nested values, arrays, backed enums, and timestamps are
normalized recursively so the result is safe to pass to json_encode().
Return values
array<string, mixed> —The recursively normalized API object.