Payment

class aioyookassa.types.payment.Confirmation[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

type: ConfirmationType
enforce: bool | None
locale: str | None
return_url: str | None
confirmation_token: str | None
confirmation_data: str | None
url: str | None
classmethod validate_confirmation_fields(data: Any) Any[source]
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Money(*, value: int | float | str | Decimal, currency: Currency | str = Currency.RUB)[source]

Bases: BaseModel

Monetary amount with currency.

Represents a monetary value with currency. Used across all API domains (payments, payouts, refunds, deals, etc.) to represent monetary values.

Supports multiple numeric types for convenience: - int: Money(value=100, currency=”RUB”) - float: Money(value=100.50, currency=”RUB”) - str: Money(value=”100.00”, currency=”RUB”) - Decimal: Money(value=Decimal(“100.00”), currency=”RUB”)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

value: int | float | str | Decimal
currency: Currency | str
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

PaymentAmount (Alias)

Note

PaymentAmount является алиасом для Money и доступен для обратной совместимости. Рекомендуется использовать Money в новом коде.

aioyookassa.types.payment.PaymentAmount

alias of Money

class aioyookassa.types.payment.Recipient(*, account_id: str, gateway_id: str)[source]

Bases: BaseModel

Payment receiver

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

account_id: str
gateway_id: str
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.PayerBankDetails(*, full_name: str | None = None, short_name: str | None = None, address: str | None = None, inn: str | None = None, bank_name: str | None = None, bank_branch: str | None = None, bank_bik: str | None = None, bank_account: str | None = None, kpp: str | None = None, bank_id: str | None = None, bic: str | None = None, sbp_operation_id: str | None = None)[source]

Bases: BaseModel

Bank details of the payer

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

full_name: str | None
short_name: str | None
address: str | None
inn: str | None
bank_name: str | None
bank_branch: str | None
bank_bik: str | None
bank_account: str | None
kpp: str | None
bank_id: str | None
bic: str | None
sbp_operation_id: str | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.VatData(*, type: str, amount: Money | None = None, rate: str | None = None)[source]

Bases: BaseModel

VAT data

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

type: str
amount: Money | None
rate: str | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.CardInfo(*, first6: str | None = None, last4: str, expiry_year: str, expiry_month: str, card_type: str, card_product: CardProduct | None = None, issuer_country: str | None = None, issuer_name: str | None = None, source: str | None = None)[source]

Bases: BaseModel

Card information

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

first_six: str | None
last_four: str
expiry_year: str
expiry_month: str
card_type: str
card_product: CardProduct | None
card_country: str | None
bank_name: str | None
source: str | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.PaymentMethod(*, type: str, id: str, saved: bool, status: PaymentMethodStatus, title: str | None = None, login: str | None = None, card: CardInfo | None = None, phone: str | None = None, payer_bank_details: PayerBankDetails | None = None, payment_purpose: str | None = None, vat_data: VatData | None = None, account_number: str | None = None, discount_amount: Money | None = None, loan_option: str | None = None, suspended_until: datetime | None = None, articles: List[Article] | None = None)[source]

Bases: BaseModel

Payment method

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

type: str
id: str
saved: bool
status: PaymentMethodStatus
title: str | None
login: str | None
card: CardInfo | None
phone: str | None
payer_bank_details: PayerBankDetails | None
payment_purpose: str | None
vat_data: VatData | None
account_number: str | None
discount_amount: Money | None
loan_option: str | None
suspended_until: datetime | None
articles: List[Article] | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.CancellationDetails(*, party: CancellationParty, reason: CancellationReason)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

party: CancellationParty
reason: CancellationReason
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.ThreeDSInfo(*, applied: bool)[source]

Bases: BaseModel

3DS information

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

applied: bool
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.AuthorizationDetails(*, rrn: str | None = None, auth_code: str | None = None, three_d_secure: ThreeDSInfo)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

transaction_identifier: str | None
authorization_code: str | None
three_d_secure: ThreeDSInfo
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Transfer(*, account_id: str, amount: Money, status: PaymentStatus, platform_fee_amount: Money | None = None, description: str | None = None, metadata: dict | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

account_id: str
amount: Money
status: PaymentStatus
fee_amount: Money | None
description: str | None
metadata: dict | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Settlement(*, type: str, amount: Money)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

type: str
amount: Money
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Deal(*, id: str, settlements: List[Money] | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

id: str
settlements: List[Money] | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Payment[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

id: str
status: PaymentStatus
amount: Money
income_amount: Money | None
description: str | None
recipient: Recipient
payment_method: PaymentMethod | None
captured_at: datetime | None
created_at: datetime
expires_at: datetime | None
confirmation: Confirmation | None
test: bool
refunded_amount: Money | None
paid: bool
refundable: bool
receipt_registration: ReceiptRegistration | None
metadata: dict | None
cancellation_details: CancellationDetails | None
authorization_details: AuthorizationDetails | None
transfers: List[Transfer] | None
deal: Deal | None
merchant_customer_id: str | None
invoice_details: InvoiceDetails | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.PaymentsList(*, items: List[Payment] | None = None, cursor: str | None = None)[source]

Bases: BaseModel

Payments list

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

list: List[Payment] | None
cursor: str | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Customer[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

full_name: str | None
inn: str | None
email: str | None
phone: str | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.MarkQuantity(*, numerator: int, denominator: int)[source]

Bases: BaseModel

Mark quantity

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

numerator: int
denominator: int
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.MarkCodeInfo(*, mark_code_raw: str | None = None, unknown: str | None = None, ean_8: str | None = None, ean_13: str | None = None, itf_14: str | None = None, gs_10: str | None = None, gs_1m: str | None = None, short: str | None = None, fur: str | None = None, egais_20: str | None = None, egais_30: str | None = None)[source]

Bases: BaseModel

Mark code information

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

code: str | None
unknown: str | None
ean_8: str | None
ean_13: str | None
itf_14: str | None
gs_10: str | None
gs_1m: str | None
short: str | None
fur: str | None
egais_20: str | None
egais_30: str | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.IndustryDetails(*, federal_id: str, document_date: datetime, document_number: str, value: str)[source]

Bases: BaseModel

Industry details

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

federal_id: str
document_date: datetime
document_number: str
value: str
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.PaymentItem(*, description: str, amount: Money, vat_code: int, quantity: int | float | str | Decimal, payment_subject: PaymentSubject | str | None = None, payment_mode: PaymentMode | str | None = None, measure: str | None = None, mark_quantity: MarkQuantity | None = None, country_of_origin_code: str | None = None, customs_declaration_number: str | None = None, excise: str | None = None, product_code: str | None = None, planned_status: int | None = None, mark_code_info: MarkCodeInfo | None = None, mark_mode: str | None = None, payment_subject_industry_details: List[IndustryDetails] | None = None)[source]

Bases: BaseModel

Payment items

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

description: str
amount: Money
vat_code: int
quantity: int | float | str | Decimal
payment_subject: PaymentSubject | str | None
payment_mode: PaymentMode | str | None
measure: str | None
mark_quantity: MarkQuantity | None
country_of_origin_code: str | None
customs_declaration_number: str | None
excise: str | None
product_code: str | None
planned_status: int | None
mark_code_info: MarkCodeInfo | None
mark_mode: str | None
payment_subject_industry_details: List[IndustryDetails] | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.OperationDetails(*, operation_id: int, value: str, created_at: datetime)[source]

Bases: BaseModel

Operation details

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

id: int
value: str
created_at: datetime
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Receipt[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

customer: Customer | None
items: List[PaymentItem]
phone: str | None
email: str | None
tax_system_code: int | None
internet: bool | None
timezone: int | None
receipt_industry_details: List[IndustryDetails] | None
receipt_operational_details: OperationDetails | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Passenger(*, first_name: str, last_name: str)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

first_name: str
last_name: str
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Flight(*, departure_airport: str, arrival_airport: str, departure_date: datetime, carrier_code: str | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

departure_airport: str
arrival_airport: str
departure_date: datetime
carrier_code: str | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class aioyookassa.types.payment.Airline[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

ticket_number: str | None
booking_reference: str | None
passengers: List[Passenger] | None
flights: List[Flight] | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].