PaymentMethod
extends DomainValue
in package
A tokenized payment instrument tied to a customer, with typed instrument and verification 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
- $active : bool
- Whether this payment method is active and reusable in new payment flows.
- $archivedAt : DateTimeImmutable|null
- Timestamp when the payment method was archived. Omitted while unarchived.
- $bankAccount : BankAccount|null
- Bank account details (present when type is bank_account).
- $card : Card|null
- Card marker. Nested card credentials are not returned.
- $createdAt : DateTimeImmutable
- When this payment method was tokenized.
- $customData : CustomData|null
- Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map.
- $customerId : string
- Customer who owns this payment method.
- $ephemeral : bool|null
- Whether the method is limited to its originating flow and cannot be reused.
- $expiresOn : DateTimeImmutable|null
- When this payment method expires. Omitted when no expiry is available.
- $fingerprint : string
- App-customer-local fingerprint. An empty string means it is unavailable.
- $id : string
- Unique identifier for this payment method.
- $mobileMoney : MobileMoney|null
- Masked mobile-money wallet details (present when type is mobile_money).
- $owner : Owner|null
- Owner identity captured during tokenization when provided.
- $supplied : Supplied|null
- Public provenance for how the payment method was supplied.
- $type : string
- Payment rail type.
- $verification : Verification|null
- Most recent verification record when the payment method has entered a verification flow.
- $verifiedAt : DateTimeImmutable|null
- When ownership verification was completed.
Methods
- __construct() : mixed
- Hydrates a PaymentMethod from decoded Inttegro API data.
- fromArray() : static
- Creates a PaymentMethod from its decoded API wire representation.
- isArchived() : bool
- Reports whether the resource has been archived.
- isReusable() : bool
- Reports whether the payment method is active, non-ephemeral, and not archived.
- isVerified() : bool
- Reports whether verification has completed.
- 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.
- toArray() : array<string, mixed>
- Converts typed properties back to the API's wire representation.
Properties
$active read-only
Whether this payment method is active and reusable in new payment flows.
public
bool
$active
Required response field. PHP type: bool; wire field: active (boolean).
$archivedAt read-only
Timestamp when the payment method was archived. Omitted while unarchived.
public
DateTimeImmutable|null
$archivedAt
Optional response field. PHP type: DateTimeImmutable|null; wire field: archived_at
(ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$bankAccount read-only
Bank account details (present when type is bank_account).
public
BankAccount|null
$bankAccount
Optional response field. PHP type: \Inttegro\PaymentMethod\BankAccount|null; wire field:
bank_account (object).
$card read-only
Card marker. Nested card credentials are not returned.
public
Card|null
$card
Optional response field. PHP type: \Inttegro\PaymentMethod\Card|null; wire field: card
(object).
$createdAt read-only
When this payment method was tokenized.
public
DateTimeImmutable
$createdAt
Required response field. PHP type: DateTimeImmutable; wire field: created_at (ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$customData read-only
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map.
public
CustomData|null
$customData
Optional response field. PHP type: \Inttegro\CustomData|null; wire field: custom_data
(object).
$customerId read-only
Customer who owns this payment method.
public
string
$customerId
Required response field. PHP type: string; wire field: customer_id (string).
$ephemeral read-only
Whether the method is limited to its originating flow and cannot be reused.
public
bool|null
$ephemeral
Optional response field. PHP type: bool|null; wire field: ephemeral (boolean).
$expiresOn read-only
When this payment method expires. Omitted when no expiry is available.
public
DateTimeImmutable|null
$expiresOn
Optional response field. PHP type: DateTimeImmutable|null; wire field: expires_on
(ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
$fingerprint read-only
App-customer-local fingerprint. An empty string means it is unavailable.
public
string
$fingerprint
Required response field. PHP type: string; wire field: fingerprint (string).
$id read-only
Unique identifier for this payment method.
public
string
$id
Required response field. PHP type: string; wire field: id (string).
$mobileMoney read-only
Masked mobile-money wallet details (present when type is mobile_money).
public
MobileMoney|null
$mobileMoney
Optional response field. PHP type: \Inttegro\PaymentMethod\MobileMoney|null; wire field:
mobile_money (object).
$owner read-only
Owner identity captured during tokenization when provided.
public
Owner|null
$owner
Optional response field. PHP type: \Inttegro\PaymentMethod\Owner|null; wire field: owner
(object).
$supplied read-only
Public provenance for how the payment method was supplied.
public
Supplied|null
$supplied
Optional response field. PHP type: \Inttegro\PaymentMethod\Supplied|null; wire field:
supplied (object).
$type read-only
Payment rail type.
public
string
$type
Required response field. PHP type: string; wire field: type (string).
Compare against Type cases by using their ->value strings.
$verification read-only
Most recent verification record when the payment method has entered a verification flow.
public
Verification|null
$verification
Optional response field. PHP type: \Inttegro\PaymentMethod\Verification|null; wire field:
verification (object).
$verifiedAt read-only
When ownership verification was completed.
public
DateTimeImmutable|null
$verifiedAt
Optional response field. PHP type: DateTimeImmutable|null; wire field: verified_at
(ISO-8601 string with UTC offset).
The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.
Methods
__construct()
Hydrates a PaymentMethod 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 PaymentMethod 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 PaymentMethod value.
isArchived()
Reports whether the resource has been archived.
public
isArchived() : bool
Return values
boolisReusable()
Reports whether the payment method is active, non-ephemeral, and not archived.
public
isReusable() : bool
Return values
boolisVerified()
Reports whether verification has completed.
public
isVerified() : 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
toArray()
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.