inttegro.payment

Models, requests, and enums for the Inttegro payment resource.

The primary returned object is inttegro.payment.Payment. Related request types, nested response shapes, and string-backed enums are exported from this singular namespace. Public members load lazily, so importing one resource does not eagerly import the entire SDK.

  1"""Models, requests, and enums for the Inttegro payment resource.
  2
  3The primary returned object is ``inttegro.payment.Payment``. Related request types, nested response shapes, and string-backed enums are exported from this singular namespace. Public members load lazily, so importing one resource does not eagerly import the entire SDK."""
  4
  5from importlib import import_module
  6from typing import TYPE_CHECKING, Any
  7
  8if TYPE_CHECKING:
  9    from .attempt import Attempt as Attempt
 10    from .attempt_error import AttemptError as AttemptError
 11    from .attempt_status import AttemptStatus as AttemptStatus
 12    from .billing_details import BillingDetails as BillingDetails
 13    from .confirm_request import ConfirmRequest as ConfirmRequest
 14    from .confirmation_channel import ConfirmationChannel as ConfirmationChannel
 15    from .error import Error as Error
 16    from .next_action import NextAction as NextAction
 17    from .next_action_authorize import NextActionAuthorize as NextActionAuthorize
 18    from .next_action_confirm_payment import NextActionConfirmPayment as NextActionConfirmPayment
 19    from .next_action_confirm_payment_attempt import NextActionConfirmPaymentAttempt as NextActionConfirmPaymentAttempt
 20    from .next_action_confirm_payment_request import NextActionConfirmPaymentRequest as NextActionConfirmPaymentRequest
 21    from .next_action_redirect import NextActionRedirect as NextActionRedirect
 22    from .next_action_redirect_latest_visit import NextActionRedirectLatestVisit as NextActionRedirectLatestVisit
 23    from .next_action_request_confirmation import NextActionRequestConfirmation as NextActionRequestConfirmation
 24    from .next_action_type import NextActionType as NextActionType
 25    from .payment import Payment as Payment
 26    from .payment_method import PaymentMethod as PaymentMethod
 27    from .payment_method_bank_account import PaymentMethodBankAccount as PaymentMethodBankAccount
 28    from .payment_method_ghana_bank_account import PaymentMethodGhanaBankAccount as PaymentMethodGhanaBankAccount
 29    from .payment_method_mobile_money import PaymentMethodMobileMoney as PaymentMethodMobileMoney
 30    from .payment_method_owner import PaymentMethodOwner as PaymentMethodOwner
 31    from .payout_configuration import PayoutConfiguration as PayoutConfiguration
 32    from .payout_configuration_destination import PayoutConfigurationDestination as PayoutConfigurationDestination
 33    from .result_status import ResultStatus as ResultStatus
 34    from .status import Status as Status
 35
 36
 37_EXPORTS: dict[str, tuple[str, str]] = {
 38    "Attempt": ("inttegro.payment.attempt", "Attempt"),
 39    "AttemptError": ("inttegro.payment.attempt_error", "AttemptError"),
 40    "AttemptStatus": ("inttegro.payment.attempt_status", "AttemptStatus"),
 41    "BillingDetails": ("inttegro.payment.billing_details", "BillingDetails"),
 42    "ConfirmRequest": ("inttegro.payment.confirm_request", "ConfirmRequest"),
 43    "ConfirmationChannel": ("inttegro.payment.confirmation_channel", "ConfirmationChannel"),
 44    "Error": ("inttegro.payment.error", "Error"),
 45    "NextAction": ("inttegro.payment.next_action", "NextAction"),
 46    "NextActionAuthorize": ("inttegro.payment.next_action_authorize", "NextActionAuthorize"),
 47    "NextActionConfirmPayment": ("inttegro.payment.next_action_confirm_payment", "NextActionConfirmPayment"),
 48    "NextActionConfirmPaymentAttempt": ("inttegro.payment.next_action_confirm_payment_attempt", "NextActionConfirmPaymentAttempt"),
 49    "NextActionConfirmPaymentRequest": ("inttegro.payment.next_action_confirm_payment_request", "NextActionConfirmPaymentRequest"),
 50    "NextActionRedirect": ("inttegro.payment.next_action_redirect", "NextActionRedirect"),
 51    "NextActionRedirectLatestVisit": ("inttegro.payment.next_action_redirect_latest_visit", "NextActionRedirectLatestVisit"),
 52    "NextActionRequestConfirmation": ("inttegro.payment.next_action_request_confirmation", "NextActionRequestConfirmation"),
 53    "NextActionType": ("inttegro.payment.next_action_type", "NextActionType"),
 54    "Payment": ("inttegro.payment.payment", "Payment"),
 55    "PaymentMethod": ("inttegro.payment.payment_method", "PaymentMethod"),
 56    "PaymentMethodBankAccount": ("inttegro.payment.payment_method_bank_account", "PaymentMethodBankAccount"),
 57    "PaymentMethodGhanaBankAccount": ("inttegro.payment.payment_method_ghana_bank_account", "PaymentMethodGhanaBankAccount"),
 58    "PaymentMethodMobileMoney": ("inttegro.payment.payment_method_mobile_money", "PaymentMethodMobileMoney"),
 59    "PaymentMethodOwner": ("inttegro.payment.payment_method_owner", "PaymentMethodOwner"),
 60    "PayoutConfiguration": ("inttegro.payment.payout_configuration", "PayoutConfiguration"),
 61    "PayoutConfigurationDestination": ("inttegro.payment.payout_configuration_destination", "PayoutConfigurationDestination"),
 62    "ResultStatus": ("inttegro.payment.result_status", "ResultStatus"),
 63    "Status": ("inttegro.payment.status", "Status"),
 64}
 65
 66__all__ = [
 67    "Attempt",
 68    "AttemptError",
 69    "AttemptStatus",
 70    "BillingDetails",
 71    "ConfirmRequest",
 72    "ConfirmationChannel",
 73    "Error",
 74    "NextAction",
 75    "NextActionAuthorize",
 76    "NextActionConfirmPayment",
 77    "NextActionConfirmPaymentAttempt",
 78    "NextActionConfirmPaymentRequest",
 79    "NextActionRedirect",
 80    "NextActionRedirectLatestVisit",
 81    "NextActionRequestConfirmation",
 82    "NextActionType",
 83    "Payment",
 84    "PaymentMethod",
 85    "PaymentMethodBankAccount",
 86    "PaymentMethodGhanaBankAccount",
 87    "PaymentMethodMobileMoney",
 88    "PaymentMethodOwner",
 89    "PayoutConfiguration",
 90    "PayoutConfigurationDestination",
 91    "ResultStatus",
 92    "Status",
 93]
 94
 95
 96def __getattr__(name: str) -> Any:
 97    """Load a public resource type on first access."""
 98    try:
 99        module_name, attribute_name = _EXPORTS[name]
