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
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.
The payment method type associated with this attempt. Optional; nullable. Python type: str | None; wire name: payment_method_type; JSON type: string
Identifier of the related payment method. Optional; nullable. Python type: str | None; wire name: payment_method_id; JSON type: string
The error associated with this attempt. Optional; nullable. Python type: PaymentAttemptError | None; wire name: error; JSON type: object
External payment reference. Optional; nullable. Python type: str | None; wire name: reference; JSON type: string
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
Timestamp for initiated at. Required. Python type: datetime; wire name: initiated_at; JSON type: string (date-time)
Timestamp for succeeded at. Optional; nullable. Python type: datetime | None; wire name: succeeded_at; JSON type: string (date-time)
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.
The message associated with this attempt error. Required. Python type: str; wire name: message; JSON type: string
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.
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.
The owner associated with this billing detail. Optional; nullable. Python type: PaymentMethodSnapshotOwner | None; wire name: owner; JSON type: object
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.
Identifier of the related order. Required. Python type: str; wire name: order_id; JSON type: string. Constraints: minimum length 1
Optional payment identifier when already known by the client. Required. Python type: str; wire name: payment_id; JSON type: string
Optional confirmation attempt identifier. Required. Python type: str; wire name: confirmation_id; JSON type: string
Payer confirmation token. Required. Python type: str; wire name: token; JSON type: string. Constraints: minimum length 1
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.
Wire value email (email) for channel used to send the token
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.
The message associated with this error. Required. Python type: str; wire name: message; JSON type: string
URL used for docs. Required. Python type: str; wire name: docs_url; JSON type: string (uri)
The source associated with this error. Required. Python type: str; wire name: source; JSON type: string
Discriminator identifying the error type. Required. Python type: str; wire name: type; JSON type: string
The code associated with this error. Required. Python type: str; wire name: code; JSON type: string
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 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
Details for customer payment confirmation. Optional; nullable. Python type: PaymentNextActionConfirmPayment | None; wire name: confirm_payment; JSON type: object
Details for redirect action. Optional; nullable. Python type: PaymentNextActionRedirect | None; wire name: redirect; JSON type: object
Details for requesting a fresh customer confirmation. Optional; nullable. Python type: PaymentNextActionRequestConfirmation | None; wire name: request_confirmation; JSON type: object
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 requiring authorization. Required. Python type: str; wire name: beneficiary; JSON type: string
When the authorization request expires. Required. Python type: datetime; wire name: expires_at; JSON type: string (date-time)
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.
When the confirmation request expires. Required. Python type: datetime; wire name: expires_at; JSON type: string (date-time)
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
Whether the payment confirmation has completed. Required. Python type: bool; wire name: confirmed; JSON type: boolean
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.
Whether the confirmation has succeeded. Required. Python type: bool; wire name: confirmed; JSON type: boolean
Reason for the current attempt state. Required. Python type: str; wire name: reason; JSON type: string
When the attempt was executed. Optional; nullable. Python type: datetime | None; wire name: executed_at; JSON type: string (date-time)
When the attempt was created. Required. Python type: datetime; wire name: created_at; JSON type: string (date-time)
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.
Unique identifier for the confirmation request. Required. Python type: str; wire name: id; JSON type: string
Recipient of the confirmation token. Required. Python type: str; wire name: recipient; JSON type: string
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
Number of digits in the token. Required. Python type: int; wire name: token_size; JSON type: integer
Sender ID for the message. Required. Python type: str; wire name: sender_id; JSON type: string
Current request status. Optional; nullable. Python type: str | None; wire name: status; JSON type: string
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.
URL to redirect the customer to. Required. Python type: str; wire name: redirect_url; JSON type: string (uri)
When the redirect URL expires. Required. Python type: datetime; wire name: valid_until; JSON type: string (date-time)
Latest redirect visit details. Optional; nullable. Python type: PaymentNextActionRedirectLatestVisit | None; wire name: latest_visit; JSON type: object
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.
The user agent associated with this next action redirect latest visit. Required. Python type: str; wire name: user_agent; JSON type: string
The ip address associated with this next action redirect latest visit. Required. Python type: str; wire name: ip_address; JSON type: string
Timestamp for at. Required. Python type: datetime; wire name: at; JSON type: string (date-time)
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.
The last request associated with this next action request confirmation. Optional; nullable. Python type: PaymentNextActionConfirmPaymentRequest | None; wire name: last_request; JSON type: object
Timestamp for after. Optional; nullable. Python type: datetime | None; wire name: after; JSON type: string (date-time)
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.
Wire value confirm_payment (confirm payment)
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.
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
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)
The payment method associated with this payment. Optional; nullable. Python type: PaymentMethodSnapshot | None; wire name: payment_method; JSON type: object (OrderPaymentMethod)
The billing details associated with this payment. Optional; nullable. Python type: PaymentBillingDetails | None; wire name: billing_details; JSON type: object
The customer associated with this payment. Optional; nullable. Python type: OrderCustomer | None; wire name: customer; JSON type: object
Receipt issued for a paid order payment. Optional; nullable. Python type: OrderReceipt | None; wire name: receipt; JSON type: object
Most recent payment attempt details. Optional; nullable. Python type: PaymentAttempt | None; wire name: latest_attempt; JSON type: object
Next action required to complete a payment. Optional; nullable. Python type: PaymentNextAction | None; wire name: next_action; JSON type: object (PaymentNextAction)
The latest error associated with this payment. Optional; nullable. Python type: PaymentError | None; wire name: latest_error; JSON type: object
When we kicked off the payment intent. Required. Python type: datetime; wire name: initiated_at; JSON type: string (date-time)
When payment execution started. Optional; nullable. Python type: datetime | None; wire name: executed_at; JSON type: string (date-time)
When payment completed successfully. Optional; nullable. Python type: datetime | None; wire name: paid_at; JSON type: string (date-time)
When payment was canceled. Optional; nullable. Python type: datetime | None; wire name: canceled_at; JSON type: string (date-time)
When payment becomes overdue. Optional; nullable. Python type: datetime | None; wire name: due_at; JSON type: string (date-time)
When payment expired. Optional; nullable. Python type: datetime | None; wire name: expired_at; JSON type: string (date-time)
When payment failed. Optional; nullable. Python type: datetime | None; wire name: failed_at; JSON type: string (date-time)
Whether payment was recorded as received outside Inttegro. Optional; nullable. Python type: bool | None; wire name: paid_offline; JSON type: boolean
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 for this payment. Optional; nullable. Python type: PaymentPayoutConfiguration | None; wire name: payout_configuration; JSON type: object
70 def is_paid(self) -> bool: 71 """Whether the payment completed successfully.""" 72 return self.status == "paid"
Whether the payment completed successfully.
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.
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.
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.
Unique identifier for this payment method. Required. Python type: str; wire name: id; JSON type: string
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)
When the payment method was created. Required. Python type: datetime; wire name: created_at; JSON type: string (date-time)
Identifier of the related customer. Required. Python type: str; wire name: customer_id; JSON type: string
The mobile money associated with this payment method. Optional; nullable. Python type: PaymentMethodSnapshotMobileMoney | None; wire name: mobile_money; JSON type: object
The owner associated with this payment method. Optional; nullable. Python type: PaymentMethodSnapshotOwner | None; wire name: owner; JSON type: object
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
Whether verified. Required. Python type: bool; wire name: verified; JSON type: boolean
Timestamp for verified at. Optional; nullable. Python type: datetime | None; wire name: verified_at; JSON type: string (date-time)
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.
Bank account sub-type. Required. Python type: str; wire name: type; JSON type: string. Constraints: allowed values ghana_bank_account
Ghana bank account details. Optional; nullable. Python type: PaymentMethodSnapshotGhanaBankAccount | None; wire name: ghana_bank_account; JSON type: object
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. Required. Python type: str; wire name: account_number; JSON type: string
Branch name. Optional; nullable. Python type: str | None; wire name: branch; JSON type: string
Account holder name. Optional; nullable. Python type: str | None; wire name: name; JSON type: string
Bank sort code. Optional; nullable. Python type: str | None; wire name: sort_code; JSON type: string
SWIFT/BIC code. Optional; nullable. Python type: str | None; wire name: swift_code; JSON type: string
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.
Mobile network operator. Required. Python type: Literal['airtel', 'mtn', 'telecel', 'vodafone']; wire name: network; JSON type: string. Constraints: allowed values airtel, mtn, telecel, vodafone
Masked wallet number. The full account number is never returned. Required. Python type: str; wire name: account_number; JSON type: string
Last four numeric digits of the normalized wallet number. Required. Python type: str; wire name: last4; JSON type: string
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.
Payment method owner's name. Required. Python type: str; wire name: name; JSON type: string. Constraints: minimum length 1
The address associated with this payment method owner. Required; nullable. Python type: OrderAddress | None; wire name: address; JSON type: object
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.
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
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.
Same-currency financial account with push capability enabled. Required. Python type: str; wire name: financial_account_id; JSON type: string
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.
Wire value requires_confirmation (requires confirmation) for payment status
Wire value processing (processing) for payment status
Wire value succeeded (succeeded) for payment status
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.
Wire value requires_action (requires action) for payment state