100    except KeyError:
101        raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
102    value = getattr(import_module(module_name), attribute_name)
103    globals()[name] = value
104    return value
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class Attempt(inttegro._model_base.ApiModel):
14@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
15class Attempt(ApiModel):
16    """Most recent payment attempt details.
17
18    Instances are immutable API responses. ``from_dict()`` decodes nested
19    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
20    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
21    Fields not returned by the API remain absent and can still be queried
22    through mapping-style access.
23
24    API contract schema: ``PaymentAttempt``.
25    """
26    payment_method_type: str | None = field(init=False)
27    """The payment method type associated with this attempt. Optional; nullable. Python type: ``str | None``; wire name: ``payment_method_type``; JSON type: string"""
28    payment_method_id: str | None = field(init=False)
29    """Identifier of the related payment method. Optional; nullable. Python type: ``str | None``; wire name: ``payment_method_id``; JSON type: string"""
30    error: PaymentAttemptError | None = field(init=False)
31    """The error associated with this attempt. Optional; nullable. Python type: ``PaymentAttemptError | None``; wire name: ``error``; JSON type: object"""
32    reference: str | None = field(init=False)
33    """External payment reference. Optional; nullable. Python type: ``str | None``; wire name: ``reference``; JSON type: string"""
34    status: Literal['initiated', 'executed', 'succeeded', 'canceled', 'expired', 'failed', 'unknown'] = field(init=False)
35    """Current lifecycle status of the attempt. Required. Python type: ``Literal['initiated', 'executed', 'succeeded', 'canceled', 'expired', 'failed', 'unknown']``; wire name: ``status``; JSON type: string. Constraints: allowed values ``initiated``, ``executed``, ``succeeded``, ``canceled``, ``expired``, ``failed``, ``unknown``"""
36    initiated_at: datetime = field(init=False)
37    """Timestamp for initiated at. Required. Python type: ``datetime``; wire name: ``initiated_at``; JSON type: string (date-time)"""
38    succeeded_at: datetime | None = field(init=False)
39    """Timestamp for succeeded at. Optional; nullable. Python type: ``datetime | None``; wire name: ``succeeded_at``; JSON type: string (date-time)"""

Most recent payment attempt details.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentAttempt.

payment_method_type: str | None

The payment method type associated with this attempt. Optional; nullable. Python type: str | None; wire name: payment_method_type; JSON type: string

payment_method_id: str | None

Identifier of the related payment method. Optional; nullable. Python type: str | None; wire name: payment_method_id; JSON type: string

error: AttemptError | None

The error associated with this attempt. Optional; nullable. Python type: PaymentAttemptError | None; wire name: error; JSON type: object

reference: str | None

External payment reference. Optional; nullable. Python type: str | None; wire name: reference; JSON type: string

status: Literal['initiated', 'executed', 'succeeded', 'canceled', 'expired', 'failed', 'unknown']

Current lifecycle status of the attempt. Required. Python type: Literal['initiated', 'executed', 'succeeded', 'canceled', 'expired', 'failed', 'unknown']; wire name: status; JSON type: string. Constraints: allowed values initiated, executed, succeeded, canceled, expired, failed, unknown

initiated_at: datetime.datetime

Timestamp for initiated at. Required. Python type: datetime; wire name: initiated_at; JSON type: string (date-time)

succeeded_at: datetime.datetime | None

Timestamp for succeeded at. Optional; nullable. Python type: datetime | None; wire name: succeeded_at; JSON type: string (date-time)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class AttemptError(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class AttemptError(ApiModel):
14    """Typed attempt error data in the payment resource namespace.
15
16    Instances are immutable API responses. ``from_dict()`` decodes nested
17    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
18    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
19    Fields not returned by the API remain absent and can still be queried
20    through mapping-style access.
21
22    API contract schema: ``PaymentAttemptError``.
23    """
24    message: str = field(init=False)
25    """The message associated with this attempt error. Required. Python type: ``str``; wire name: ``message``; JSON type: string"""

Typed attempt error data in the payment resource namespace.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentAttemptError.

message: str

The message associated with this attempt error. Required. Python type: str; wire name: message; JSON type: string

class AttemptStatus(inttegro._enum_base.WireEnum):
11class AttemptStatus(WireEnum):
12    """Typed attempt status data in the payment resource namespace.
13
14    Members are strings as well as enum values, so they compare naturally
15    with API payloads and serialize to the lowercase wire value shown below.
16
17    API contract schema: ``PaymentAttemptStatus``.
18    """
19    INITIATED = "initiated"
20    """Wire value ``initiated`` (initiated)"""
21    EXECUTED = "executed"
22    """Wire value ``executed`` (executed)"""
23    SUCCEEDED = "succeeded"
24    """Wire value ``succeeded`` (succeeded)"""
25    CANCELED = "canceled"
26    """Wire value ``canceled`` (canceled)"""
27    EXPIRED = "expired"
28    """Wire value ``expired`` (expired)"""
29    FAILED = "failed"
30    """Wire value ``failed`` (failed)"""
31    UNKNOWN = "unknown"
32    """Wire value ``unknown`` (unknown)"""

Typed attempt status data in the payment resource namespace.

Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.

API contract schema: PaymentAttemptStatus.

INITIATED = <AttemptStatus.INITIATED: 'initiated'>

Wire value initiated (initiated)

EXECUTED = <AttemptStatus.EXECUTED: 'executed'>

Wire value executed (executed)

SUCCEEDED = <AttemptStatus.SUCCEEDED: 'succeeded'>

Wire value succeeded (succeeded)

CANCELED = <AttemptStatus.CANCELED: 'canceled'>

Wire value canceled (canceled)

EXPIRED = <AttemptStatus.EXPIRED: 'expired'>

Wire value expired (expired)

FAILED = <AttemptStatus.FAILED: 'failed'>

Wire value failed (failed)

UNKNOWN = <AttemptStatus.UNKNOWN: 'unknown'>

Wire value unknown (unknown)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class BillingDetails(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class BillingDetails(ApiModel):
14    """Typed billing details data in the payment resource namespace.
15
16    Instances are immutable API responses. ``from_dict()`` decodes nested
17    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
18    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
19    Fields not returned by the API remain absent and can still be queried
20    through mapping-style access.
21
22    API contract schema: ``PaymentBillingDetails``.
23    """
24    owner: PaymentMethodSnapshotOwner | None = field(init=False)
25    """The owner associated with this billing detail. Optional; nullable. Python type: ``PaymentMethodSnapshotOwner | None``; wire name: ``owner``; JSON type: object"""

Typed billing details data in the payment resource namespace.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentBillingDetails.

owner: PaymentMethodOwner | None

The owner associated with this billing detail. Optional; nullable. Python type: PaymentMethodSnapshotOwner | None; wire name: owner; JSON type: object

@dataclass(frozen=True, slots=True, kw_only=True)
class ConfirmRequest(inttegro._request_base.ApiRequest):
12@dataclass(frozen=True, slots=True, kw_only=True)
13class ConfirmRequest(ApiRequest):
14    """Parameters accepted by the confirm request operation.
15
16    This is an immutable, keyword-only request object. ``to_dict()`` uses
17    the documented wire names, omits fields left as ``UNSET``, serializes
18    string-backed enums by value, and requires timezone-aware datetimes.
19
20    API contract schema: ``ConfirmPaymentRequest``.
21    """
22    order_id: str
23    """Identifier of the related order. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string. Constraints: minimum length 1"""
24    payment_id: str
25    """Optional payment identifier when already known by the client. Required. Python type: ``str``; wire name: ``payment_id``; JSON type: string"""
26    confirmation_id: str
27    """Optional confirmation attempt identifier. Required. Python type: ``str``; wire name: ``confirmation_id``; JSON type: string"""
28    token: str
29    """Payer confirmation token. Required. Python type: ``str``; wire name: ``token``; JSON type: string. Constraints: minimum length 1"""

Parameters accepted by the confirm request operation.

This is an immutable, keyword-only request object. to_dict() uses the documented wire names, omits fields left as UNSET, serializes string-backed enums by value, and requires timezone-aware datetimes.

API contract schema: ConfirmPaymentRequest.

ConfirmRequest(*, order_id: str, payment_id: str, confirmation_id: str, token: str)
order_id: str

Identifier of the related order. Required. Python type: str; wire name: order_id; JSON type: string. Constraints: minimum length 1

payment_id: str

Optional payment identifier when already known by the client. Required. Python type: str; wire name: payment_id; JSON type: string

confirmation_id: str

Optional confirmation attempt identifier. Required. Python type: str; wire name: confirmation_id; JSON type: string

token: str

Payer confirmation token. Required. Python type: str; wire name: token; JSON type: string. Constraints: minimum length 1

class ConfirmationChannel(inttegro._enum_base.WireEnum):
11class ConfirmationChannel(WireEnum):
12    """Channel used to send the token.
13
14    Members are strings as well as enum values, so they compare naturally
15    with API payloads and serialize to the lowercase wire value shown below.
16
17    API contract schema: ``PaymentConfirmationChannel``.
18    """
19    SMS = "sms"
20    """Wire value ``sms`` (sms) for channel used to send the token"""
21    EMAIL = "email"
22    """Wire value ``email`` (email) for channel used to send the token"""
23    PUSH = "push"
24    """Wire value ``push`` (push) for channel used to send the token"""

Channel used to send the token.

Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.

API contract schema: PaymentConfirmationChannel.

SMS = <ConfirmationChannel.SMS: 'sms'>

Wire value sms (sms) for channel used to send the token

EMAIL = <ConfirmationChannel.EMAIL: 'email'>

Wire value email (email) for channel used to send the token

PUSH = <ConfirmationChannel.PUSH: 'push'>

Wire value push (push) for channel used to send the token

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class Error(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class Error(ApiModel):
14    """Typed error data in the payment resource namespace.
15
16    Instances are immutable API responses. ``from_dict()`` decodes nested
17    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
18    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
19    Fields not returned by the API remain absent and can still be queried
20    through mapping-style access.
21
22    API contract schema: ``PaymentError``.
23    """
24    message: str = field(init=False)
25    """The message associated with this error. Required. Python type: ``str``; wire name: ``message``; JSON type: string"""
26    docs_url: str = field(init=False)
27    """URL used for docs. Required. Python type: ``str``; wire name: ``docs_url``; JSON type: string (uri)"""
28    source: str = field(init=False)
29    """The source associated with this error. Required. Python type: ``str``; wire name: ``source``; JSON type: string"""
30    type: str = field(init=False)
31    """Discriminator identifying the error type. Required. Python type: ``str``; wire name: ``type``; JSON type: string"""
32    code: str = field(init=False)
33    """The code associated with this error. Required. Python type: ``str``; wire name: ``code``; JSON type: string"""

Typed error data in the payment resource namespace.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentError.

message: str

The message associated with this error. Required. Python type: str; wire name: message; JSON type: string

docs_url: str

URL used for docs. Required. Python type: str; wire name: docs_url; JSON type: string (uri)

source: str

The source associated with this error. Required. Python type: str; wire name: source; JSON type: string

type: str

Discriminator identifying the error type. Required. Python type: str; wire name: type; JSON type: string

code: str

The code associated with this error. Required. Python type: str; wire name: code; JSON type: string

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class NextAction(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class NextAction(ApiModel):
15    """Next action required to complete a payment.
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentNextAction``.
24    """
25    type: Literal['confirm_payment', 'execute', 'redirect', 'authorize_payment', 'request_confirmation'] = field(init=False)
26    """Type of action required. Required. Python type: ``Literal['confirm_payment', 'execute', 'redirect', 'authorize_payment', 'request_confirmation']``; wire name: ``type``; JSON type: string. Constraints: allowed values ``confirm_payment``, ``execute``, ``redirect``, ``authorize_payment``, ``request_confirmation``"""
27    confirm_payment: PaymentNextActionConfirmPayment | None = field(init=False)
28    """Details for customer payment confirmation. Optional; nullable. Python type: ``PaymentNextActionConfirmPayment | None``; wire name: ``confirm_payment``; JSON type: object"""
29    redirect: PaymentNextActionRedirect | None = field(init=False)
30    """Details for redirect action. Optional; nullable. Python type: ``PaymentNextActionRedirect | None``; wire name: ``redirect``; JSON type: object"""
31    authorize: PaymentNextActionAuthorize | None = field(init=False)
32    """Details for authorization action. Optional; nullable. Python type: ``PaymentNextActionAuthorize | None``; wire name: ``authorize``; JSON type: object"""
33    request_confirmation: PaymentNextActionRequestConfirmation | None = field(init=False)
34    """Details for requesting a fresh customer confirmation. Optional; nullable. Python type: ``PaymentNextActionRequestConfirmation | None``; wire name: ``request_confirmation``; JSON type: object"""

Next action required to complete a payment.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentNextAction.

type: Literal['confirm_payment', 'execute', 'redirect', 'authorize_payment', 'request_confirmation']

Type of action required. Required. Python type: Literal['confirm_payment', 'execute', 'redirect', 'authorize_payment', 'request_confirmation']; wire name: type; JSON type: string. Constraints: allowed values confirm_payment, execute, redirect, authorize_payment, request_confirmation

confirm_payment: NextActionConfirmPayment | None

Details for customer payment confirmation. Optional; nullable. Python type: PaymentNextActionConfirmPayment | None; wire name: confirm_payment; JSON type: object

redirect: NextActionRedirect | None

Details for redirect action. Optional; nullable. Python type: PaymentNextActionRedirect | None; wire name: redirect; JSON type: object

authorize: NextActionAuthorize | None

Details for authorization action. Optional; nullable. Python type: PaymentNextActionAuthorize | None; wire name: authorize; JSON type: object

request_confirmation: NextActionRequestConfirmation | None

Details for requesting a fresh customer confirmation. Optional; nullable. Python type: PaymentNextActionRequestConfirmation | None; wire name: request_confirmation; JSON type: object

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class NextActionAuthorize(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class NextActionAuthorize(ApiModel):
15    """Details for authorization action.
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentNextActionAuthorize``.
24    """
25    beneficiary: str = field(init=False)
26    """Beneficiary requiring authorization. Required. Python type: ``str``; wire name: ``beneficiary``; JSON type: string"""
27    scheme: str = field(init=False)
28    """Authorization scheme. Required. Python type: ``str``; wire name: ``scheme``; JSON type: string"""
29    expires_at: datetime = field(init=False)
30    """When the authorization request expires. Required. Python type: ``datetime``; wire name: ``expires_at``; JSON type: string (date-time)"""

Details for authorization action.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentNextActionAuthorize.

beneficiary: str

Beneficiary requiring authorization. Required. Python type: str; wire name: beneficiary; JSON type: string

scheme: str

Authorization scheme. Required. Python type: str; wire name: scheme; JSON type: string

expires_at: datetime.datetime

When the authorization request expires. Required. Python type: datetime; wire name: expires_at; JSON type: string (date-time)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class NextActionConfirmPayment(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class NextActionConfirmPayment(ApiModel):
15    """Details for customer payment confirmation.
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentNextActionConfirmPayment``.
24    """
25    expires_at: datetime = field(init=False)
26    """When the confirmation request expires. Required. Python type: ``datetime``; wire name: ``expires_at``; JSON type: string (date-time)"""
27    scheme: str = field(init=False)
28    """Authentication scheme used. Required. Python type: ``str``; wire name: ``scheme``; JSON type: string"""
29    request: PaymentNextActionConfirmPaymentRequest | None = field(init=False)
30    """Confirmation request details. Optional; nullable. Python type: ``PaymentNextActionConfirmPaymentRequest | None``; wire name: ``request``; JSON type: object"""
31    attempt: PaymentNextActionConfirmPaymentAttempt | None = field(init=False)
32    """Latest confirmation attempt. Optional; nullable. Python type: ``PaymentNextActionConfirmPaymentAttempt | None``; wire name: ``attempt``; JSON type: object"""
33    confirmed: bool = field(init=False)
34    """Whether the payment confirmation has completed. Required. Python type: ``bool``; wire name: ``confirmed``; JSON type: boolean"""
35    status: str = field(init=False)
36    """Confirmation status. Required. Python type: ``str``; wire name: ``status``; JSON type: string"""

Details for customer payment confirmation.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentNextActionConfirmPayment.

expires_at: datetime.datetime

When the confirmation request expires. Required. Python type: datetime; wire name: expires_at; JSON type: string (date-time)

scheme: str

Authentication scheme used. Required. Python type: str; wire name: scheme; JSON type: string

Confirmation request details. Optional; nullable. Python type: PaymentNextActionConfirmPaymentRequest | None; wire name: request; JSON type: object

Latest confirmation attempt. Optional; nullable. Python type: PaymentNextActionConfirmPaymentAttempt | None; wire name: attempt; JSON type: object

confirmed: bool

Whether the payment confirmation has completed. Required. Python type: bool; wire name: confirmed; JSON type: boolean

status: str

Confirmation status. Required. Python type: str; wire name: status; JSON type: string

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class NextActionConfirmPaymentAttempt(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class NextActionConfirmPaymentAttempt(ApiModel):
15    """Latest confirmation attempt.
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentNextActionConfirmPaymentAttempt``.
24    """
25    status: str = field(init=False)
26    """Attempt status. Required. Python type: ``str``; wire name: ``status``; JSON type: string"""
27    confirmed: bool = field(init=False)
28    """Whether the confirmation has succeeded. Required. Python type: ``bool``; wire name: ``confirmed``; JSON type: boolean"""
29    reason: str = field(init=False)
30    """Reason for the current attempt state. Required. Python type: ``str``; wire name: ``reason``; JSON type: string"""
31    executed_at: datetime | None = field(init=False)
32    """When the attempt was executed. Optional; nullable. Python type: ``datetime | None``; wire name: ``executed_at``; JSON type: string (date-time)"""
33    created_at: datetime = field(init=False)
34    """When the attempt was created. Required. Python type: ``datetime``; wire name: ``created_at``; JSON type: string (date-time)"""

Latest confirmation attempt.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentNextActionConfirmPaymentAttempt.

status: str

Attempt status. Required. Python type: str; wire name: status; JSON type: string

confirmed: bool

Whether the confirmation has succeeded. Required. Python type: bool; wire name: confirmed; JSON type: boolean

reason: str

Reason for the current attempt state. Required. Python type: str; wire name: reason; JSON type: string

executed_at: datetime.datetime | None

When the attempt was executed. Optional; nullable. Python type: datetime | None; wire name: executed_at; JSON type: string (date-time)

created_at: datetime.datetime

When the attempt was created. Required. Python type: datetime; wire name: created_at; JSON type: string (date-time)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class NextActionConfirmPaymentRequest(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class NextActionConfirmPaymentRequest(ApiModel):
15    """Confirmation request details.
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentNextActionConfirmPaymentRequest``.
24    """
25    id: str = field(init=False)
26    """Unique identifier for the confirmation request. Required. Python type: ``str``; wire name: ``id``; JSON type: string"""
27    recipient: str = field(init=False)
28    """Recipient of the confirmation token. Required. Python type: ``str``; wire name: ``recipient``; JSON type: string"""
29    sent_via: Literal['sms', 'email', 'push'] = field(init=False)
30    """Channel used to send the token. Required. Python type: ``Literal['sms', 'email', 'push']``; wire name: ``sent_via``; JSON type: string. Constraints: allowed values ``sms``, ``email``, ``push``"""
31    token_size: int = field(init=False)
32    """Number of digits in the token. Required. Python type: ``int``; wire name: ``token_size``; JSON type: integer"""
33    sender_id: str = field(init=False)
34    """Sender ID for the message. Required. Python type: ``str``; wire name: ``sender_id``; JSON type: string"""
35    status: str | None = field(init=False)
36    """Current request status. Optional; nullable. Python type: ``str | None``; wire name: ``status``; JSON type: string"""

Confirmation request details.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentNextActionConfirmPaymentRequest.

id: str

Unique identifier for the confirmation request. Required. Python type: str; wire name: id; JSON type: string

recipient: str

Recipient of the confirmation token. Required. Python type: str; wire name: recipient; JSON type: string

sent_via: Literal['sms', 'email', 'push']

Channel used to send the token. Required. Python type: Literal['sms', 'email', 'push']; wire name: sent_via; JSON type: string. Constraints: allowed values sms, email, push

token_size: int

Number of digits in the token. Required. Python type: int; wire name: token_size; JSON type: integer

sender_id: str

Sender ID for the message. Required. Python type: str; wire name: sender_id; JSON type: string

status: str | None

Current request status. Optional; nullable. Python type: str | None; wire name: status; JSON type: string

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class NextActionRedirect(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class NextActionRedirect(ApiModel):
15    """Details for redirect action.
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentNextActionRedirect``.
24    """
25    redirect_url: str = field(init=False)
26    """URL to redirect the customer to. Required. Python type: ``str``; wire name: ``redirect_url``; JSON type: string (uri)"""
27    valid_until: datetime = field(init=False)
28    """When the redirect URL expires. Required. Python type: ``datetime``; wire name: ``valid_until``; JSON type: string (date-time)"""
29    latest_visit: PaymentNextActionRedirectLatestVisit | None = field(init=False)
30    """Latest redirect visit details. Optional; nullable. Python type: ``PaymentNextActionRedirectLatestVisit | None``; wire name: ``latest_visit``; JSON type: object"""

Details for redirect action.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentNextActionRedirect.

redirect_url: str

URL to redirect the customer to. Required. Python type: str; wire name: redirect_url; JSON type: string (uri)

valid_until: datetime.datetime

When the redirect URL expires. Required. Python type: datetime; wire name: valid_until; JSON type: string (date-time)

latest_visit: NextActionRedirectLatestVisit | None

Latest redirect visit details. Optional; nullable. Python type: PaymentNextActionRedirectLatestVisit | None; wire name: latest_visit; JSON type: object

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class NextActionRedirectLatestVisit(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class NextActionRedirectLatestVisit(ApiModel):
15    """Latest redirect visit details.
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentNextActionRedirectLatestVisit``.
24    """
25    user_agent: str = field(init=False)
26    """The user agent associated with this next action redirect latest visit. Required. Python type: ``str``; wire name: ``user_agent``; JSON type: string"""
27    ip_address: str = field(init=False)
28    """The ip address associated with this next action redirect latest visit. Required. Python type: ``str``; wire name: ``ip_address``; JSON type: string"""
29    at: datetime = field(init=False)
30    """Timestamp for at. Required. Python type: ``datetime``; wire name: ``at``; JSON type: string (date-time)"""

Latest redirect visit details.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentNextActionRedirectLatestVisit.

user_agent: str

The user agent associated with this next action redirect latest visit. Required. Python type: str; wire name: user_agent; JSON type: string

ip_address: str

The ip address associated with this next action redirect latest visit. Required. Python type: str; wire name: ip_address; JSON type: string

at: datetime.datetime

Timestamp for at. Required. Python type: datetime; wire name: at; JSON type: string (date-time)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class NextActionRequestConfirmation(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class NextActionRequestConfirmation(ApiModel):
15    """Details for requesting a fresh customer confirmation.
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentNextActionRequestConfirmation``.
24    """
25    last_request: PaymentNextActionConfirmPaymentRequest | None = field(init=False)
26    """The last request associated with this next action request confirmation. Optional; nullable. Python type: ``PaymentNextActionConfirmPaymentRequest | None``; wire name: ``last_request``; JSON type: object"""
27    after: datetime | None = field(init=False)
28    """Timestamp for after. Optional; nullable. Python type: ``datetime | None``; wire name: ``after``; JSON type: string (date-time)"""

Details for requesting a fresh customer confirmation.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentNextActionRequestConfirmation.

last_request: NextActionConfirmPaymentRequest | None

The last request associated with this next action request confirmation. Optional; nullable. Python type: PaymentNextActionConfirmPaymentRequest | None; wire name: last_request; JSON type: object

after: datetime.datetime | None

Timestamp for after. Optional; nullable. Python type: datetime | None; wire name: after; JSON type: string (date-time)

class NextActionType(inttegro._enum_base.WireEnum):
11class NextActionType(WireEnum):
12    """Typed next action type data in the payment resource namespace.
13
14    Members are strings as well as enum values, so they compare naturally
15    with API payloads and serialize to the lowercase wire value shown below.
16
17    API contract schema: ``PaymentNextActionType``.
18    """
19    CONFIRM_PAYMENT = "confirm_payment"
20    """Wire value ``confirm_payment`` (confirm payment)"""
21    EXECUTE = "execute"
22    """Wire value ``execute`` (execute)"""
23    REDIRECT = "redirect"
24    """Wire value ``redirect`` (redirect)"""
25    AUTHORIZE = "authorize"
26    """Wire value ``authorize`` (authorize)"""
27    NONE = "none"
28    """Wire value ``none`` (none)"""

Typed next action type data in the payment resource namespace.

Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.

API contract schema: PaymentNextActionType.

CONFIRM_PAYMENT = <NextActionType.CONFIRM_PAYMENT: 'confirm_payment'>

Wire value confirm_payment (confirm payment)

EXECUTE = <NextActionType.EXECUTE: 'execute'>

Wire value execute (execute)

REDIRECT = <NextActionType.REDIRECT: 'redirect'>

Wire value redirect (redirect)

AUTHORIZE = <NextActionType.AUTHORIZE: 'authorize'>

Wire value authorize (authorize)

NONE = <NextActionType.NONE: 'none'>

Wire value none (none)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class Payment(inttegro._model_base.ApiModel):
15@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
16class Payment(ApiModel):
17    """Payment intent tied to this order.
18
19    Instances are immutable API responses. ``from_dict()`` decodes nested
20    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
21    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
22    Fields not returned by the API remain absent and can still be queried
23    through mapping-style access.
24    """
25    id: str = field(init=False)
26    """Payment intent ID. Required. Python type: ``str``; wire name: ``id``; JSON type: string"""
27    status: Literal['initiated', 'requires_action', 'overdue', 'executed', 'paid', 'canceled', 'expired', 'failed', 'unknown'] = field(init=False)
28    """Payment state. Required. Python type: ``Literal['initiated', 'requires_action', 'overdue', 'executed', 'paid', 'canceled', 'expired', 'failed', 'unknown']``; wire name: ``status``; JSON type: string. Constraints: allowed values ``initiated``, ``requires_action``, ``overdue``, ``executed``, ``paid``, ``canceled``, ``expired``, ``failed``, ``unknown``"""
29    statement_descriptor: str = field(init=False)
30    """Optional statement descriptor shown on the customer's bank statement. Required. Python type: ``str``; wire name: ``statement_descriptor``; JSON type: string"""
31    amount: Amount = field(init=False)
32    """Monetary amount, represented by a currency and an integer minor-unit value. Required. Python type: ``Amount``; wire name: ``amount``; JSON type: object (Amount)"""
33    balance_transaction: BalanceTransaction | None = field(init=False)
34    """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. Optional; nullable. Python type: ``BalanceTransaction | None``; wire name: ``balance_transaction``; JSON type: object (BalanceTransaction)"""
35    payment_method: PaymentMethodSnapshot | None = field(init=False)
36    """The payment method associated with this payment. Optional; nullable. Python type: ``PaymentMethodSnapshot | None``; wire name: ``payment_method``; JSON type: object (OrderPaymentMethod)"""
37    billing_details: PaymentBillingDetails | None = field(init=False)
38    """The billing details associated with this payment. Optional; nullable. Python type: ``PaymentBillingDetails | None``; wire name: ``billing_details``; JSON type: object"""
39    customer: OrderCustomer | None = field(init=False)
40    """The customer associated with this payment. Optional; nullable. Python type: ``OrderCustomer | None``; wire name: ``customer``; JSON type: object"""
41    receipt: OrderReceipt | None = field(init=False)
42    """Receipt issued for a paid order payment. Optional; nullable. Python type: ``OrderReceipt | None``; wire name: ``receipt``; JSON type: object"""
43    latest_attempt: PaymentAttempt | None = field(init=False)
44    """Most recent payment attempt details. Optional; nullable. Python type: ``PaymentAttempt | None``; wire name: ``latest_attempt``; JSON type: object"""
45    next_action: PaymentNextAction | None = field(init=False)
46    """Next action required to complete a payment. Optional; nullable. Python type: ``PaymentNextAction | None``; wire name: ``next_action``; JSON type: object (PaymentNextAction)"""
47    latest_error: PaymentError | None = field(init=False)
48    """The latest error associated with this payment. Optional; nullable. Python type: ``PaymentError | None``; wire name: ``latest_error``; JSON type: object"""
49    initiated_at: datetime = field(init=False)
50    """When we kicked off the payment intent. Required. Python type: ``datetime``; wire name: ``initiated_at``; JSON type: string (date-time)"""
51    executed_at: datetime | None = field(init=False)
52    """When payment execution started. Optional; nullable. Python type: ``datetime | None``; wire name: ``executed_at``; JSON type: string (date-time)"""
53    paid_at: datetime | None = field(init=False)
54    """When payment completed successfully. Optional; nullable. Python type: ``datetime | None``; wire name: ``paid_at``; JSON type: string (date-time)"""
55    canceled_at: datetime | None = field(init=False)
56    """When payment was canceled. Optional; nullable. Python type: ``datetime | None``; wire name: ``canceled_at``; JSON type: string (date-time)"""
57    due_at: datetime | None = field(init=False)
58    """When payment becomes overdue. Optional; nullable. Python type: ``datetime | None``; wire name: ``due_at``; JSON type: string (date-time)"""
59    expired_at: datetime | None = field(init=False)
60    """When payment expired. Optional; nullable. Python type: ``datetime | None``; wire name: ``expired_at``; JSON type: string (date-time)"""
61    failed_at: datetime | None = field(init=False)
62    """When payment failed. Optional; nullable. Python type: ``datetime | None``; wire name: ``failed_at``; JSON type: string (date-time)"""
63    paid_offline: bool | None = field(init=False)
64    """Whether payment was recorded as received outside Inttegro. Optional; nullable. Python type: ``bool | None``; wire name: ``paid_offline``; JSON type: boolean"""
65    payment_method_types: list[str] | None = field(init=False)
66    """The payment method types associated with this payment. Optional; nullable. Python type: ``list[str] | None``; wire name: ``payment_method_types``; JSON type: array of string values"""
67    payout_configuration: PaymentPayoutConfiguration | None = field(init=False)
68    """Payout configuration for this payment. Optional; nullable. Python type: ``PaymentPayoutConfiguration | None``; wire name: ``payout_configuration``; JSON type: object"""
69
70    def is_paid(self) -> bool:
71        """Whether the payment completed successfully."""
72        return self.status == "paid"
73
74    def requires_action(self) -> bool:
75        """Whether the payment is waiting for customer or merchant action."""
76        return self.status == "requires_action"
77
78    def is_terminal(self) -> bool:
79        """Whether the payment has reached a final state."""
80        return self.status in {"paid", "canceled", "expired", "failed"}
81
82    def required_action(self) -> PaymentNextAction | None:
83        """Return action details when the payment currently requires action."""
84        return getattr(self, "next_action", None) if self.requires_action() else None

Payment intent tied to this order.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

id: str

Payment intent ID. Required. Python type: str; wire name: id; JSON type: string

status: Literal['initiated', 'requires_action', 'overdue', 'executed', 'paid', 'canceled', 'expired', 'failed', 'unknown']

Payment state. Required. Python type: Literal['initiated', 'requires_action', 'overdue', 'executed', 'paid', 'canceled', 'expired', 'failed', 'unknown']; wire name: status; JSON type: string. Constraints: allowed values initiated, requires_action, overdue, executed, paid, canceled, expired, failed, unknown

statement_descriptor: str

Optional statement descriptor shown on the customer's bank statement. Required. Python type: str; wire name: statement_descriptor; JSON type: string

Monetary amount, represented by a currency and an integer minor-unit value. Required. Python type: Amount; wire name: amount; JSON type: object (Amount)

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. Optional; nullable. Python type: BalanceTransaction | None; wire name: balance_transaction; JSON type: object (BalanceTransaction)

payment_method: PaymentMethod | None

The payment method associated with this payment. Optional; nullable. Python type: PaymentMethodSnapshot | None; wire name: payment_method; JSON type: object (OrderPaymentMethod)

billing_details: BillingDetails | None

The billing details associated with this payment. Optional; nullable. Python type: PaymentBillingDetails | None; wire name: billing_details; JSON type: object

customer: inttegro.order.Customer | None

The customer associated with this payment. Optional; nullable. Python type: OrderCustomer | None; wire name: customer; JSON type: object

receipt: inttegro.order.Receipt | None

Receipt issued for a paid order payment. Optional; nullable. Python type: OrderReceipt | None; wire name: receipt; JSON type: object

latest_attempt: Attempt | None

Most recent payment attempt details. Optional; nullable. Python type: PaymentAttempt | None; wire name: latest_attempt; JSON type: object

next_action: NextAction | None

Next action required to complete a payment. Optional; nullable. Python type: PaymentNextAction | None; wire name: next_action; JSON type: object (PaymentNextAction)

latest_error: Error | None

The latest error associated with this payment. Optional; nullable. Python type: PaymentError | None; wire name: latest_error; JSON type: object

initiated_at: datetime.datetime

When we kicked off the payment intent. Required. Python type: datetime; wire name: initiated_at; JSON type: string (date-time)

executed_at: datetime.datetime | None

When payment execution started. Optional; nullable. Python type: datetime | None; wire name: executed_at; JSON type: string (date-time)

paid_at: datetime.datetime | None

When payment completed successfully. Optional; nullable. Python type: datetime | None; wire name: paid_at; JSON type: string (date-time)

canceled_at: datetime.datetime | None

When payment was canceled. Optional; nullable. Python type: datetime | None; wire name: canceled_at; JSON type: string (date-time)

due_at: datetime.datetime | None

When payment becomes overdue. Optional; nullable. Python type: datetime | None; wire name: due_at; JSON type: string (date-time)

expired_at: datetime.datetime | None

When payment expired. Optional; nullable. Python type: datetime | None; wire name: expired_at; JSON type: string (date-time)

failed_at: datetime.datetime | None

When payment failed. Optional; nullable. Python type: datetime | None; wire name: failed_at; JSON type: string (date-time)

paid_offline: bool | None

Whether payment was recorded as received outside Inttegro. Optional; nullable. Python type: bool | None; wire name: paid_offline; JSON type: boolean

payment_method_types: list[str] | None

The payment method types associated with this payment. Optional; nullable. Python type: list[str] | None; wire name: payment_method_types; JSON type: array of string values

payout_configuration: PayoutConfiguration | None

Payout configuration for this payment. Optional; nullable. Python type: PaymentPayoutConfiguration | None; wire name: payout_configuration; JSON type: object

def is_paid(self) -> bool:
70    def is_paid(self) -> bool:
71        """Whether the payment completed successfully."""
72        return self.status == "paid"

Whether the payment completed successfully.

def requires_action(self) -> bool:
74    def requires_action(self) -> bool:
75        """Whether the payment is waiting for customer or merchant action."""
76        return self.status == "requires_action"

Whether the payment is waiting for customer or merchant action.

def is_terminal(self) -> bool:
78    def is_terminal(self) -> bool:
79        """Whether the payment has reached a final state."""
80        return self.status in {"paid", "canceled", "expired", "failed"}

Whether the payment has reached a final state.

def required_action(self) -> NextAction | None:
82    def required_action(self) -> PaymentNextAction | None:
83        """Return action details when the payment currently requires action."""
84        return getattr(self, "next_action", None) if self.requires_action() else None

Return action details when the payment currently requires action.

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class PaymentMethod(inttegro._model_base.ApiModel):
14@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
15class PaymentMethod(ApiModel):
16    """Typed payment method data in the payment resource namespace.
17
18    Instances are immutable API responses. ``from_dict()`` decodes nested
19    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
20    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
21    Fields not returned by the API remain absent and can still be queried
22    through mapping-style access.
23
24    API contract schema: ``PaymentMethodSnapshot``.
25    """
26    id: str = field(init=False)
27    """Unique identifier for this payment method. Required. Python type: ``str``; wire name: ``id``; JSON type: string"""
28    bank_account: PaymentMethodSnapshotBankAccount | None = field(init=False)
29    """The bank account associated with this payment method. Optional; nullable. Python type: ``PaymentMethodSnapshotBankAccount | None``; wire name: ``bank_account``; JSON type: object"""
30    card: PaymentMethodCard | None = field(init=False)
31    """Card marker. Nested card credentials are not returned. Optional; nullable. Python type: ``PaymentMethodCard | None``; wire name: ``card``; JSON type: object (PaymentMethodCard)"""
32    created_at: datetime = field(init=False)
33    """When the payment method was created. Required. Python type: ``datetime``; wire name: ``created_at``; JSON type: string (date-time)"""
34    customer_id: str = field(init=False)
35    """Identifier of the related customer. Required. Python type: ``str``; wire name: ``customer_id``; JSON type: string"""
36    mobile_money: PaymentMethodSnapshotMobileMoney | None = field(init=False)
37    """The mobile money associated with this payment method. Optional; nullable. Python type: ``PaymentMethodSnapshotMobileMoney | None``; wire name: ``mobile_money``; JSON type: object"""
38    owner: PaymentMethodSnapshotOwner | None = field(init=False)
39    """The owner associated with this payment method. Optional; nullable. Python type: ``PaymentMethodSnapshotOwner | None``; wire name: ``owner``; JSON type: object"""
40    type: Literal['mobile_money', 'bank_account', 'card', 'motito'] = field(init=False)
41    """Discriminator identifying the payment method type. Required. Python type: ``Literal['mobile_money', 'bank_account', 'card', 'motito']``; wire name: ``type``; JSON type: string. Constraints: allowed values ``mobile_money``, ``bank_account``, ``card``, ``motito``"""
42    verified: bool = field(init=False)
43    """Whether verified. Required. Python type: ``bool``; wire name: ``verified``; JSON type: boolean"""
44    verified_at: datetime | None = field(init=False)
45    """Timestamp for verified at. Optional; nullable. Python type: ``datetime | None``; wire name: ``verified_at``; JSON type: string (date-time)"""

Typed payment method data in the payment resource namespace.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentMethodSnapshot.

id: str

Unique identifier for this payment method. Required. Python type: str; wire name: id; JSON type: string

bank_account: PaymentMethodBankAccount | None

The bank account associated with this payment method. Optional; nullable. Python type: PaymentMethodSnapshotBankAccount | None; wire name: bank_account; JSON type: object

Card marker. Nested card credentials are not returned. Optional; nullable. Python type: PaymentMethodCard | None; wire name: card; JSON type: object (PaymentMethodCard)

created_at: datetime.datetime

When the payment method was created. Required. Python type: datetime; wire name: created_at; JSON type: string (date-time)

customer_id: str

Identifier of the related customer. Required. Python type: str; wire name: customer_id; JSON type: string

mobile_money: PaymentMethodMobileMoney | None

The mobile money associated with this payment method. Optional; nullable. Python type: PaymentMethodSnapshotMobileMoney | None; wire name: mobile_money; JSON type: object

owner: PaymentMethodOwner | None

The owner associated with this payment method. Optional; nullable. Python type: PaymentMethodSnapshotOwner | None; wire name: owner; JSON type: object

type: Literal['mobile_money', 'bank_account', 'card', 'motito']

Discriminator identifying the payment method type. Required. Python type: Literal['mobile_money', 'bank_account', 'card', 'motito']; wire name: type; JSON type: string. Constraints: allowed values mobile_money, bank_account, card, motito

verified: bool

Whether verified. Required. Python type: bool; wire name: verified; JSON type: boolean

verified_at: datetime.datetime | None

Timestamp for verified at. Optional; nullable. Python type: datetime | None; wire name: verified_at; JSON type: string (date-time)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class PaymentMethodBankAccount(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class PaymentMethodBankAccount(ApiModel):
14    """Bank account details (present when type is bank_account).
15
16    Instances are immutable API responses. ``from_dict()`` decodes nested
17    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
18    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
19    Fields not returned by the API remain absent and can still be queried
20    through mapping-style access.
21
22    API contract schema: ``PaymentMethodSnapshotBankAccount``.
23    """
24    type: str = field(init=False)
25    """Bank account sub-type. Required. Python type: ``str``; wire name: ``type``; JSON type: string. Constraints: allowed values ``ghana_bank_account``"""
26    ghana_bank_account: PaymentMethodSnapshotGhanaBankAccount | None = field(init=False)
27    """Ghana bank account details. Optional; nullable. Python type: ``PaymentMethodSnapshotGhanaBankAccount | None``; wire name: ``ghana_bank_account``; JSON type: object"""

Bank account details (present when type is bank_account).

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentMethodSnapshotBankAccount.

type: str

Bank account sub-type. Required. Python type: str; wire name: type; JSON type: string. Constraints: allowed values ghana_bank_account

ghana_bank_account: PaymentMethodGhanaBankAccount | None

Ghana bank account details. Optional; nullable. Python type: PaymentMethodSnapshotGhanaBankAccount | None; wire name: ghana_bank_account; JSON type: object

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class PaymentMethodGhanaBankAccount(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class PaymentMethodGhanaBankAccount(ApiModel):
14    """Ghana bank account details.
15
16    Instances are immutable API responses. ``from_dict()`` decodes nested
17    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
18    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
19    Fields not returned by the API remain absent and can still be queried
20    through mapping-style access.
21
22    API contract schema: ``PaymentMethodSnapshotGhanaBankAccount``.
23    """
24    account_number: str = field(init=False)
25    """Account number. Required. Python type: ``str``; wire name: ``account_number``; JSON type: string"""
26    branch: str | None = field(init=False)
27    """Branch name. Optional; nullable. Python type: ``str | None``; wire name: ``branch``; JSON type: string"""
28    name: str | None = field(init=False)
29    """Account holder name. Optional; nullable. Python type: ``str | None``; wire name: ``name``; JSON type: string"""
30    sort_code: str | None = field(init=False)
31    """Bank sort code. Optional; nullable. Python type: ``str | None``; wire name: ``sort_code``; JSON type: string"""
32    swift_code: str | None = field(init=False)
33    """SWIFT/BIC code. Optional; nullable. Python type: ``str | None``; wire name: ``swift_code``; JSON type: string"""

Ghana bank account details.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentMethodSnapshotGhanaBankAccount.

account_number: str

Account number. Required. Python type: str; wire name: account_number; JSON type: string

branch: str | None

Branch name. Optional; nullable. Python type: str | None; wire name: branch; JSON type: string

name: str | None

Account holder name. Optional; nullable. Python type: str | None; wire name: name; JSON type: string

sort_code: str | None

Bank sort code. Optional; nullable. Python type: str | None; wire name: sort_code; JSON type: string

swift_code: str | None

SWIFT/BIC code. Optional; nullable. Python type: str | None; wire name: swift_code; JSON type: string

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class PaymentMethodMobileMoney(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class PaymentMethodMobileMoney(ApiModel):
15    """Masked mobile-money wallet details (present when type is mobile_money).
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentMethodSnapshotMobileMoney``.
24    """
25    network: Literal['airtel', 'mtn', 'telecel', 'vodafone'] = field(init=False)
26    """Mobile network operator. Required. Python type: ``Literal['airtel', 'mtn', 'telecel', 'vodafone']``; wire name: ``network``; JSON type: string. Constraints: allowed values ``airtel``, ``mtn``, ``telecel``, ``vodafone``"""
27    account_number: str = field(init=False)
28    """Masked wallet number. The full account number is never returned. Required. Python type: ``str``; wire name: ``account_number``; JSON type: string"""
29    last4: str = field(init=False)
30    """Last four numeric digits of the normalized wallet number. Required. Python type: ``str``; wire name: ``last4``; JSON type: string"""

Masked mobile-money wallet details (present when type is mobile_money).

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentMethodSnapshotMobileMoney.

network: Literal['airtel', 'mtn', 'telecel', 'vodafone']

Mobile network operator. Required. Python type: Literal['airtel', 'mtn', 'telecel', 'vodafone']; wire name: network; JSON type: string. Constraints: allowed values airtel, mtn, telecel, vodafone

account_number: str

Masked wallet number. The full account number is never returned. Required. Python type: str; wire name: account_number; JSON type: string

last4: str

Last four numeric digits of the normalized wallet number. Required. Python type: str; wire name: last4; JSON type: string

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class PaymentMethodOwner(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class PaymentMethodOwner(ApiModel):
14    """Typed payment method owner data in the payment resource namespace.
15
16    Instances are immutable API responses. ``from_dict()`` decodes nested
17    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
18    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
19    Fields not returned by the API remain absent and can still be queried
20    through mapping-style access.
21
22    API contract schema: ``PaymentMethodSnapshotOwner``.
23    """
24    name: str = field(init=False)
25    """Payment method owner's name. Required. Python type: ``str``; wire name: ``name``; JSON type: string. Constraints: minimum length 1"""
26    address: OrderAddress | None = field(init=False)
27    """The address associated with this payment method owner. Required; nullable. Python type: ``OrderAddress | None``; wire name: ``address``; JSON type: object"""

Typed payment method owner data in the payment resource namespace.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentMethodSnapshotOwner.

name: str

Payment method owner's name. Required. Python type: str; wire name: name; JSON type: string. Constraints: minimum length 1

address: inttegro.order.Address | None

The address associated with this payment method owner. Required; nullable. Python type: OrderAddress | None; wire name: address; JSON type: object

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class PayoutConfiguration(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class PayoutConfiguration(ApiModel):
15    """Typed payout configuration data in the payment resource namespace.
16
17    Instances are immutable API responses. ``from_dict()`` decodes nested
18    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
19    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
20    Fields not returned by the API remain absent and can still be queried
21    through mapping-style access.
22
23    API contract schema: ``PaymentPayoutConfiguration``.
24    """
25    enable_fx: Literal[False] = field(init=False)
26    """The enable fx associated with this payout configuration. Required. Python type: ``Literal[False]``; wire name: ``enable_fx``; JSON type: boolean. Constraints: allowed values ``False``"""
27    destination: PaymentPayoutConfigurationDestination = field(init=False)
28    """The destination associated with this payout configuration. Required. Python type: ``PaymentPayoutConfigurationDestination``; wire name: ``destination``; JSON type: object"""

Typed payout configuration data in the payment resource namespace.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentPayoutConfiguration.

enable_fx: Literal[False]

The enable fx associated with this payout configuration. Required. Python type: Literal[False]; wire name: enable_fx; JSON type: boolean. Constraints: allowed values False

The destination associated with this payout configuration. Required. Python type: PaymentPayoutConfigurationDestination; wire name: destination; JSON type: object

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class PayoutConfigurationDestination(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class PayoutConfigurationDestination(ApiModel):
14    """Typed payout configuration destination data in the payment resource namespace.
15
16    Instances are immutable API responses. ``from_dict()`` decodes nested
17    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
18    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
19    Fields not returned by the API remain absent and can still be queried
20    through mapping-style access.
21
22    API contract schema: ``PaymentPayoutConfigurationDestination``.
23    """
24    financial_account_id: str = field(init=False)
25    """Same-currency financial account with push capability enabled. Required. Python type: ``str``; wire name: ``financial_account_id``; JSON type: string"""

Typed payout configuration destination data in the payment resource namespace.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: PaymentPayoutConfigurationDestination.

financial_account_id: str

Same-currency financial account with push capability enabled. Required. Python type: str; wire name: financial_account_id; JSON type: string

class ResultStatus(inttegro._enum_base.WireEnum):
11class ResultStatus(WireEnum):
12    """Payment status.
13
14    Members are strings as well as enum values, so they compare naturally
15    with API payloads and serialize to the lowercase wire value shown below.
16
17    API contract schema: ``PaymentResultStatus``.
18    """
19    PENDING = "pending"
20    """Wire value ``pending`` (pending) for payment status"""
21    REQUIRES_CONFIRMATION = "requires_confirmation"
22    """Wire value ``requires_confirmation`` (requires confirmation) for payment status"""
23    PROCESSING = "processing"
24    """Wire value ``processing`` (processing) for payment status"""
25    SUCCEEDED = "succeeded"
26    """Wire value ``succeeded`` (succeeded) for payment status"""
27    FAILED = "failed"
28    """Wire value ``failed`` (failed) for payment status"""

Payment status.

Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.

API contract schema: PaymentResultStatus.

PENDING = <ResultStatus.PENDING: 'pending'>

Wire value pending (pending) for payment status

REQUIRES_CONFIRMATION = <ResultStatus.REQUIRES_CONFIRMATION: 'requires_confirmation'>

Wire value requires_confirmation (requires confirmation) for payment status

PROCESSING = <ResultStatus.PROCESSING: 'processing'>

Wire value processing (processing) for payment status

SUCCEEDED = <ResultStatus.SUCCEEDED: 'succeeded'>

Wire value succeeded (succeeded) for payment status

FAILED = <ResultStatus.FAILED: 'failed'>

Wire value failed (failed) for payment status

class Status(inttegro._enum_base.WireEnum):
11class Status(WireEnum):
12    """Payment state.
13
14    Members are strings as well as enum values, so they compare naturally
15    with API payloads and serialize to the lowercase wire value shown below.
16
17    API contract schema: ``PaymentStatus``.
18    """
19    INITIATED = "initiated"
20    """Wire value ``initiated`` (initiated) for payment state"""
21    REQUIRES_ACTION = "requires_action"
22    """Wire value ``requires_action`` (requires action) for payment state"""
23    OVERDUE = "overdue"
24    """Wire value ``overdue`` (overdue) for payment state"""
25    EXECUTED = "executed"
26    """Wire value ``executed`` (executed) for payment state"""
27    PAID = "paid"
28    """Wire value ``paid`` (paid) for payment state"""
29    CANCELED = "canceled"
30    """Wire value ``canceled`` (canceled) for payment state"""
31    EXPIRED = "expired"
32    """Wire value ``expired`` (expired) for payment state"""
33    FAILED = "failed"
34    """Wire value ``failed`` (failed) for payment state"""
35    UNKNOWN = "unknown"
36    """Wire value ``unknown`` (unknown) for payment state"""

Payment state.

Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.

API contract schema: PaymentStatus.

INITIATED = <Status.INITIATED: 'initiated'>

Wire value initiated (initiated) for payment state

REQUIRES_ACTION = <Status.REQUIRES_ACTION: 'requires_action'>

Wire value requires_action (requires action) for payment state

OVERDUE = <Status.OVERDUE: 'overdue'>

Wire value overdue (overdue) for payment state

EXECUTED = <Status.EXECUTED: 'executed'>

Wire value executed (executed) for payment state

PAID = <Status.PAID: 'paid'>

Wire value paid (paid) for payment state

CANCELED = <Status.CANCELED: 'canceled'>

Wire value canceled (canceled) for payment state

EXPIRED = <Status.EXPIRED: 'expired'>

Wire value expired (expired) for payment state

FAILED = <Status.FAILED: 'failed'>

Wire value failed (failed) for payment state

UNKNOWN = <Status.UNKNOWN: 'unknown'>

Wire value unknown (unknown) for payment state