mollie-api-py 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mollie/__init__.py +18 -0
- mollie/_hooks/__init__.py +5 -0
- mollie/_hooks/mollie_hooks.py +165 -0
- mollie/_hooks/registration.py +18 -0
- mollie/_hooks/sdkhooks.py +76 -0
- mollie/_hooks/types.py +113 -0
- mollie/_version.py +15 -0
- mollie/balance_transfers.py +651 -0
- mollie/balances.py +1105 -0
- mollie/basesdk.py +360 -0
- mollie/capabilities.py +209 -0
- mollie/captures.py +677 -0
- mollie/chargebacks_sdk.py +675 -0
- mollie/client_links.py +325 -0
- mollie/clients.py +409 -0
- mollie/customers.py +1563 -0
- mollie/delayed_routing.py +421 -0
- mollie/httpclient.py +125 -0
- mollie/invoices.py +429 -0
- mollie/mandates.py +895 -0
- mollie/methods.py +789 -0
- mollie/models/__init__.py +4002 -0
- mollie/models/address.py +29 -0
- mollie/models/amount.py +25 -0
- mollie/models/amount_nullable.py +24 -0
- mollie/models/apierror.py +40 -0
- mollie/models/balance_card_audience.py +10 -0
- mollie/models/balance_card_issuer.py +12 -0
- mollie/models/balance_card_region.py +12 -0
- mollie/models/balance_fee_type.py +43 -0
- mollie/models/balance_prepayment_part_type.py +13 -0
- mollie/models/balance_report_grouping.py +10 -0
- mollie/models/balance_transaction_type.py +47 -0
- mollie/models/balance_transfer_category.py +17 -0
- mollie/models/balance_transfer_category_response.py +18 -0
- mollie/models/balance_transfer_destination_type.py +14 -0
- mollie/models/balance_transfer_party_type.py +10 -0
- mollie/models/balance_transfer_party_type_response.py +11 -0
- mollie/models/balance_transfer_status.py +13 -0
- mollie/models/balance_transfer_status_reason_response.py +19 -0
- mollie/models/billingaddress.py +154 -0
- mollie/models/cancel_paymentop.py +93 -0
- mollie/models/cancel_refundop.py +86 -0
- mollie/models/cancel_subscriptionop.py +100 -0
- mollie/models/capability_requirement_status.py +15 -0
- mollie/models/capability_status.py +12 -0
- mollie/models/capability_status_reason.py +10 -0
- mollie/models/capture_mode.py +15 -0
- mollie/models/capture_mode_response.py +16 -0
- mollie/models/capture_response.py +265 -0
- mollie/models/client_link_request.py +210 -0
- mollie/models/client_link_response.py +56 -0
- mollie/models/clienterror.py +30 -0
- mollie/models/components_sub_totals.py +127 -0
- mollie/models/create_captureop.py +43 -0
- mollie/models/create_client_linkop.py +29 -0
- mollie/models/create_connect_balance_transferop.py +32 -0
- mollie/models/create_customer_paymentop.py +43 -0
- mollie/models/create_customerop.py +29 -0
- mollie/models/create_mandateop.py +43 -0
- mollie/models/create_payment_linkop.py +325 -0
- mollie/models/create_paymentop.py +73 -0
- mollie/models/create_profileop.py +29 -0
- mollie/models/create_refundop.py +43 -0
- mollie/models/create_sales_invoiceop.py +29 -0
- mollie/models/create_subscriptionop.py +43 -0
- mollie/models/create_webhook.py +123 -0
- mollie/models/create_webhookop.py +69 -0
- mollie/models/currencies.py +20 -0
- mollie/models/customer_response.py +169 -0
- mollie/models/delete_customerop.py +91 -0
- mollie/models/delete_payment_linkop.py +91 -0
- mollie/models/delete_profileop.py +29 -0
- mollie/models/delete_sales_invoiceop.py +44 -0
- mollie/models/delete_values_sales_invoice.py +54 -0
- mollie/models/delete_webhookop.py +56 -0
- mollie/models/entity_balance.py +325 -0
- mollie/models/entity_balance_report.py +541 -0
- mollie/models/entity_balance_transaction.py +1068 -0
- mollie/models/entity_balance_transfer.py +62 -0
- mollie/models/entity_balance_transfer_party.py +28 -0
- mollie/models/entity_balance_transfer_party_response.py +32 -0
- mollie/models/entity_balance_transfer_response.py +159 -0
- mollie/models/entity_capability.py +75 -0
- mollie/models/entity_capability_requirement.py +87 -0
- mollie/models/entity_capture.py +63 -0
- mollie/models/entity_chargeback.py +247 -0
- mollie/models/entity_customer.py +86 -0
- mollie/models/entity_event.py +46 -0
- mollie/models/entity_invoice.py +247 -0
- mollie/models/entity_method_get.py +329 -0
- mollie/models/entity_onboarding_status.py +95 -0
- mollie/models/entity_organization.py +178 -0
- mollie/models/entity_payment_route.py +111 -0
- mollie/models/entity_payment_route_response.py +140 -0
- mollie/models/entity_permission.py +61 -0
- mollie/models/entity_refund_response.py +361 -0
- mollie/models/entity_route.py +96 -0
- mollie/models/entity_settlement.py +467 -0
- mollie/models/entity_terminal.py +160 -0
- mollie/models/entity_webhook.py +122 -0
- mollie/models/entity_webhook_event.py +149 -0
- mollie/models/error_response.py +70 -0
- mollie/models/get_balance_reportop.py +126 -0
- mollie/models/get_balanceop.py +71 -0
- mollie/models/get_captureop.py +129 -0
- mollie/models/get_chargebackop.py +129 -0
- mollie/models/get_clientop.py +216 -0
- mollie/models/get_connect_balance_transferop.py +71 -0
- mollie/models/get_current_organizationop.py +22 -0
- mollie/models/get_current_profileop.py +22 -0
- mollie/models/get_customerop.py +286 -0
- mollie/models/get_invoiceop.py +29 -0
- mollie/models/get_mandateop.py +86 -0
- mollie/models/get_methodop.py +199 -0
- mollie/models/get_next_settlementop.py +22 -0
- mollie/models/get_onboarding_statusop.py +22 -0
- mollie/models/get_open_settlementop.py +22 -0
- mollie/models/get_organizationop.py +71 -0
- mollie/models/get_partner_statusop.py +231 -0
- mollie/models/get_payment_link_paymentsop.py +188 -0
- mollie/models/get_payment_linkop.py +77 -0
- mollie/models/get_paymentop.py +128 -0
- mollie/models/get_permissionop.py +73 -0
- mollie/models/get_primary_balanceop.py +22 -0
- mollie/models/get_profileop.py +71 -0
- mollie/models/get_refundop.py +129 -0
- mollie/models/get_sales_invoiceop.py +75 -0
- mollie/models/get_settlementop.py +29 -0
- mollie/models/get_subscriptionop.py +86 -0
- mollie/models/get_terminalop.py +77 -0
- mollie/models/get_webhook_eventop.py +71 -0
- mollie/models/get_webhookop.py +71 -0
- mollie/models/internal/__init__.py +54 -0
- mollie/models/internal/globals.py +59 -0
- mollie/models/line_categories.py +13 -0
- mollie/models/line_categories_response.py +14 -0
- mollie/models/list_all_chargebacksop.py +236 -0
- mollie/models/list_all_methodsop.py +249 -0
- mollie/models/list_all_refundsop.py +230 -0
- mollie/models/list_all_subscriptionsop.py +202 -0
- mollie/models/list_balance_transactionsop.py +174 -0
- mollie/models/list_balancesop.py +171 -0
- mollie/models/list_capabilitiesop.py +62 -0
- mollie/models/list_capture_response.py +264 -0
- mollie/models/list_capturesop.py +185 -0
- mollie/models/list_chargebacksop.py +185 -0
- mollie/models/list_clientsop.py +269 -0
- mollie/models/list_connect_balance_transfersop.py +177 -0
- mollie/models/list_customer_paymentsop.py +231 -0
- mollie/models/list_customer_response.py +164 -0
- mollie/models/list_customersop.py +172 -0
- mollie/models/list_entity_balance.py +322 -0
- mollie/models/list_entity_chargeback.py +244 -0
- mollie/models/list_entity_invoice.py +244 -0
- mollie/models/list_entity_method.py +315 -0
- mollie/models/list_entity_method_all.py +391 -0
- mollie/models/list_entity_permission.py +56 -0
- mollie/models/list_entity_refund.py +352 -0
- mollie/models/list_entity_settlement.py +457 -0
- mollie/models/list_entity_terminal.py +157 -0
- mollie/models/list_entity_webhook.py +117 -0
- mollie/models/list_invoicesop.py +175 -0
- mollie/models/list_links.py +68 -0
- mollie/models/list_mandate_response.py +261 -0
- mollie/models/list_mandatesop.py +186 -0
- mollie/models/list_methodsop.py +332 -0
- mollie/models/list_payment_linksop.py +159 -0
- mollie/models/list_payment_response.py +1953 -0
- mollie/models/list_paymentsop.py +217 -0
- mollie/models/list_permissionsop.py +85 -0
- mollie/models/list_profile_response.py +194 -0
- mollie/models/list_profilesop.py +118 -0
- mollie/models/list_refundsop.py +189 -0
- mollie/models/list_route_get_response.py +97 -0
- mollie/models/list_sales_invoice_response.py +505 -0
- mollie/models/list_sales_invoicesop.py +172 -0
- mollie/models/list_settlement_capturesop.py +187 -0
- mollie/models/list_settlement_chargebacksop.py +187 -0
- mollie/models/list_settlement_paymentsop.py +233 -0
- mollie/models/list_settlement_refundsop.py +191 -0
- mollie/models/list_settlementsop.py +178 -0
- mollie/models/list_subscription_paymentsop.py +242 -0
- mollie/models/list_subscription_response.py +344 -0
- mollie/models/list_subscriptionsop.py +189 -0
- mollie/models/list_terminalsop.py +172 -0
- mollie/models/list_webhooksop.py +189 -0
- mollie/models/locale.py +32 -0
- mollie/models/locale_response.py +33 -0
- mollie/models/mandate_details_card_label_response.py +22 -0
- mollie/models/mandate_method.py +15 -0
- mollie/models/mandate_method_response.py +16 -0
- mollie/models/mandate_request.py +160 -0
- mollie/models/mandate_response.py +264 -0
- mollie/models/metadata.py +19 -0
- mollie/models/method.py +50 -0
- mollie/models/method_include_wallets_parameter.py +8 -0
- mollie/models/method_resource_parameter.py +9 -0
- mollie/models/method_response.py +59 -0
- mollie/models/method_status.py +15 -0
- mollie/models/mode.py +12 -0
- mollie/models/no_response_error.py +17 -0
- mollie/models/onboarding_vat_regulation.py +16 -0
- mollie/models/organization_vat_regulation.py +17 -0
- mollie/models/payment_address.py +130 -0
- mollie/models/payment_create_routeop.py +43 -0
- mollie/models/payment_details_card_audition_response.py +12 -0
- mollie/models/payment_details_card_funding_response.py +14 -0
- mollie/models/payment_details_card_label_response.py +23 -0
- mollie/models/payment_details_card_security_response.py +12 -0
- mollie/models/payment_details_failure_reason_response.py +25 -0
- mollie/models/payment_details_fee_region_response.py +20 -0
- mollie/models/payment_details_receipt_card_read_method_response.py +17 -0
- mollie/models/payment_details_receipt_card_verification_method_response.py +21 -0
- mollie/models/payment_details_seller_protection_response.py +20 -0
- mollie/models/payment_details_wallet_response.py +11 -0
- mollie/models/payment_line_item.py +96 -0
- mollie/models/payment_line_item_response.py +104 -0
- mollie/models/payment_line_type.py +20 -0
- mollie/models/payment_line_type_response.py +21 -0
- mollie/models/payment_link_method.py +36 -0
- mollie/models/payment_link_method_response.py +37 -0
- mollie/models/payment_link_response.py +348 -0
- mollie/models/payment_link_sequence_type.py +9 -0
- mollie/models/payment_link_sequence_type_response.py +10 -0
- mollie/models/payment_list_routesop.py +140 -0
- mollie/models/payment_method.py +53 -0
- mollie/models/payment_request.py +919 -0
- mollie/models/payment_response.py +1953 -0
- mollie/models/profile_request.py +67 -0
- mollie/models/profile_response.py +197 -0
- mollie/models/profile_review_status_response.py +12 -0
- mollie/models/recurring_line_item.py +77 -0
- mollie/models/refund_external_reference_type.py +10 -0
- mollie/models/refund_external_reference_type_response.py +11 -0
- mollie/models/refund_request.py +200 -0
- mollie/models/release_authorizationop.py +108 -0
- mollie/models/request_apple_pay_payment_sessionop.py +76 -0
- mollie/models/responsevalidationerror.py +27 -0
- mollie/models/revoke_mandateop.py +100 -0
- mollie/models/route_create_response.py +97 -0
- mollie/models/route_destination_type.py +10 -0
- mollie/models/route_destination_type_response.py +11 -0
- mollie/models/sales_invoice_discount.py +21 -0
- mollie/models/sales_invoice_discount_response.py +25 -0
- mollie/models/sales_invoice_discount_type.py +11 -0
- mollie/models/sales_invoice_discount_type_response.py +12 -0
- mollie/models/sales_invoice_email_details.py +20 -0
- mollie/models/sales_invoice_line_item.py +67 -0
- mollie/models/sales_invoice_line_item_response.py +70 -0
- mollie/models/sales_invoice_payment_details.py +59 -0
- mollie/models/sales_invoice_payment_details_response.py +66 -0
- mollie/models/sales_invoice_payment_details_source.py +12 -0
- mollie/models/sales_invoice_payment_details_source_response.py +13 -0
- mollie/models/sales_invoice_payment_term.py +16 -0
- mollie/models/sales_invoice_payment_term_response.py +17 -0
- mollie/models/sales_invoice_recipient.py +176 -0
- mollie/models/sales_invoice_recipient_locale.py +18 -0
- mollie/models/sales_invoice_recipient_locale_response.py +19 -0
- mollie/models/sales_invoice_recipient_response.py +182 -0
- mollie/models/sales_invoice_recipient_type.py +13 -0
- mollie/models/sales_invoice_recipient_type_response.py +14 -0
- mollie/models/sales_invoice_request.py +256 -0
- mollie/models/sales_invoice_response.py +509 -0
- mollie/models/sales_invoice_status.py +25 -0
- mollie/models/sales_invoice_status_response.py +26 -0
- mollie/models/sales_invoice_vat_mode.py +13 -0
- mollie/models/sales_invoice_vat_mode_response.py +14 -0
- mollie/models/sales_invoice_vat_scheme.py +11 -0
- mollie/models/sales_invoice_vat_scheme_response.py +12 -0
- mollie/models/security.py +35 -0
- mollie/models/sequence_type.py +10 -0
- mollie/models/sequence_type_response.py +11 -0
- mollie/models/sorting.py +9 -0
- mollie/models/status_reason.py +168 -0
- mollie/models/sub_group.py +52 -0
- mollie/models/sub_totals.py +120 -0
- mollie/models/submit_onboarding_dataop.py +214 -0
- mollie/models/subscription_method.py +12 -0
- mollie/models/subscription_method_response.py +13 -0
- mollie/models/subscription_request.py +213 -0
- mollie/models/subscription_response.py +349 -0
- mollie/models/terminal_brand.py +12 -0
- mollie/models/terminal_model.py +16 -0
- mollie/models/test_webhookop.py +64 -0
- mollie/models/update_customerop.py +43 -0
- mollie/models/update_payment_linkop.py +172 -0
- mollie/models/update_paymentop.py +332 -0
- mollie/models/update_profileop.py +147 -0
- mollie/models/update_sales_invoiceop.py +44 -0
- mollie/models/update_subscriptionop.py +188 -0
- mollie/models/update_values_sales_invoice.py +176 -0
- mollie/models/update_webhookop.py +83 -0
- mollie/models/url.py +24 -0
- mollie/models/url_nullable.py +25 -0
- mollie/models/webhook_event_types.py +18 -0
- mollie/models/webhook_status.py +14 -0
- mollie/onboarding.py +403 -0
- mollie/organizations.py +579 -0
- mollie/payment_links.py +1323 -0
- mollie/payments_sdk.py +1385 -0
- mollie/permissions.py +397 -0
- mollie/profiles.py +1209 -0
- mollie/py.typed +1 -0
- mollie/refunds_sdk.py +1111 -0
- mollie/sales_invoices.py +1121 -0
- mollie/sdk.py +265 -0
- mollie/sdkconfiguration.py +50 -0
- mollie/settlements.py +1735 -0
- mollie/subscriptions.py +1617 -0
- mollie/terminals.py +427 -0
- mollie/types/__init__.py +21 -0
- mollie/types/basemodel.py +39 -0
- mollie/utils/__init__.py +200 -0
- mollie/utils/annotations.py +79 -0
- mollie/utils/datetimes.py +23 -0
- mollie/utils/enums.py +74 -0
- mollie/utils/eventstreaming.py +248 -0
- mollie/utils/forms.py +223 -0
- mollie/utils/headers.py +136 -0
- mollie/utils/logger.py +27 -0
- mollie/utils/metadata.py +118 -0
- mollie/utils/queryparams.py +205 -0
- mollie/utils/requestbodies.py +66 -0
- mollie/utils/retries.py +217 -0
- mollie/utils/security.py +195 -0
- mollie/utils/serializers.py +249 -0
- mollie/utils/unmarshal_json_response.py +24 -0
- mollie/utils/url.py +155 -0
- mollie/utils/values.py +137 -0
- mollie/wallets.py +263 -0
- mollie/webhook_events.py +211 -0
- mollie/webhooks.py +1305 -0
- mollie_api_py-1.0.0.dist-info/METADATA +834 -0
- mollie_api_py-1.0.0.dist-info/RECORD +337 -0
- mollie_api_py-1.0.0.dist-info/WHEEL +4 -0
- mollie_api_py-1.0.0.dist-info/licenses/LICENSE.md +24 -0
|
@@ -0,0 +1,1953 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .amount import Amount, AmountTypedDict
|
|
5
|
+
from .amount_nullable import AmountNullable, AmountNullableTypedDict
|
|
6
|
+
from .capture_mode_response import CaptureModeResponse
|
|
7
|
+
from .entity_payment_route_response import (
|
|
8
|
+
EntityPaymentRouteResponse,
|
|
9
|
+
EntityPaymentRouteResponseTypedDict,
|
|
10
|
+
)
|
|
11
|
+
from .line_categories_response import LineCategoriesResponse
|
|
12
|
+
from .locale_response import LocaleResponse
|
|
13
|
+
from .metadata import Metadata, MetadataTypedDict
|
|
14
|
+
from .method_response import MethodResponse
|
|
15
|
+
from .mode import Mode
|
|
16
|
+
from .payment_address import PaymentAddress, PaymentAddressTypedDict
|
|
17
|
+
from .payment_details_card_audition_response import PaymentDetailsCardAuditionResponse
|
|
18
|
+
from .payment_details_card_funding_response import PaymentDetailsCardFundingResponse
|
|
19
|
+
from .payment_details_card_label_response import PaymentDetailsCardLabelResponse
|
|
20
|
+
from .payment_details_card_security_response import PaymentDetailsCardSecurityResponse
|
|
21
|
+
from .payment_details_failure_reason_response import PaymentDetailsFailureReasonResponse
|
|
22
|
+
from .payment_details_fee_region_response import PaymentDetailsFeeRegionResponse
|
|
23
|
+
from .payment_details_receipt_card_read_method_response import (
|
|
24
|
+
PaymentDetailsReceiptCardReadMethodResponse,
|
|
25
|
+
)
|
|
26
|
+
from .payment_details_receipt_card_verification_method_response import (
|
|
27
|
+
PaymentDetailsReceiptCardVerificationMethodResponse,
|
|
28
|
+
)
|
|
29
|
+
from .payment_details_seller_protection_response import (
|
|
30
|
+
PaymentDetailsSellerProtectionResponse,
|
|
31
|
+
)
|
|
32
|
+
from .payment_details_wallet_response import PaymentDetailsWalletResponse
|
|
33
|
+
from .payment_line_type_response import PaymentLineTypeResponse
|
|
34
|
+
from .recurring_line_item import RecurringLineItem, RecurringLineItemTypedDict
|
|
35
|
+
from .sequence_type_response import SequenceTypeResponse
|
|
36
|
+
from .status_reason import StatusReason, StatusReasonTypedDict
|
|
37
|
+
from .url import URL, URLTypedDict
|
|
38
|
+
from datetime import date
|
|
39
|
+
from enum import Enum
|
|
40
|
+
from mollie import utils
|
|
41
|
+
from mollie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
42
|
+
from mollie.utils import validate_open_enum
|
|
43
|
+
import pydantic
|
|
44
|
+
from pydantic import model_serializer
|
|
45
|
+
from pydantic.functional_validators import PlainValidator
|
|
46
|
+
from typing import Any, Dict, List, Optional
|
|
47
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class PaymentResponseAmountRefundedTypedDict(TypedDict):
|
|
51
|
+
r"""The total amount that is already refunded. Only available when refunds are available for this payment. For some
|
|
52
|
+
payment methods, this amount may be higher than the payment amount, for example to allow reimbursement of the
|
|
53
|
+
costs for a return shipment to the customer.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
currency: str
|
|
57
|
+
r"""A three-character ISO 4217 currency code."""
|
|
58
|
+
value: str
|
|
59
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class PaymentResponseAmountRefunded(BaseModel):
|
|
63
|
+
r"""The total amount that is already refunded. Only available when refunds are available for this payment. For some
|
|
64
|
+
payment methods, this amount may be higher than the payment amount, for example to allow reimbursement of the
|
|
65
|
+
costs for a return shipment to the customer.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
currency: str
|
|
69
|
+
r"""A three-character ISO 4217 currency code."""
|
|
70
|
+
|
|
71
|
+
value: str
|
|
72
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class PaymentResponseAmountRemainingTypedDict(TypedDict):
|
|
76
|
+
r"""The remaining amount that can be refunded. Only available when refunds are available for this payment."""
|
|
77
|
+
|
|
78
|
+
currency: str
|
|
79
|
+
r"""A three-character ISO 4217 currency code."""
|
|
80
|
+
value: str
|
|
81
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class PaymentResponseAmountRemaining(BaseModel):
|
|
85
|
+
r"""The remaining amount that can be refunded. Only available when refunds are available for this payment."""
|
|
86
|
+
|
|
87
|
+
currency: str
|
|
88
|
+
r"""A three-character ISO 4217 currency code."""
|
|
89
|
+
|
|
90
|
+
value: str
|
|
91
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class PaymentResponseAmountCapturedTypedDict(TypedDict):
|
|
95
|
+
r"""The total amount that is already captured for this payment. Only available when this payment supports captures."""
|
|
96
|
+
|
|
97
|
+
currency: str
|
|
98
|
+
r"""A three-character ISO 4217 currency code."""
|
|
99
|
+
value: str
|
|
100
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class PaymentResponseAmountCaptured(BaseModel):
|
|
104
|
+
r"""The total amount that is already captured for this payment. Only available when this payment supports captures."""
|
|
105
|
+
|
|
106
|
+
currency: str
|
|
107
|
+
r"""A three-character ISO 4217 currency code."""
|
|
108
|
+
|
|
109
|
+
value: str
|
|
110
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class PaymentResponseAmountChargedBackTypedDict(TypedDict):
|
|
114
|
+
r"""The total amount that was charged back for this payment. Only available when the total charged back amount is not
|
|
115
|
+
zero.
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
currency: str
|
|
119
|
+
r"""A three-character ISO 4217 currency code."""
|
|
120
|
+
value: str
|
|
121
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class PaymentResponseAmountChargedBack(BaseModel):
|
|
125
|
+
r"""The total amount that was charged back for this payment. Only available when the total charged back amount is not
|
|
126
|
+
zero.
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
currency: str
|
|
130
|
+
r"""A three-character ISO 4217 currency code."""
|
|
131
|
+
|
|
132
|
+
value: str
|
|
133
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class PaymentResponseSettlementAmountTypedDict(TypedDict):
|
|
137
|
+
r"""This optional field will contain the approximate amount that will be settled to your account, converted to the
|
|
138
|
+
currency your account is settled in.
|
|
139
|
+
|
|
140
|
+
Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal or gift cards. If no amount is
|
|
141
|
+
settled by Mollie the `settlementAmount` is omitted from the response.
|
|
142
|
+
|
|
143
|
+
Please note that this amount might be recalculated and changed when the status of the payment changes. We suggest
|
|
144
|
+
using the List balance transactions endpoint instead to get more accurate settlement amounts for your payments.
|
|
145
|
+
"""
|
|
146
|
+
|
|
147
|
+
currency: str
|
|
148
|
+
r"""A three-character ISO 4217 currency code."""
|
|
149
|
+
value: str
|
|
150
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class PaymentResponseSettlementAmount(BaseModel):
|
|
154
|
+
r"""This optional field will contain the approximate amount that will be settled to your account, converted to the
|
|
155
|
+
currency your account is settled in.
|
|
156
|
+
|
|
157
|
+
Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal or gift cards. If no amount is
|
|
158
|
+
settled by Mollie the `settlementAmount` is omitted from the response.
|
|
159
|
+
|
|
160
|
+
Please note that this amount might be recalculated and changed when the status of the payment changes. We suggest
|
|
161
|
+
using the List balance transactions endpoint instead to get more accurate settlement amounts for your payments.
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
currency: str
|
|
165
|
+
r"""A three-character ISO 4217 currency code."""
|
|
166
|
+
|
|
167
|
+
value: str
|
|
168
|
+
r"""A string containing an exact monetary amount in the given currency."""
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class PaymentResponseLineTypedDict(TypedDict):
|
|
172
|
+
description: str
|
|
173
|
+
r"""A description of the line item. For example *LEGO 4440 Forest Police Station*."""
|
|
174
|
+
quantity: int
|
|
175
|
+
r"""The number of items."""
|
|
176
|
+
unit_price: AmountTypedDict
|
|
177
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
178
|
+
total_amount: AmountTypedDict
|
|
179
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
180
|
+
type: NotRequired[PaymentLineTypeResponse]
|
|
181
|
+
r"""The type of product purchased. For example, a physical or a digital product.
|
|
182
|
+
|
|
183
|
+
The `tip` payment line type is not available when creating a payment.
|
|
184
|
+
"""
|
|
185
|
+
quantity_unit: NotRequired[str]
|
|
186
|
+
r"""The unit for the quantity. For example *pcs*, *kg*, or *cm*."""
|
|
187
|
+
discount_amount: NotRequired[AmountTypedDict]
|
|
188
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
189
|
+
vat_rate: NotRequired[str]
|
|
190
|
+
r"""The VAT rate applied to the line, for example `21.00` for 21%. The vatRate should be passed as a string and
|
|
191
|
+
not as a float, to ensure the correct number of decimals are passed.
|
|
192
|
+
"""
|
|
193
|
+
vat_amount: NotRequired[AmountTypedDict]
|
|
194
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
195
|
+
sku: NotRequired[str]
|
|
196
|
+
r"""The SKU, EAN, ISBN or UPC of the product sold."""
|
|
197
|
+
categories: NotRequired[List[LineCategoriesResponse]]
|
|
198
|
+
r"""An array with the voucher categories, in case of a line eligible for a voucher. See the
|
|
199
|
+
[Integrating Vouchers](https://docs.mollie.com/docs/integrating-vouchers/) guide for more information.
|
|
200
|
+
"""
|
|
201
|
+
image_url: NotRequired[str]
|
|
202
|
+
r"""A link pointing to an image of the product sold."""
|
|
203
|
+
product_url: NotRequired[str]
|
|
204
|
+
r"""A link pointing to the product page in your web shop of the product sold."""
|
|
205
|
+
recurring: NotRequired[RecurringLineItemTypedDict]
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
class PaymentResponseLine(BaseModel):
|
|
209
|
+
description: str
|
|
210
|
+
r"""A description of the line item. For example *LEGO 4440 Forest Police Station*."""
|
|
211
|
+
|
|
212
|
+
quantity: int
|
|
213
|
+
r"""The number of items."""
|
|
214
|
+
|
|
215
|
+
unit_price: Annotated[Amount, pydantic.Field(alias="unitPrice")]
|
|
216
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
217
|
+
|
|
218
|
+
total_amount: Annotated[Amount, pydantic.Field(alias="totalAmount")]
|
|
219
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
220
|
+
|
|
221
|
+
type: Annotated[
|
|
222
|
+
Optional[PaymentLineTypeResponse], PlainValidator(validate_open_enum(False))
|
|
223
|
+
] = None
|
|
224
|
+
r"""The type of product purchased. For example, a physical or a digital product.
|
|
225
|
+
|
|
226
|
+
The `tip` payment line type is not available when creating a payment.
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
quantity_unit: Annotated[Optional[str], pydantic.Field(alias="quantityUnit")] = None
|
|
230
|
+
r"""The unit for the quantity. For example *pcs*, *kg*, or *cm*."""
|
|
231
|
+
|
|
232
|
+
discount_amount: Annotated[
|
|
233
|
+
Optional[Amount], pydantic.Field(alias="discountAmount")
|
|
234
|
+
] = None
|
|
235
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
236
|
+
|
|
237
|
+
vat_rate: Annotated[Optional[str], pydantic.Field(alias="vatRate")] = None
|
|
238
|
+
r"""The VAT rate applied to the line, for example `21.00` for 21%. The vatRate should be passed as a string and
|
|
239
|
+
not as a float, to ensure the correct number of decimals are passed.
|
|
240
|
+
"""
|
|
241
|
+
|
|
242
|
+
vat_amount: Annotated[Optional[Amount], pydantic.Field(alias="vatAmount")] = None
|
|
243
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
244
|
+
|
|
245
|
+
sku: Optional[str] = None
|
|
246
|
+
r"""The SKU, EAN, ISBN or UPC of the product sold."""
|
|
247
|
+
|
|
248
|
+
categories: Optional[
|
|
249
|
+
List[
|
|
250
|
+
Annotated[LineCategoriesResponse, PlainValidator(validate_open_enum(False))]
|
|
251
|
+
]
|
|
252
|
+
] = None
|
|
253
|
+
r"""An array with the voucher categories, in case of a line eligible for a voucher. See the
|
|
254
|
+
[Integrating Vouchers](https://docs.mollie.com/docs/integrating-vouchers/) guide for more information.
|
|
255
|
+
"""
|
|
256
|
+
|
|
257
|
+
image_url: Annotated[Optional[str], pydantic.Field(alias="imageUrl")] = None
|
|
258
|
+
r"""A link pointing to an image of the product sold."""
|
|
259
|
+
|
|
260
|
+
product_url: Annotated[Optional[str], pydantic.Field(alias="productUrl")] = None
|
|
261
|
+
r"""A link pointing to the product page in your web shop of the product sold."""
|
|
262
|
+
|
|
263
|
+
recurring: Optional[RecurringLineItem] = None
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
class PaymentResponseBillingAddressTypedDict(TypedDict):
|
|
267
|
+
r"""The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
268
|
+
conversion.
|
|
269
|
+
|
|
270
|
+
Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
271
|
+
`country`.
|
|
272
|
+
|
|
273
|
+
Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
274
|
+
"""
|
|
275
|
+
|
|
276
|
+
title: NotRequired[str]
|
|
277
|
+
r"""The title of the person, for example *Mr.* or *Mrs.*."""
|
|
278
|
+
given_name: NotRequired[str]
|
|
279
|
+
r"""The given name (first name) of the person should be at least two characters and cannot contain only
|
|
280
|
+
numbers.
|
|
281
|
+
|
|
282
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
283
|
+
"""
|
|
284
|
+
family_name: NotRequired[str]
|
|
285
|
+
r"""The given family name (surname) of the person should be at least two characters and cannot contain only
|
|
286
|
+
numbers.
|
|
287
|
+
|
|
288
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
289
|
+
"""
|
|
290
|
+
organization_name: NotRequired[Any]
|
|
291
|
+
r"""The name of the organization, in case the addressee is an organization.
|
|
292
|
+
|
|
293
|
+
Required for payment method `billie`.
|
|
294
|
+
"""
|
|
295
|
+
street_and_number: NotRequired[str]
|
|
296
|
+
r"""A street and street number.
|
|
297
|
+
|
|
298
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
299
|
+
"""
|
|
300
|
+
street_additional: NotRequired[str]
|
|
301
|
+
r"""Any additional addressing details, for example an apartment number."""
|
|
302
|
+
postal_code: NotRequired[str]
|
|
303
|
+
r"""A postal code. This field may be required if the provided country has a postal code system.
|
|
304
|
+
|
|
305
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
306
|
+
"""
|
|
307
|
+
email: NotRequired[str]
|
|
308
|
+
r"""A valid e-mail address.
|
|
309
|
+
|
|
310
|
+
If you provide the email address for a `banktransfer` payment, we will automatically send the instructions
|
|
311
|
+
email upon payment creation. The language of the email will follow the locale parameter of the payment.
|
|
312
|
+
|
|
313
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
314
|
+
"""
|
|
315
|
+
phone: NotRequired[str]
|
|
316
|
+
r"""If provided, it must be in the [E.164](https://en.wikipedia.org/wiki/E.164) format. For example: +31208202070."""
|
|
317
|
+
city: NotRequired[str]
|
|
318
|
+
r"""A city name.
|
|
319
|
+
|
|
320
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
321
|
+
"""
|
|
322
|
+
region: NotRequired[str]
|
|
323
|
+
r"""The top-level administrative subdivision of the country. For example: Noord-Holland."""
|
|
324
|
+
country: NotRequired[str]
|
|
325
|
+
r"""A country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
326
|
+
|
|
327
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
328
|
+
"""
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
class PaymentResponseBillingAddress(BaseModel):
|
|
332
|
+
r"""The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
333
|
+
conversion.
|
|
334
|
+
|
|
335
|
+
Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
336
|
+
`country`.
|
|
337
|
+
|
|
338
|
+
Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
339
|
+
"""
|
|
340
|
+
|
|
341
|
+
title: Optional[str] = None
|
|
342
|
+
r"""The title of the person, for example *Mr.* or *Mrs.*."""
|
|
343
|
+
|
|
344
|
+
given_name: Annotated[Optional[str], pydantic.Field(alias="givenName")] = None
|
|
345
|
+
r"""The given name (first name) of the person should be at least two characters and cannot contain only
|
|
346
|
+
numbers.
|
|
347
|
+
|
|
348
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
349
|
+
"""
|
|
350
|
+
|
|
351
|
+
family_name: Annotated[Optional[str], pydantic.Field(alias="familyName")] = None
|
|
352
|
+
r"""The given family name (surname) of the person should be at least two characters and cannot contain only
|
|
353
|
+
numbers.
|
|
354
|
+
|
|
355
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
356
|
+
"""
|
|
357
|
+
|
|
358
|
+
organization_name: Annotated[
|
|
359
|
+
Optional[Any], pydantic.Field(alias="organizationName")
|
|
360
|
+
] = None
|
|
361
|
+
r"""The name of the organization, in case the addressee is an organization.
|
|
362
|
+
|
|
363
|
+
Required for payment method `billie`.
|
|
364
|
+
"""
|
|
365
|
+
|
|
366
|
+
street_and_number: Annotated[
|
|
367
|
+
Optional[str], pydantic.Field(alias="streetAndNumber")
|
|
368
|
+
] = None
|
|
369
|
+
r"""A street and street number.
|
|
370
|
+
|
|
371
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
372
|
+
"""
|
|
373
|
+
|
|
374
|
+
street_additional: Annotated[
|
|
375
|
+
Optional[str], pydantic.Field(alias="streetAdditional")
|
|
376
|
+
] = None
|
|
377
|
+
r"""Any additional addressing details, for example an apartment number."""
|
|
378
|
+
|
|
379
|
+
postal_code: Annotated[Optional[str], pydantic.Field(alias="postalCode")] = None
|
|
380
|
+
r"""A postal code. This field may be required if the provided country has a postal code system.
|
|
381
|
+
|
|
382
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
383
|
+
"""
|
|
384
|
+
|
|
385
|
+
email: Optional[str] = None
|
|
386
|
+
r"""A valid e-mail address.
|
|
387
|
+
|
|
388
|
+
If you provide the email address for a `banktransfer` payment, we will automatically send the instructions
|
|
389
|
+
email upon payment creation. The language of the email will follow the locale parameter of the payment.
|
|
390
|
+
|
|
391
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
392
|
+
"""
|
|
393
|
+
|
|
394
|
+
phone: Optional[str] = None
|
|
395
|
+
r"""If provided, it must be in the [E.164](https://en.wikipedia.org/wiki/E.164) format. For example: +31208202070."""
|
|
396
|
+
|
|
397
|
+
city: Optional[str] = None
|
|
398
|
+
r"""A city name.
|
|
399
|
+
|
|
400
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
401
|
+
"""
|
|
402
|
+
|
|
403
|
+
region: Optional[str] = None
|
|
404
|
+
r"""The top-level administrative subdivision of the country. For example: Noord-Holland."""
|
|
405
|
+
|
|
406
|
+
country: Optional[str] = None
|
|
407
|
+
r"""A country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
408
|
+
|
|
409
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
410
|
+
"""
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
class PaymentResponseApplicationFeeTypedDict(TypedDict):
|
|
414
|
+
r"""With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
415
|
+
merchants.
|
|
416
|
+
|
|
417
|
+
If you use OAuth to create payments on a connected merchant's account, you can charge a fee using this
|
|
418
|
+
`applicationFee` parameter. If the payment succeeds, the fee will be deducted from the merchant's balance and sent
|
|
419
|
+
to your own account balance.
|
|
420
|
+
|
|
421
|
+
If instead you want to split a payment on your own account between yourself and a connected merchant, refer to the
|
|
422
|
+
`routing` parameter.
|
|
423
|
+
"""
|
|
424
|
+
|
|
425
|
+
amount: NotRequired[AmountTypedDict]
|
|
426
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
427
|
+
description: NotRequired[str]
|
|
428
|
+
r"""The description of the application fee. This will appear on settlement reports towards both you and the
|
|
429
|
+
connected merchant.
|
|
430
|
+
"""
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
class PaymentResponseApplicationFee(BaseModel):
|
|
434
|
+
r"""With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
435
|
+
merchants.
|
|
436
|
+
|
|
437
|
+
If you use OAuth to create payments on a connected merchant's account, you can charge a fee using this
|
|
438
|
+
`applicationFee` parameter. If the payment succeeds, the fee will be deducted from the merchant's balance and sent
|
|
439
|
+
to your own account balance.
|
|
440
|
+
|
|
441
|
+
If instead you want to split a payment on your own account between yourself and a connected merchant, refer to the
|
|
442
|
+
`routing` parameter.
|
|
443
|
+
"""
|
|
444
|
+
|
|
445
|
+
amount: Optional[Amount] = None
|
|
446
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
447
|
+
|
|
448
|
+
description: Optional[str] = None
|
|
449
|
+
r"""The description of the application fee. This will appear on settlement reports towards both you and the
|
|
450
|
+
connected merchant.
|
|
451
|
+
"""
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
class PaymentResponseStatus(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
455
|
+
r"""The payment's status. Refer to the [documentation regarding statuses](https://docs.mollie.com/docs/status-change#/) for more info about which
|
|
456
|
+
statuses occur at what point.
|
|
457
|
+
"""
|
|
458
|
+
|
|
459
|
+
OPEN = "open"
|
|
460
|
+
PENDING = "pending"
|
|
461
|
+
AUTHORIZED = "authorized"
|
|
462
|
+
PAID = "paid"
|
|
463
|
+
CANCELED = "canceled"
|
|
464
|
+
EXPIRED = "expired"
|
|
465
|
+
FAILED = "failed"
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
class PaymentResponseReceiptTypedDict(TypedDict):
|
|
469
|
+
r"""The Point of sale receipt object."""
|
|
470
|
+
|
|
471
|
+
authorization_code: NotRequired[Nullable[str]]
|
|
472
|
+
r"""A unique code provided by the cardholder’s bank to confirm that the transaction was successfully approved."""
|
|
473
|
+
application_identifier: NotRequired[Nullable[str]]
|
|
474
|
+
r"""The unique number that identifies a specific payment application on a chip card."""
|
|
475
|
+
card_read_method: NotRequired[Nullable[PaymentDetailsReceiptCardReadMethodResponse]]
|
|
476
|
+
r"""The method by which the card was read by the terminal."""
|
|
477
|
+
card_verification_method: NotRequired[
|
|
478
|
+
Nullable[PaymentDetailsReceiptCardVerificationMethodResponse]
|
|
479
|
+
]
|
|
480
|
+
r"""The method used to verify the cardholder's identity."""
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
class PaymentResponseReceipt(BaseModel):
|
|
484
|
+
r"""The Point of sale receipt object."""
|
|
485
|
+
|
|
486
|
+
authorization_code: Annotated[
|
|
487
|
+
OptionalNullable[str], pydantic.Field(alias="authorizationCode")
|
|
488
|
+
] = UNSET
|
|
489
|
+
r"""A unique code provided by the cardholder’s bank to confirm that the transaction was successfully approved."""
|
|
490
|
+
|
|
491
|
+
application_identifier: Annotated[
|
|
492
|
+
OptionalNullable[str], pydantic.Field(alias="applicationIdentifier")
|
|
493
|
+
] = UNSET
|
|
494
|
+
r"""The unique number that identifies a specific payment application on a chip card."""
|
|
495
|
+
|
|
496
|
+
card_read_method: Annotated[
|
|
497
|
+
Annotated[
|
|
498
|
+
OptionalNullable[PaymentDetailsReceiptCardReadMethodResponse],
|
|
499
|
+
PlainValidator(validate_open_enum(False)),
|
|
500
|
+
],
|
|
501
|
+
pydantic.Field(alias="cardReadMethod"),
|
|
502
|
+
] = UNSET
|
|
503
|
+
r"""The method by which the card was read by the terminal."""
|
|
504
|
+
|
|
505
|
+
card_verification_method: Annotated[
|
|
506
|
+
Annotated[
|
|
507
|
+
OptionalNullable[PaymentDetailsReceiptCardVerificationMethodResponse],
|
|
508
|
+
PlainValidator(validate_open_enum(False)),
|
|
509
|
+
],
|
|
510
|
+
pydantic.Field(alias="cardVerificationMethod"),
|
|
511
|
+
] = UNSET
|
|
512
|
+
r"""The method used to verify the cardholder's identity."""
|
|
513
|
+
|
|
514
|
+
@model_serializer(mode="wrap")
|
|
515
|
+
def serialize_model(self, handler):
|
|
516
|
+
optional_fields = [
|
|
517
|
+
"authorizationCode",
|
|
518
|
+
"applicationIdentifier",
|
|
519
|
+
"cardReadMethod",
|
|
520
|
+
"cardVerificationMethod",
|
|
521
|
+
]
|
|
522
|
+
nullable_fields = [
|
|
523
|
+
"authorizationCode",
|
|
524
|
+
"applicationIdentifier",
|
|
525
|
+
"cardReadMethod",
|
|
526
|
+
"cardVerificationMethod",
|
|
527
|
+
]
|
|
528
|
+
null_default_fields = []
|
|
529
|
+
|
|
530
|
+
serialized = handler(self)
|
|
531
|
+
|
|
532
|
+
m = {}
|
|
533
|
+
|
|
534
|
+
for n, f in type(self).model_fields.items():
|
|
535
|
+
k = f.alias or n
|
|
536
|
+
val = serialized.get(k)
|
|
537
|
+
serialized.pop(k, None)
|
|
538
|
+
|
|
539
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
540
|
+
is_set = (
|
|
541
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
542
|
+
or k in null_default_fields
|
|
543
|
+
) # pylint: disable=no-member
|
|
544
|
+
|
|
545
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
546
|
+
m[k] = val
|
|
547
|
+
elif val != UNSET_SENTINEL and (
|
|
548
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
549
|
+
):
|
|
550
|
+
m[k] = val
|
|
551
|
+
|
|
552
|
+
return m
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
class PaymentResponseQrCodeTypedDict(TypedDict):
|
|
556
|
+
r"""Optional include. If a QR code was requested during payment creation for a QR-compatible payment method,
|
|
557
|
+
the QR code details will be available in this object.
|
|
558
|
+
|
|
559
|
+
The QR code can be scanned by the customer to complete the payment on their mobile device. For example,
|
|
560
|
+
Bancontact QR payments can be completed by the customer using the Bancontact app.
|
|
561
|
+
"""
|
|
562
|
+
|
|
563
|
+
height: NotRequired[int]
|
|
564
|
+
r"""The height of the QR code image in pixels."""
|
|
565
|
+
width: NotRequired[int]
|
|
566
|
+
r"""The width of the QR code image in pixels."""
|
|
567
|
+
src: NotRequired[str]
|
|
568
|
+
r"""The URL to the QR code image. The image is a PNG file, and can be displayed directly in the browser or
|
|
569
|
+
downloaded.
|
|
570
|
+
"""
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
class PaymentResponseQrCode(BaseModel):
|
|
574
|
+
r"""Optional include. If a QR code was requested during payment creation for a QR-compatible payment method,
|
|
575
|
+
the QR code details will be available in this object.
|
|
576
|
+
|
|
577
|
+
The QR code can be scanned by the customer to complete the payment on their mobile device. For example,
|
|
578
|
+
Bancontact QR payments can be completed by the customer using the Bancontact app.
|
|
579
|
+
"""
|
|
580
|
+
|
|
581
|
+
height: Optional[int] = None
|
|
582
|
+
r"""The height of the QR code image in pixels."""
|
|
583
|
+
|
|
584
|
+
width: Optional[int] = None
|
|
585
|
+
r"""The width of the QR code image in pixels."""
|
|
586
|
+
|
|
587
|
+
src: Optional[str] = None
|
|
588
|
+
r"""The URL to the QR code image. The image is a PNG file, and can be displayed directly in the browser or
|
|
589
|
+
downloaded.
|
|
590
|
+
"""
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
class PaymentResponseDetailsTypedDict(TypedDict):
|
|
594
|
+
r"""An object containing payment details collected during the payment process. For example, details may include the
|
|
595
|
+
customer's card or bank details and a payment reference. For the full list of details, please refer to the
|
|
596
|
+
[method-specific parameters](extra-payment-parameters) guide.
|
|
597
|
+
"""
|
|
598
|
+
|
|
599
|
+
consumer_name: NotRequired[Nullable[str]]
|
|
600
|
+
r"""The customer's name, if made available by the payment method. For card payments, refer to details.cardHolder."""
|
|
601
|
+
consumer_account: NotRequired[Nullable[str]]
|
|
602
|
+
r"""The customer's account reference.
|
|
603
|
+
|
|
604
|
+
For banking-based payment methods — such as iDEAL — this is normally either an IBAN or a domestic bank account
|
|
605
|
+
number.
|
|
606
|
+
|
|
607
|
+
For PayPal, the account reference is an email address.
|
|
608
|
+
|
|
609
|
+
For card and Bancontact payments, refer to details.cardNumber.
|
|
610
|
+
"""
|
|
611
|
+
consumer_bic: NotRequired[Nullable[str]]
|
|
612
|
+
r"""The BIC of the customer's bank account, if applicable."""
|
|
613
|
+
shipping_address: NotRequired[Nullable[Dict[str, Any]]]
|
|
614
|
+
r"""For wallet payment methods — such as Apple Pay and PayPal — the shipping address is often already known by the
|
|
615
|
+
wallet provider. In these cases the shipping address may be available as a payment detail.
|
|
616
|
+
"""
|
|
617
|
+
card_number: NotRequired[Nullable[str]]
|
|
618
|
+
r"""For bancontact, it will be the customer's masked card number. For cards, it will be the last 4-digit of the
|
|
619
|
+
PAN. For Point-of-sale, it will be the the last 4 digits of the customer's masked card number.
|
|
620
|
+
"""
|
|
621
|
+
bank_name: NotRequired[str]
|
|
622
|
+
r"""The name of the bank that the customer will need to make the bank transfer payment towards."""
|
|
623
|
+
bank_account: NotRequired[str]
|
|
624
|
+
r"""The bank account number the customer will need to make the bank transfer payment towards."""
|
|
625
|
+
bank_bic: NotRequired[str]
|
|
626
|
+
r"""The BIC of the bank the customer will need to make the bank transfer payment towards."""
|
|
627
|
+
transfer_reference: NotRequired[Nullable[str]]
|
|
628
|
+
r"""The Mollie-generated reference the customer needs to use when transfering the amount. Do not apply any
|
|
629
|
+
formatting here; show it to the customer as-is.
|
|
630
|
+
"""
|
|
631
|
+
card_fingerprint: NotRequired[Nullable[str]]
|
|
632
|
+
r"""A unique fingerprint for a specific card. Can be used to identify returning customers.
|
|
633
|
+
|
|
634
|
+
In the case of Point-of-sale payments, it's a unique identifier assigned to a cardholder's payment account,
|
|
635
|
+
linking multiple transactions from wallets and physical card to a single account, also across payment methods
|
|
636
|
+
or when the card is reissued.
|
|
637
|
+
"""
|
|
638
|
+
card_holder: NotRequired[Nullable[str]]
|
|
639
|
+
r"""The customer's name as shown on their card."""
|
|
640
|
+
card_audition: NotRequired[Nullable[PaymentDetailsCardAuditionResponse]]
|
|
641
|
+
r"""The card's target audience, if known."""
|
|
642
|
+
card_label: NotRequired[Nullable[PaymentDetailsCardLabelResponse]]
|
|
643
|
+
r"""The card's label, if known."""
|
|
644
|
+
card_country_code: NotRequired[Nullable[str]]
|
|
645
|
+
r"""The ISO 3166-1 alpha-2 country code of the country the card was issued in."""
|
|
646
|
+
card_expiry_date: NotRequired[Nullable[str]]
|
|
647
|
+
r"""The expiry date (MM/YY) of the card as displayed on the card."""
|
|
648
|
+
card_funding: NotRequired[Nullable[PaymentDetailsCardFundingResponse]]
|
|
649
|
+
r"""The card type."""
|
|
650
|
+
card_security: NotRequired[Nullable[PaymentDetailsCardSecurityResponse]]
|
|
651
|
+
r"""The level of security applied during card processing."""
|
|
652
|
+
fee_region: NotRequired[Nullable[PaymentDetailsFeeRegionResponse]]
|
|
653
|
+
r"""The applicable card fee region."""
|
|
654
|
+
card_masked_number: NotRequired[Nullable[str]]
|
|
655
|
+
r"""The first 6 and last 4 digits of the card number."""
|
|
656
|
+
card3ds_eci: NotRequired[Nullable[str]]
|
|
657
|
+
r"""The outcome of authentication attempted on transactions enforced by 3DS (ie valid only for oneoff and first)."""
|
|
658
|
+
card_bin: NotRequired[Nullable[str]]
|
|
659
|
+
r"""The first 6 digit of the card bank identification number."""
|
|
660
|
+
card_issuer: NotRequired[Nullable[str]]
|
|
661
|
+
r"""The issuer of the Card."""
|
|
662
|
+
failure_reason: NotRequired[Nullable[PaymentDetailsFailureReasonResponse]]
|
|
663
|
+
r"""A failure code to help understand why the payment failed."""
|
|
664
|
+
failure_message: NotRequired[Nullable[str]]
|
|
665
|
+
r"""A human-friendly failure message that can be shown to the customer. The message is translated in accordance
|
|
666
|
+
with the payment's locale setting.
|
|
667
|
+
"""
|
|
668
|
+
wallet: NotRequired[Nullable[PaymentDetailsWalletResponse]]
|
|
669
|
+
r"""The wallet used when creating the payment."""
|
|
670
|
+
paypal_reference: NotRequired[Nullable[str]]
|
|
671
|
+
r"""PayPal's reference for the payment."""
|
|
672
|
+
paypal_payer_id: NotRequired[Nullable[str]]
|
|
673
|
+
r"""ID of the customer's PayPal account."""
|
|
674
|
+
seller_protection: NotRequired[Nullable[PaymentDetailsSellerProtectionResponse]]
|
|
675
|
+
r"""Indicates to what extent the payment is eligible for PayPal's Seller Protection. Only available for PayPal
|
|
676
|
+
payments, and if the information is made available by PayPal.
|
|
677
|
+
"""
|
|
678
|
+
paypal_fee: NotRequired[Nullable[AmountNullableTypedDict]]
|
|
679
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
680
|
+
customer_reference: NotRequired[str]
|
|
681
|
+
r"""The paysafecard customer reference either provided via the API or otherwise auto-generated by Mollie."""
|
|
682
|
+
terminal_id: NotRequired[str]
|
|
683
|
+
r"""The ID of the terminal device where the payment took place on."""
|
|
684
|
+
masked_number: NotRequired[Nullable[str]]
|
|
685
|
+
r"""The first 6 digits & last 4 digits of the customer's masked card number."""
|
|
686
|
+
receipt: NotRequired[PaymentResponseReceiptTypedDict]
|
|
687
|
+
r"""The Point of sale receipt object."""
|
|
688
|
+
creditor_identifier: NotRequired[Nullable[str]]
|
|
689
|
+
r"""The creditor identifier indicates who is authorized to execute the payment. In this case, it is a
|
|
690
|
+
reference to Mollie.
|
|
691
|
+
"""
|
|
692
|
+
due_date: NotRequired[Nullable[date]]
|
|
693
|
+
r"""Estimated date the payment is debited from the customer's bank account, in YYYY-MM-DD format."""
|
|
694
|
+
signature_date: NotRequired[Nullable[date]]
|
|
695
|
+
r"""Date the payment has been signed by the customer, in YYYY-MM-DD format. Only available if the payment
|
|
696
|
+
has been signed.
|
|
697
|
+
"""
|
|
698
|
+
bank_reason_code: NotRequired[Nullable[str]]
|
|
699
|
+
r"""The official reason why this payment has failed. A detailed description of each reason is available on the
|
|
700
|
+
website of the European Payments Council.
|
|
701
|
+
"""
|
|
702
|
+
bank_reason: NotRequired[Nullable[str]]
|
|
703
|
+
r"""A human-friendly description of the failure reason."""
|
|
704
|
+
end_to_end_identifier: NotRequired[Nullable[str]]
|
|
705
|
+
r"""The end-to-end identifier you provided in the batch file."""
|
|
706
|
+
mandate_reference: NotRequired[Nullable[str]]
|
|
707
|
+
r"""The mandate reference you provided in the batch file."""
|
|
708
|
+
batch_reference: NotRequired[Nullable[str]]
|
|
709
|
+
r"""The batch reference you provided in the batch file."""
|
|
710
|
+
file_reference: NotRequired[Nullable[str]]
|
|
711
|
+
r"""The file reference you provided in the batch file."""
|
|
712
|
+
qr_code: NotRequired[PaymentResponseQrCodeTypedDict]
|
|
713
|
+
r"""Optional include. If a QR code was requested during payment creation for a QR-compatible payment method,
|
|
714
|
+
the QR code details will be available in this object.
|
|
715
|
+
|
|
716
|
+
The QR code can be scanned by the customer to complete the payment on their mobile device. For example,
|
|
717
|
+
Bancontact QR payments can be completed by the customer using the Bancontact app.
|
|
718
|
+
"""
|
|
719
|
+
voucher_number: NotRequired[str]
|
|
720
|
+
r"""For payments with gift cards: the masked gift card number of the first gift card applied to the payment."""
|
|
721
|
+
giftcards: NotRequired[List[Dict[str, Any]]]
|
|
722
|
+
r"""An array of detail objects for each gift card that was used on this payment, if any."""
|
|
723
|
+
issuer: NotRequired[str]
|
|
724
|
+
r"""For payments with vouchers: the brand name of the first voucher applied."""
|
|
725
|
+
vouchers: NotRequired[List[Dict[str, Any]]]
|
|
726
|
+
r"""An array of detail objects for each voucher that was used on this payment, if any."""
|
|
727
|
+
remainder_amount: NotRequired[AmountTypedDict]
|
|
728
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
729
|
+
remainder_method: NotRequired[str]
|
|
730
|
+
r"""The payment method used to pay the remainder amount, after all gift cards or vouchers were applied."""
|
|
731
|
+
remainder_details: NotRequired[Dict[str, Any]]
|
|
732
|
+
r"""Optional include. The full payment method details of the remainder payment."""
|
|
733
|
+
multibanco_reference: NotRequired[Nullable[str]]
|
|
734
|
+
r"""Multibanco payment reference of the transaction"""
|
|
735
|
+
multibanco_entity: NotRequired[Nullable[str]]
|
|
736
|
+
r"""Multibanco entity reference of the transaction"""
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
class PaymentResponseDetails(BaseModel):
|
|
740
|
+
r"""An object containing payment details collected during the payment process. For example, details may include the
|
|
741
|
+
customer's card or bank details and a payment reference. For the full list of details, please refer to the
|
|
742
|
+
[method-specific parameters](extra-payment-parameters) guide.
|
|
743
|
+
"""
|
|
744
|
+
|
|
745
|
+
consumer_name: Annotated[
|
|
746
|
+
OptionalNullable[str], pydantic.Field(alias="consumerName")
|
|
747
|
+
] = UNSET
|
|
748
|
+
r"""The customer's name, if made available by the payment method. For card payments, refer to details.cardHolder."""
|
|
749
|
+
|
|
750
|
+
consumer_account: Annotated[
|
|
751
|
+
OptionalNullable[str], pydantic.Field(alias="consumerAccount")
|
|
752
|
+
] = UNSET
|
|
753
|
+
r"""The customer's account reference.
|
|
754
|
+
|
|
755
|
+
For banking-based payment methods — such as iDEAL — this is normally either an IBAN or a domestic bank account
|
|
756
|
+
number.
|
|
757
|
+
|
|
758
|
+
For PayPal, the account reference is an email address.
|
|
759
|
+
|
|
760
|
+
For card and Bancontact payments, refer to details.cardNumber.
|
|
761
|
+
"""
|
|
762
|
+
|
|
763
|
+
consumer_bic: Annotated[
|
|
764
|
+
OptionalNullable[str], pydantic.Field(alias="consumerBic")
|
|
765
|
+
] = UNSET
|
|
766
|
+
r"""The BIC of the customer's bank account, if applicable."""
|
|
767
|
+
|
|
768
|
+
shipping_address: Annotated[
|
|
769
|
+
OptionalNullable[Dict[str, Any]], pydantic.Field(alias="shippingAddress")
|
|
770
|
+
] = UNSET
|
|
771
|
+
r"""For wallet payment methods — such as Apple Pay and PayPal — the shipping address is often already known by the
|
|
772
|
+
wallet provider. In these cases the shipping address may be available as a payment detail.
|
|
773
|
+
"""
|
|
774
|
+
|
|
775
|
+
card_number: Annotated[
|
|
776
|
+
OptionalNullable[str], pydantic.Field(alias="cardNumber")
|
|
777
|
+
] = UNSET
|
|
778
|
+
r"""For bancontact, it will be the customer's masked card number. For cards, it will be the last 4-digit of the
|
|
779
|
+
PAN. For Point-of-sale, it will be the the last 4 digits of the customer's masked card number.
|
|
780
|
+
"""
|
|
781
|
+
|
|
782
|
+
bank_name: Annotated[Optional[str], pydantic.Field(alias="bankName")] = None
|
|
783
|
+
r"""The name of the bank that the customer will need to make the bank transfer payment towards."""
|
|
784
|
+
|
|
785
|
+
bank_account: Annotated[Optional[str], pydantic.Field(alias="bankAccount")] = None
|
|
786
|
+
r"""The bank account number the customer will need to make the bank transfer payment towards."""
|
|
787
|
+
|
|
788
|
+
bank_bic: Annotated[Optional[str], pydantic.Field(alias="bankBic")] = None
|
|
789
|
+
r"""The BIC of the bank the customer will need to make the bank transfer payment towards."""
|
|
790
|
+
|
|
791
|
+
transfer_reference: Annotated[
|
|
792
|
+
OptionalNullable[str], pydantic.Field(alias="transferReference")
|
|
793
|
+
] = UNSET
|
|
794
|
+
r"""The Mollie-generated reference the customer needs to use when transfering the amount. Do not apply any
|
|
795
|
+
formatting here; show it to the customer as-is.
|
|
796
|
+
"""
|
|
797
|
+
|
|
798
|
+
card_fingerprint: Annotated[
|
|
799
|
+
OptionalNullable[str], pydantic.Field(alias="cardFingerprint")
|
|
800
|
+
] = UNSET
|
|
801
|
+
r"""A unique fingerprint for a specific card. Can be used to identify returning customers.
|
|
802
|
+
|
|
803
|
+
In the case of Point-of-sale payments, it's a unique identifier assigned to a cardholder's payment account,
|
|
804
|
+
linking multiple transactions from wallets and physical card to a single account, also across payment methods
|
|
805
|
+
or when the card is reissued.
|
|
806
|
+
"""
|
|
807
|
+
|
|
808
|
+
card_holder: Annotated[
|
|
809
|
+
OptionalNullable[str], pydantic.Field(alias="cardHolder")
|
|
810
|
+
] = UNSET
|
|
811
|
+
r"""The customer's name as shown on their card."""
|
|
812
|
+
|
|
813
|
+
card_audition: Annotated[
|
|
814
|
+
Annotated[
|
|
815
|
+
OptionalNullable[PaymentDetailsCardAuditionResponse],
|
|
816
|
+
PlainValidator(validate_open_enum(False)),
|
|
817
|
+
],
|
|
818
|
+
pydantic.Field(alias="cardAudition"),
|
|
819
|
+
] = UNSET
|
|
820
|
+
r"""The card's target audience, if known."""
|
|
821
|
+
|
|
822
|
+
card_label: Annotated[
|
|
823
|
+
Annotated[
|
|
824
|
+
OptionalNullable[PaymentDetailsCardLabelResponse],
|
|
825
|
+
PlainValidator(validate_open_enum(False)),
|
|
826
|
+
],
|
|
827
|
+
pydantic.Field(alias="cardLabel"),
|
|
828
|
+
] = UNSET
|
|
829
|
+
r"""The card's label, if known."""
|
|
830
|
+
|
|
831
|
+
card_country_code: Annotated[
|
|
832
|
+
OptionalNullable[str], pydantic.Field(alias="cardCountryCode")
|
|
833
|
+
] = UNSET
|
|
834
|
+
r"""The ISO 3166-1 alpha-2 country code of the country the card was issued in."""
|
|
835
|
+
|
|
836
|
+
card_expiry_date: Annotated[
|
|
837
|
+
OptionalNullable[str], pydantic.Field(alias="cardExpiryDate")
|
|
838
|
+
] = UNSET
|
|
839
|
+
r"""The expiry date (MM/YY) of the card as displayed on the card."""
|
|
840
|
+
|
|
841
|
+
card_funding: Annotated[
|
|
842
|
+
Annotated[
|
|
843
|
+
OptionalNullable[PaymentDetailsCardFundingResponse],
|
|
844
|
+
PlainValidator(validate_open_enum(False)),
|
|
845
|
+
],
|
|
846
|
+
pydantic.Field(alias="cardFunding"),
|
|
847
|
+
] = UNSET
|
|
848
|
+
r"""The card type."""
|
|
849
|
+
|
|
850
|
+
card_security: Annotated[
|
|
851
|
+
Annotated[
|
|
852
|
+
OptionalNullable[PaymentDetailsCardSecurityResponse],
|
|
853
|
+
PlainValidator(validate_open_enum(False)),
|
|
854
|
+
],
|
|
855
|
+
pydantic.Field(alias="cardSecurity"),
|
|
856
|
+
] = UNSET
|
|
857
|
+
r"""The level of security applied during card processing."""
|
|
858
|
+
|
|
859
|
+
fee_region: Annotated[
|
|
860
|
+
Annotated[
|
|
861
|
+
OptionalNullable[PaymentDetailsFeeRegionResponse],
|
|
862
|
+
PlainValidator(validate_open_enum(False)),
|
|
863
|
+
],
|
|
864
|
+
pydantic.Field(alias="feeRegion"),
|
|
865
|
+
] = UNSET
|
|
866
|
+
r"""The applicable card fee region."""
|
|
867
|
+
|
|
868
|
+
card_masked_number: Annotated[
|
|
869
|
+
OptionalNullable[str], pydantic.Field(alias="cardMaskedNumber")
|
|
870
|
+
] = UNSET
|
|
871
|
+
r"""The first 6 and last 4 digits of the card number."""
|
|
872
|
+
|
|
873
|
+
card3ds_eci: Annotated[
|
|
874
|
+
OptionalNullable[str], pydantic.Field(alias="card3dsEci")
|
|
875
|
+
] = UNSET
|
|
876
|
+
r"""The outcome of authentication attempted on transactions enforced by 3DS (ie valid only for oneoff and first)."""
|
|
877
|
+
|
|
878
|
+
card_bin: Annotated[OptionalNullable[str], pydantic.Field(alias="cardBin")] = UNSET
|
|
879
|
+
r"""The first 6 digit of the card bank identification number."""
|
|
880
|
+
|
|
881
|
+
card_issuer: Annotated[
|
|
882
|
+
OptionalNullable[str], pydantic.Field(alias="cardIssuer")
|
|
883
|
+
] = UNSET
|
|
884
|
+
r"""The issuer of the Card."""
|
|
885
|
+
|
|
886
|
+
failure_reason: Annotated[
|
|
887
|
+
Annotated[
|
|
888
|
+
OptionalNullable[PaymentDetailsFailureReasonResponse],
|
|
889
|
+
PlainValidator(validate_open_enum(False)),
|
|
890
|
+
],
|
|
891
|
+
pydantic.Field(alias="failureReason"),
|
|
892
|
+
] = UNSET
|
|
893
|
+
r"""A failure code to help understand why the payment failed."""
|
|
894
|
+
|
|
895
|
+
failure_message: Annotated[
|
|
896
|
+
OptionalNullable[str], pydantic.Field(alias="failureMessage")
|
|
897
|
+
] = UNSET
|
|
898
|
+
r"""A human-friendly failure message that can be shown to the customer. The message is translated in accordance
|
|
899
|
+
with the payment's locale setting.
|
|
900
|
+
"""
|
|
901
|
+
|
|
902
|
+
wallet: Annotated[
|
|
903
|
+
OptionalNullable[PaymentDetailsWalletResponse],
|
|
904
|
+
PlainValidator(validate_open_enum(False)),
|
|
905
|
+
] = UNSET
|
|
906
|
+
r"""The wallet used when creating the payment."""
|
|
907
|
+
|
|
908
|
+
paypal_reference: Annotated[
|
|
909
|
+
OptionalNullable[str], pydantic.Field(alias="paypalReference")
|
|
910
|
+
] = UNSET
|
|
911
|
+
r"""PayPal's reference for the payment."""
|
|
912
|
+
|
|
913
|
+
paypal_payer_id: Annotated[
|
|
914
|
+
OptionalNullable[str], pydantic.Field(alias="paypalPayerId")
|
|
915
|
+
] = UNSET
|
|
916
|
+
r"""ID of the customer's PayPal account."""
|
|
917
|
+
|
|
918
|
+
seller_protection: Annotated[
|
|
919
|
+
Annotated[
|
|
920
|
+
OptionalNullable[PaymentDetailsSellerProtectionResponse],
|
|
921
|
+
PlainValidator(validate_open_enum(False)),
|
|
922
|
+
],
|
|
923
|
+
pydantic.Field(alias="sellerProtection"),
|
|
924
|
+
] = UNSET
|
|
925
|
+
r"""Indicates to what extent the payment is eligible for PayPal's Seller Protection. Only available for PayPal
|
|
926
|
+
payments, and if the information is made available by PayPal.
|
|
927
|
+
"""
|
|
928
|
+
|
|
929
|
+
paypal_fee: Annotated[
|
|
930
|
+
OptionalNullable[AmountNullable], pydantic.Field(alias="paypalFee")
|
|
931
|
+
] = UNSET
|
|
932
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
933
|
+
|
|
934
|
+
customer_reference: Annotated[
|
|
935
|
+
Optional[str], pydantic.Field(alias="customerReference")
|
|
936
|
+
] = None
|
|
937
|
+
r"""The paysafecard customer reference either provided via the API or otherwise auto-generated by Mollie."""
|
|
938
|
+
|
|
939
|
+
terminal_id: Annotated[Optional[str], pydantic.Field(alias="terminalId")] = None
|
|
940
|
+
r"""The ID of the terminal device where the payment took place on."""
|
|
941
|
+
|
|
942
|
+
masked_number: Annotated[
|
|
943
|
+
OptionalNullable[str], pydantic.Field(alias="maskedNumber")
|
|
944
|
+
] = UNSET
|
|
945
|
+
r"""The first 6 digits & last 4 digits of the customer's masked card number."""
|
|
946
|
+
|
|
947
|
+
receipt: Optional[PaymentResponseReceipt] = None
|
|
948
|
+
r"""The Point of sale receipt object."""
|
|
949
|
+
|
|
950
|
+
creditor_identifier: Annotated[
|
|
951
|
+
OptionalNullable[str], pydantic.Field(alias="creditorIdentifier")
|
|
952
|
+
] = UNSET
|
|
953
|
+
r"""The creditor identifier indicates who is authorized to execute the payment. In this case, it is a
|
|
954
|
+
reference to Mollie.
|
|
955
|
+
"""
|
|
956
|
+
|
|
957
|
+
due_date: Annotated[OptionalNullable[date], pydantic.Field(alias="dueDate")] = UNSET
|
|
958
|
+
r"""Estimated date the payment is debited from the customer's bank account, in YYYY-MM-DD format."""
|
|
959
|
+
|
|
960
|
+
signature_date: Annotated[
|
|
961
|
+
OptionalNullable[date], pydantic.Field(alias="signatureDate")
|
|
962
|
+
] = UNSET
|
|
963
|
+
r"""Date the payment has been signed by the customer, in YYYY-MM-DD format. Only available if the payment
|
|
964
|
+
has been signed.
|
|
965
|
+
"""
|
|
966
|
+
|
|
967
|
+
bank_reason_code: Annotated[
|
|
968
|
+
OptionalNullable[str], pydantic.Field(alias="bankReasonCode")
|
|
969
|
+
] = UNSET
|
|
970
|
+
r"""The official reason why this payment has failed. A detailed description of each reason is available on the
|
|
971
|
+
website of the European Payments Council.
|
|
972
|
+
"""
|
|
973
|
+
|
|
974
|
+
bank_reason: Annotated[
|
|
975
|
+
OptionalNullable[str], pydantic.Field(alias="bankReason")
|
|
976
|
+
] = UNSET
|
|
977
|
+
r"""A human-friendly description of the failure reason."""
|
|
978
|
+
|
|
979
|
+
end_to_end_identifier: Annotated[
|
|
980
|
+
OptionalNullable[str], pydantic.Field(alias="endToEndIdentifier")
|
|
981
|
+
] = UNSET
|
|
982
|
+
r"""The end-to-end identifier you provided in the batch file."""
|
|
983
|
+
|
|
984
|
+
mandate_reference: Annotated[
|
|
985
|
+
OptionalNullable[str], pydantic.Field(alias="mandateReference")
|
|
986
|
+
] = UNSET
|
|
987
|
+
r"""The mandate reference you provided in the batch file."""
|
|
988
|
+
|
|
989
|
+
batch_reference: Annotated[
|
|
990
|
+
OptionalNullable[str], pydantic.Field(alias="batchReference")
|
|
991
|
+
] = UNSET
|
|
992
|
+
r"""The batch reference you provided in the batch file."""
|
|
993
|
+
|
|
994
|
+
file_reference: Annotated[
|
|
995
|
+
OptionalNullable[str], pydantic.Field(alias="fileReference")
|
|
996
|
+
] = UNSET
|
|
997
|
+
r"""The file reference you provided in the batch file."""
|
|
998
|
+
|
|
999
|
+
qr_code: Annotated[
|
|
1000
|
+
Optional[PaymentResponseQrCode], pydantic.Field(alias="qrCode")
|
|
1001
|
+
] = None
|
|
1002
|
+
r"""Optional include. If a QR code was requested during payment creation for a QR-compatible payment method,
|
|
1003
|
+
the QR code details will be available in this object.
|
|
1004
|
+
|
|
1005
|
+
The QR code can be scanned by the customer to complete the payment on their mobile device. For example,
|
|
1006
|
+
Bancontact QR payments can be completed by the customer using the Bancontact app.
|
|
1007
|
+
"""
|
|
1008
|
+
|
|
1009
|
+
voucher_number: Annotated[Optional[str], pydantic.Field(alias="voucherNumber")] = (
|
|
1010
|
+
None
|
|
1011
|
+
)
|
|
1012
|
+
r"""For payments with gift cards: the masked gift card number of the first gift card applied to the payment."""
|
|
1013
|
+
|
|
1014
|
+
giftcards: Optional[List[Dict[str, Any]]] = None
|
|
1015
|
+
r"""An array of detail objects for each gift card that was used on this payment, if any."""
|
|
1016
|
+
|
|
1017
|
+
issuer: Optional[str] = None
|
|
1018
|
+
r"""For payments with vouchers: the brand name of the first voucher applied."""
|
|
1019
|
+
|
|
1020
|
+
vouchers: Optional[List[Dict[str, Any]]] = None
|
|
1021
|
+
r"""An array of detail objects for each voucher that was used on this payment, if any."""
|
|
1022
|
+
|
|
1023
|
+
remainder_amount: Annotated[
|
|
1024
|
+
Optional[Amount], pydantic.Field(alias="remainderAmount")
|
|
1025
|
+
] = None
|
|
1026
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
1027
|
+
|
|
1028
|
+
remainder_method: Annotated[
|
|
1029
|
+
Optional[str], pydantic.Field(alias="remainderMethod")
|
|
1030
|
+
] = None
|
|
1031
|
+
r"""The payment method used to pay the remainder amount, after all gift cards or vouchers were applied."""
|
|
1032
|
+
|
|
1033
|
+
remainder_details: Annotated[
|
|
1034
|
+
Optional[Dict[str, Any]], pydantic.Field(alias="remainderDetails")
|
|
1035
|
+
] = None
|
|
1036
|
+
r"""Optional include. The full payment method details of the remainder payment."""
|
|
1037
|
+
|
|
1038
|
+
multibanco_reference: Annotated[
|
|
1039
|
+
OptionalNullable[str], pydantic.Field(alias="multibancoReference")
|
|
1040
|
+
] = UNSET
|
|
1041
|
+
r"""Multibanco payment reference of the transaction"""
|
|
1042
|
+
|
|
1043
|
+
multibanco_entity: Annotated[
|
|
1044
|
+
OptionalNullable[str], pydantic.Field(alias="multibancoEntity")
|
|
1045
|
+
] = UNSET
|
|
1046
|
+
r"""Multibanco entity reference of the transaction"""
|
|
1047
|
+
|
|
1048
|
+
@model_serializer(mode="wrap")
|
|
1049
|
+
def serialize_model(self, handler):
|
|
1050
|
+
optional_fields = [
|
|
1051
|
+
"consumerName",
|
|
1052
|
+
"consumerAccount",
|
|
1053
|
+
"consumerBic",
|
|
1054
|
+
"shippingAddress",
|
|
1055
|
+
"cardNumber",
|
|
1056
|
+
"bankName",
|
|
1057
|
+
"bankAccount",
|
|
1058
|
+
"bankBic",
|
|
1059
|
+
"transferReference",
|
|
1060
|
+
"cardFingerprint",
|
|
1061
|
+
"cardHolder",
|
|
1062
|
+
"cardAudition",
|
|
1063
|
+
"cardLabel",
|
|
1064
|
+
"cardCountryCode",
|
|
1065
|
+
"cardExpiryDate",
|
|
1066
|
+
"cardFunding",
|
|
1067
|
+
"cardSecurity",
|
|
1068
|
+
"feeRegion",
|
|
1069
|
+
"cardMaskedNumber",
|
|
1070
|
+
"card3dsEci",
|
|
1071
|
+
"cardBin",
|
|
1072
|
+
"cardIssuer",
|
|
1073
|
+
"failureReason",
|
|
1074
|
+
"failureMessage",
|
|
1075
|
+
"wallet",
|
|
1076
|
+
"paypalReference",
|
|
1077
|
+
"paypalPayerId",
|
|
1078
|
+
"sellerProtection",
|
|
1079
|
+
"paypalFee",
|
|
1080
|
+
"customerReference",
|
|
1081
|
+
"terminalId",
|
|
1082
|
+
"maskedNumber",
|
|
1083
|
+
"receipt",
|
|
1084
|
+
"creditorIdentifier",
|
|
1085
|
+
"dueDate",
|
|
1086
|
+
"signatureDate",
|
|
1087
|
+
"bankReasonCode",
|
|
1088
|
+
"bankReason",
|
|
1089
|
+
"endToEndIdentifier",
|
|
1090
|
+
"mandateReference",
|
|
1091
|
+
"batchReference",
|
|
1092
|
+
"fileReference",
|
|
1093
|
+
"qrCode",
|
|
1094
|
+
"voucherNumber",
|
|
1095
|
+
"giftcards",
|
|
1096
|
+
"issuer",
|
|
1097
|
+
"vouchers",
|
|
1098
|
+
"remainderAmount",
|
|
1099
|
+
"remainderMethod",
|
|
1100
|
+
"remainderDetails",
|
|
1101
|
+
"multibancoReference",
|
|
1102
|
+
"multibancoEntity",
|
|
1103
|
+
]
|
|
1104
|
+
nullable_fields = [
|
|
1105
|
+
"consumerName",
|
|
1106
|
+
"consumerAccount",
|
|
1107
|
+
"consumerBic",
|
|
1108
|
+
"shippingAddress",
|
|
1109
|
+
"cardNumber",
|
|
1110
|
+
"transferReference",
|
|
1111
|
+
"cardFingerprint",
|
|
1112
|
+
"cardHolder",
|
|
1113
|
+
"cardAudition",
|
|
1114
|
+
"cardLabel",
|
|
1115
|
+
"cardCountryCode",
|
|
1116
|
+
"cardExpiryDate",
|
|
1117
|
+
"cardFunding",
|
|
1118
|
+
"cardSecurity",
|
|
1119
|
+
"feeRegion",
|
|
1120
|
+
"cardMaskedNumber",
|
|
1121
|
+
"card3dsEci",
|
|
1122
|
+
"cardBin",
|
|
1123
|
+
"cardIssuer",
|
|
1124
|
+
"failureReason",
|
|
1125
|
+
"failureMessage",
|
|
1126
|
+
"wallet",
|
|
1127
|
+
"paypalReference",
|
|
1128
|
+
"paypalPayerId",
|
|
1129
|
+
"sellerProtection",
|
|
1130
|
+
"paypalFee",
|
|
1131
|
+
"maskedNumber",
|
|
1132
|
+
"creditorIdentifier",
|
|
1133
|
+
"dueDate",
|
|
1134
|
+
"signatureDate",
|
|
1135
|
+
"bankReasonCode",
|
|
1136
|
+
"bankReason",
|
|
1137
|
+
"endToEndIdentifier",
|
|
1138
|
+
"mandateReference",
|
|
1139
|
+
"batchReference",
|
|
1140
|
+
"fileReference",
|
|
1141
|
+
"multibancoReference",
|
|
1142
|
+
"multibancoEntity",
|
|
1143
|
+
]
|
|
1144
|
+
null_default_fields = []
|
|
1145
|
+
|
|
1146
|
+
serialized = handler(self)
|
|
1147
|
+
|
|
1148
|
+
m = {}
|
|
1149
|
+
|
|
1150
|
+
for n, f in type(self).model_fields.items():
|
|
1151
|
+
k = f.alias or n
|
|
1152
|
+
val = serialized.get(k)
|
|
1153
|
+
serialized.pop(k, None)
|
|
1154
|
+
|
|
1155
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
1156
|
+
is_set = (
|
|
1157
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
1158
|
+
or k in null_default_fields
|
|
1159
|
+
) # pylint: disable=no-member
|
|
1160
|
+
|
|
1161
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
1162
|
+
m[k] = val
|
|
1163
|
+
elif val != UNSET_SENTINEL and (
|
|
1164
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
1165
|
+
):
|
|
1166
|
+
m[k] = val
|
|
1167
|
+
|
|
1168
|
+
return m
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
class PaymentResponseLinksTypedDict(TypedDict):
|
|
1172
|
+
r"""An object with several relevant URLs. Every URL object will contain an `href` and a `type` field."""
|
|
1173
|
+
|
|
1174
|
+
self_: URLTypedDict
|
|
1175
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1176
|
+
dashboard: URLTypedDict
|
|
1177
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1178
|
+
checkout: NotRequired[URLTypedDict]
|
|
1179
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1180
|
+
mobile_app_checkout: NotRequired[URLTypedDict]
|
|
1181
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1182
|
+
change_payment_state: NotRequired[URLTypedDict]
|
|
1183
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1184
|
+
refunds: NotRequired[URLTypedDict]
|
|
1185
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1186
|
+
chargebacks: NotRequired[URLTypedDict]
|
|
1187
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1188
|
+
captures: NotRequired[URLTypedDict]
|
|
1189
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1190
|
+
settlement: NotRequired[URLTypedDict]
|
|
1191
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1192
|
+
customer: NotRequired[URLTypedDict]
|
|
1193
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1194
|
+
mandate: NotRequired[URLTypedDict]
|
|
1195
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1196
|
+
subscription: NotRequired[URLTypedDict]
|
|
1197
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1198
|
+
order: NotRequired[URLTypedDict]
|
|
1199
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1200
|
+
terminal: NotRequired[URLTypedDict]
|
|
1201
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1202
|
+
documentation: NotRequired[URLTypedDict]
|
|
1203
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1204
|
+
status: NotRequired[URLTypedDict]
|
|
1205
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1206
|
+
pay_online: NotRequired[URLTypedDict]
|
|
1207
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
class PaymentResponseLinks(BaseModel):
|
|
1211
|
+
r"""An object with several relevant URLs. Every URL object will contain an `href` and a `type` field."""
|
|
1212
|
+
|
|
1213
|
+
self_: Annotated[URL, pydantic.Field(alias="self")]
|
|
1214
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1215
|
+
|
|
1216
|
+
dashboard: URL
|
|
1217
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1218
|
+
|
|
1219
|
+
checkout: Optional[URL] = None
|
|
1220
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1221
|
+
|
|
1222
|
+
mobile_app_checkout: Annotated[
|
|
1223
|
+
Optional[URL], pydantic.Field(alias="mobileAppCheckout")
|
|
1224
|
+
] = None
|
|
1225
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1226
|
+
|
|
1227
|
+
change_payment_state: Annotated[
|
|
1228
|
+
Optional[URL], pydantic.Field(alias="changePaymentState")
|
|
1229
|
+
] = None
|
|
1230
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1231
|
+
|
|
1232
|
+
refunds: Optional[URL] = None
|
|
1233
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1234
|
+
|
|
1235
|
+
chargebacks: Optional[URL] = None
|
|
1236
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1237
|
+
|
|
1238
|
+
captures: Optional[URL] = None
|
|
1239
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1240
|
+
|
|
1241
|
+
settlement: Optional[URL] = None
|
|
1242
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1243
|
+
|
|
1244
|
+
customer: Optional[URL] = None
|
|
1245
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1246
|
+
|
|
1247
|
+
mandate: Optional[URL] = None
|
|
1248
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1249
|
+
|
|
1250
|
+
subscription: Optional[URL] = None
|
|
1251
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1252
|
+
|
|
1253
|
+
order: Optional[URL] = None
|
|
1254
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1255
|
+
|
|
1256
|
+
terminal: Optional[URL] = None
|
|
1257
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1258
|
+
|
|
1259
|
+
documentation: Optional[URL] = None
|
|
1260
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1261
|
+
|
|
1262
|
+
status: Optional[URL] = None
|
|
1263
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1264
|
+
|
|
1265
|
+
pay_online: Annotated[Optional[URL], pydantic.Field(alias="payOnline")] = None
|
|
1266
|
+
r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
class PaymentResponseTypedDict(TypedDict):
|
|
1270
|
+
resource: str
|
|
1271
|
+
r"""Indicates the response contains a payment object. Will always contain the string `payment` for this endpoint."""
|
|
1272
|
+
id: str
|
|
1273
|
+
r"""The identifier uniquely referring to this payment. Mollie assigns this identifier at payment creation time. Mollie
|
|
1274
|
+
will always refer to the payment by this ID. Example: `tr_5B8cwPMGnU6qLbRvo7qEZo`.
|
|
1275
|
+
"""
|
|
1276
|
+
mode: Mode
|
|
1277
|
+
r"""Whether this entity was created in live mode or in test mode."""
|
|
1278
|
+
description: str
|
|
1279
|
+
r"""The description of the payment. This will be shown to your customer on their card or bank statement when possible.
|
|
1280
|
+
We truncate the description automatically according to the limits of the used payment method. The description is
|
|
1281
|
+
also visible in any exports you generate.
|
|
1282
|
+
|
|
1283
|
+
We recommend you use a unique identifier so that you can always link the payment to the order in your back office.
|
|
1284
|
+
This is particularly useful for bookkeeping.
|
|
1285
|
+
|
|
1286
|
+
The maximum length of the description field differs per payment method, with the absolute maximum being 255
|
|
1287
|
+
characters. The API will not reject strings longer than the maximum length but it will truncate them to fit.
|
|
1288
|
+
"""
|
|
1289
|
+
amount: AmountTypedDict
|
|
1290
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
1291
|
+
sequence_type: SequenceTypeResponse
|
|
1292
|
+
profile_id: str
|
|
1293
|
+
r"""The identifier referring to the [profile](get-profile) this entity belongs to.
|
|
1294
|
+
|
|
1295
|
+
Most API credentials are linked to a single profile. In these cases the `profileId` can be omitted in the creation
|
|
1296
|
+
request. For organization-level credentials such as OAuth access tokens however, the `profileId` parameter is
|
|
1297
|
+
required.
|
|
1298
|
+
"""
|
|
1299
|
+
status: PaymentResponseStatus
|
|
1300
|
+
created_at: str
|
|
1301
|
+
r"""The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."""
|
|
1302
|
+
links: PaymentResponseLinksTypedDict
|
|
1303
|
+
r"""An object with several relevant URLs. Every URL object will contain an `href` and a `type` field."""
|
|
1304
|
+
amount_refunded: NotRequired[PaymentResponseAmountRefundedTypedDict]
|
|
1305
|
+
r"""The total amount that is already refunded. Only available when refunds are available for this payment. For some
|
|
1306
|
+
payment methods, this amount may be higher than the payment amount, for example to allow reimbursement of the
|
|
1307
|
+
costs for a return shipment to the customer.
|
|
1308
|
+
"""
|
|
1309
|
+
amount_remaining: NotRequired[PaymentResponseAmountRemainingTypedDict]
|
|
1310
|
+
r"""The remaining amount that can be refunded. Only available when refunds are available for this payment."""
|
|
1311
|
+
amount_captured: NotRequired[PaymentResponseAmountCapturedTypedDict]
|
|
1312
|
+
r"""The total amount that is already captured for this payment. Only available when this payment supports captures."""
|
|
1313
|
+
amount_charged_back: NotRequired[PaymentResponseAmountChargedBackTypedDict]
|
|
1314
|
+
r"""The total amount that was charged back for this payment. Only available when the total charged back amount is not
|
|
1315
|
+
zero.
|
|
1316
|
+
"""
|
|
1317
|
+
settlement_amount: NotRequired[PaymentResponseSettlementAmountTypedDict]
|
|
1318
|
+
r"""This optional field will contain the approximate amount that will be settled to your account, converted to the
|
|
1319
|
+
currency your account is settled in.
|
|
1320
|
+
|
|
1321
|
+
Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal or gift cards. If no amount is
|
|
1322
|
+
settled by Mollie the `settlementAmount` is omitted from the response.
|
|
1323
|
+
|
|
1324
|
+
Please note that this amount might be recalculated and changed when the status of the payment changes. We suggest
|
|
1325
|
+
using the List balance transactions endpoint instead to get more accurate settlement amounts for your payments.
|
|
1326
|
+
"""
|
|
1327
|
+
redirect_url: NotRequired[Nullable[str]]
|
|
1328
|
+
r"""The URL your customer will be redirected to after the payment process.
|
|
1329
|
+
|
|
1330
|
+
It could make sense for the redirectUrl to contain a unique identifier – like your order ID – so you can show the
|
|
1331
|
+
right page referencing the order when your customer returns.
|
|
1332
|
+
|
|
1333
|
+
The parameter is normally required, but can be omitted for recurring payments (`sequenceType: recurring`) and for
|
|
1334
|
+
Apple Pay payments with an `applePayPaymentToken`.
|
|
1335
|
+
"""
|
|
1336
|
+
cancel_url: NotRequired[Nullable[str]]
|
|
1337
|
+
r"""The URL your customer will be redirected to when the customer explicitly cancels the payment. If this URL is not
|
|
1338
|
+
provided, the customer will be redirected to the `redirectUrl` instead — see above.
|
|
1339
|
+
|
|
1340
|
+
Mollie will always give you status updates via webhooks, including for the canceled status. This parameter is
|
|
1341
|
+
therefore entirely optional, but can be useful when implementing a dedicated customer-facing flow to handle
|
|
1342
|
+
payment cancellations.
|
|
1343
|
+
"""
|
|
1344
|
+
webhook_url: NotRequired[Nullable[str]]
|
|
1345
|
+
r"""The webhook URL where we will send payment status updates to.
|
|
1346
|
+
|
|
1347
|
+
The webhookUrl is optional, but without a webhook you will miss out on important status changes to your payment.
|
|
1348
|
+
|
|
1349
|
+
The webhookUrl must be reachable from Mollie's point of view, so you cannot use `localhost`. If you want to use
|
|
1350
|
+
webhook during development on `localhost`, you must use a tool like ngrok to have the webhooks delivered to your
|
|
1351
|
+
local machine.
|
|
1352
|
+
"""
|
|
1353
|
+
lines: NotRequired[Nullable[List[PaymentResponseLineTypedDict]]]
|
|
1354
|
+
r"""Optionally provide the order lines for the payment. Each line contains details such as a description of the item
|
|
1355
|
+
ordered and its price.
|
|
1356
|
+
|
|
1357
|
+
All lines must have the same currency as the payment.
|
|
1358
|
+
|
|
1359
|
+
Required for payment methods `billie`, `in3`, `klarna`, `riverty` and `voucher`.
|
|
1360
|
+
"""
|
|
1361
|
+
billing_address: NotRequired[PaymentResponseBillingAddressTypedDict]
|
|
1362
|
+
r"""The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
1363
|
+
conversion.
|
|
1364
|
+
|
|
1365
|
+
Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
1366
|
+
`country`.
|
|
1367
|
+
|
|
1368
|
+
Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
1369
|
+
"""
|
|
1370
|
+
shipping_address: NotRequired[PaymentAddressTypedDict]
|
|
1371
|
+
locale: NotRequired[Nullable[LocaleResponse]]
|
|
1372
|
+
r"""Allows you to preset the language to be used."""
|
|
1373
|
+
country_code: NotRequired[Nullable[str]]
|
|
1374
|
+
r"""This optional field contains your customer's ISO 3166-1 alpha-2 country code, detected by us during checkout. This
|
|
1375
|
+
field is omitted if the country code was not detected.
|
|
1376
|
+
"""
|
|
1377
|
+
method: NotRequired[Nullable[MethodResponse]]
|
|
1378
|
+
r"""Normally, a payment method screen is shown. However, when using this parameter, you can choose a specific payment
|
|
1379
|
+
method and your customer will skip the selection screen and is sent directly to the chosen payment method. The
|
|
1380
|
+
parameter enables you to fully integrate the payment method selection into your website.
|
|
1381
|
+
|
|
1382
|
+
You can also specify the methods in an array. By doing so we will still show the payment method selection screen
|
|
1383
|
+
but will only show the methods specified in the array. For example, you can use this functionality to only show
|
|
1384
|
+
payment methods from a specific country to your customer `['bancontact', 'belfius']`.
|
|
1385
|
+
"""
|
|
1386
|
+
restrict_payment_methods_to_country: NotRequired[Nullable[str]]
|
|
1387
|
+
r"""For digital goods in most jurisdictions, you must apply the VAT rate from your customer's country. Choose the VAT
|
|
1388
|
+
rates you have used for the order to ensure your customer's country matches the VAT country.
|
|
1389
|
+
|
|
1390
|
+
Use this parameter to restrict the payment methods available to your customer to those from a single country.
|
|
1391
|
+
|
|
1392
|
+
If available, the credit card method will still be offered, but only cards from the allowed country are accepted.
|
|
1393
|
+
|
|
1394
|
+
The field expects a country code in ISO 3166-1 alpha-2 format, for example `NL`.
|
|
1395
|
+
"""
|
|
1396
|
+
metadata: NotRequired[Nullable[MetadataTypedDict]]
|
|
1397
|
+
r"""Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever
|
|
1398
|
+
you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
|
|
1399
|
+
"""
|
|
1400
|
+
capture_mode: NotRequired[Nullable[CaptureModeResponse]]
|
|
1401
|
+
r"""Indicate if the funds should be captured immediately or if you want to [place a hold](https://docs.mollie.com/docs/place-a-hold-for-a-payment#/)
|
|
1402
|
+
and capture at a later time.
|
|
1403
|
+
|
|
1404
|
+
This field needs to be set to `manual` for method `riverty`.
|
|
1405
|
+
"""
|
|
1406
|
+
capture_delay: NotRequired[Nullable[str]]
|
|
1407
|
+
r"""**Only relevant if you wish to manage authorization and capturing separately.**
|
|
1408
|
+
|
|
1409
|
+
Some payment methods allow placing a hold on the card or bank account. This hold or 'authorization' can then at a
|
|
1410
|
+
later point either be 'captured' or canceled.
|
|
1411
|
+
|
|
1412
|
+
By default, we charge the customer's card or bank account immediately when they complete the payment. If you set a
|
|
1413
|
+
capture delay however, we will delay the automatic capturing of the payment for the specified amount of time. For
|
|
1414
|
+
example `8 hours` or `2 days`.
|
|
1415
|
+
|
|
1416
|
+
To schedule an automatic capture, the `captureMode` must be set to `automatic`.
|
|
1417
|
+
|
|
1418
|
+
The maximum delay is 7 days (168 hours).
|
|
1419
|
+
|
|
1420
|
+
Possible values: `... hours` `... days`
|
|
1421
|
+
"""
|
|
1422
|
+
capture_before: NotRequired[Nullable[str]]
|
|
1423
|
+
r"""Indicates the date before which the payment needs to be captured, in ISO 8601 format. From this date onwards we
|
|
1424
|
+
can no longer guarantee a successful capture. The parameter is omitted if the payment is not authorized (yet).
|
|
1425
|
+
"""
|
|
1426
|
+
application_fee: NotRequired[Nullable[PaymentResponseApplicationFeeTypedDict]]
|
|
1427
|
+
r"""With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
1428
|
+
merchants.
|
|
1429
|
+
|
|
1430
|
+
If you use OAuth to create payments on a connected merchant's account, you can charge a fee using this
|
|
1431
|
+
`applicationFee` parameter. If the payment succeeds, the fee will be deducted from the merchant's balance and sent
|
|
1432
|
+
to your own account balance.
|
|
1433
|
+
|
|
1434
|
+
If instead you want to split a payment on your own account between yourself and a connected merchant, refer to the
|
|
1435
|
+
`routing` parameter.
|
|
1436
|
+
"""
|
|
1437
|
+
routing: NotRequired[Nullable[List[EntityPaymentRouteResponseTypedDict]]]
|
|
1438
|
+
r"""*This functionality is not enabled by default. Reach out to our partner management team if you wish to use it.*
|
|
1439
|
+
|
|
1440
|
+
With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
1441
|
+
merchants.
|
|
1442
|
+
|
|
1443
|
+
If you create payments on your own account that you want to split between yourself and one or more connected
|
|
1444
|
+
merchants, you can use this `routing` parameter to route the payment accordingly.
|
|
1445
|
+
|
|
1446
|
+
The `routing` parameter should contain an array of objects, with each object describing the destination for a
|
|
1447
|
+
specific portion of the payment.
|
|
1448
|
+
|
|
1449
|
+
It is not necessary to indicate in the array which portion goes to yourself. After all portions of the total
|
|
1450
|
+
payment amount have been routed, the amount left will be routed to the current organization automatically.
|
|
1451
|
+
|
|
1452
|
+
If instead you use OAuth to create payments on a connected merchant's account, refer to the `applicationFee`
|
|
1453
|
+
parameter.
|
|
1454
|
+
"""
|
|
1455
|
+
subscription_id: NotRequired[Nullable[str]]
|
|
1456
|
+
r"""If the payment was automatically created via a subscription, the ID of the [subscription](get-subscription) will
|
|
1457
|
+
be added to the response.
|
|
1458
|
+
"""
|
|
1459
|
+
mandate_id: NotRequired[Nullable[str]]
|
|
1460
|
+
r"""**Only relevant for recurring payments.**
|
|
1461
|
+
|
|
1462
|
+
When creating recurring payments, the ID of a specific [mandate](get-mandate) can be supplied to indicate which of
|
|
1463
|
+
the customer's accounts should be credited.
|
|
1464
|
+
"""
|
|
1465
|
+
customer_id: NotRequired[str]
|
|
1466
|
+
settlement_id: NotRequired[Nullable[str]]
|
|
1467
|
+
r"""The identifier referring to the [settlement](get-settlement) this payment was settled with."""
|
|
1468
|
+
order_id: NotRequired[Nullable[str]]
|
|
1469
|
+
r"""If the payment was created for an [order](get-order), the ID of that order will be part of the response."""
|
|
1470
|
+
status_reason: NotRequired[Nullable[StatusReasonTypedDict]]
|
|
1471
|
+
r"""This object offers details about the status of a payment. Currently it is only available for point-of-sale
|
|
1472
|
+
payments.
|
|
1473
|
+
|
|
1474
|
+
You can find more information about the possible values of this object on
|
|
1475
|
+
[this page](status-reasons).**
|
|
1476
|
+
"""
|
|
1477
|
+
is_cancelable: NotRequired[Nullable[bool]]
|
|
1478
|
+
r"""Whether the payment can be canceled. This parameter is omitted if the payment reaches a final state."""
|
|
1479
|
+
details: NotRequired[Nullable[PaymentResponseDetailsTypedDict]]
|
|
1480
|
+
r"""An object containing payment details collected during the payment process. For example, details may include the
|
|
1481
|
+
customer's card or bank details and a payment reference. For the full list of details, please refer to the
|
|
1482
|
+
[method-specific parameters](extra-payment-parameters) guide.
|
|
1483
|
+
"""
|
|
1484
|
+
authorized_at: NotRequired[Nullable[str]]
|
|
1485
|
+
r"""The date and time the payment became authorized, in ISO 8601 format. This parameter is omitted if the payment is
|
|
1486
|
+
not authorized (yet).
|
|
1487
|
+
"""
|
|
1488
|
+
paid_at: NotRequired[Nullable[str]]
|
|
1489
|
+
r"""The date and time the payment became paid, in ISO 8601 format. This parameter is omitted if the payment is not
|
|
1490
|
+
completed (yet).
|
|
1491
|
+
"""
|
|
1492
|
+
canceled_at: NotRequired[Nullable[str]]
|
|
1493
|
+
r"""The date and time the payment was canceled, in ISO 8601 format. This parameter is omitted if the payment is not
|
|
1494
|
+
canceled (yet).
|
|
1495
|
+
"""
|
|
1496
|
+
expires_at: NotRequired[Nullable[str]]
|
|
1497
|
+
r"""The date and time the payment will expire, in ISO 8601 format. This parameter is omitted if the payment can no
|
|
1498
|
+
longer expire.
|
|
1499
|
+
"""
|
|
1500
|
+
expired_at: NotRequired[Nullable[str]]
|
|
1501
|
+
r"""The date and time the payment was expired, in ISO 8601 format. This parameter is omitted if the payment did not
|
|
1502
|
+
expire (yet).
|
|
1503
|
+
"""
|
|
1504
|
+
failed_at: NotRequired[Nullable[str]]
|
|
1505
|
+
r"""The date and time the payment failed, in ISO 8601 format. This parameter is omitted if the payment did not fail
|
|
1506
|
+
(yet).
|
|
1507
|
+
"""
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
class PaymentResponse(BaseModel):
|
|
1511
|
+
resource: str
|
|
1512
|
+
r"""Indicates the response contains a payment object. Will always contain the string `payment` for this endpoint."""
|
|
1513
|
+
|
|
1514
|
+
id: str
|
|
1515
|
+
r"""The identifier uniquely referring to this payment. Mollie assigns this identifier at payment creation time. Mollie
|
|
1516
|
+
will always refer to the payment by this ID. Example: `tr_5B8cwPMGnU6qLbRvo7qEZo`.
|
|
1517
|
+
"""
|
|
1518
|
+
|
|
1519
|
+
mode: Annotated[Mode, PlainValidator(validate_open_enum(False))]
|
|
1520
|
+
r"""Whether this entity was created in live mode or in test mode."""
|
|
1521
|
+
|
|
1522
|
+
description: str
|
|
1523
|
+
r"""The description of the payment. This will be shown to your customer on their card or bank statement when possible.
|
|
1524
|
+
We truncate the description automatically according to the limits of the used payment method. The description is
|
|
1525
|
+
also visible in any exports you generate.
|
|
1526
|
+
|
|
1527
|
+
We recommend you use a unique identifier so that you can always link the payment to the order in your back office.
|
|
1528
|
+
This is particularly useful for bookkeeping.
|
|
1529
|
+
|
|
1530
|
+
The maximum length of the description field differs per payment method, with the absolute maximum being 255
|
|
1531
|
+
characters. The API will not reject strings longer than the maximum length but it will truncate them to fit.
|
|
1532
|
+
"""
|
|
1533
|
+
|
|
1534
|
+
amount: Amount
|
|
1535
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
1536
|
+
|
|
1537
|
+
sequence_type: Annotated[
|
|
1538
|
+
Annotated[SequenceTypeResponse, PlainValidator(validate_open_enum(False))],
|
|
1539
|
+
pydantic.Field(alias="sequenceType"),
|
|
1540
|
+
]
|
|
1541
|
+
|
|
1542
|
+
profile_id: Annotated[str, pydantic.Field(alias="profileId")]
|
|
1543
|
+
r"""The identifier referring to the [profile](get-profile) this entity belongs to.
|
|
1544
|
+
|
|
1545
|
+
Most API credentials are linked to a single profile. In these cases the `profileId` can be omitted in the creation
|
|
1546
|
+
request. For organization-level credentials such as OAuth access tokens however, the `profileId` parameter is
|
|
1547
|
+
required.
|
|
1548
|
+
"""
|
|
1549
|
+
|
|
1550
|
+
status: Annotated[PaymentResponseStatus, PlainValidator(validate_open_enum(False))]
|
|
1551
|
+
|
|
1552
|
+
created_at: Annotated[str, pydantic.Field(alias="createdAt")]
|
|
1553
|
+
r"""The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."""
|
|
1554
|
+
|
|
1555
|
+
links: Annotated[PaymentResponseLinks, pydantic.Field(alias="_links")]
|
|
1556
|
+
r"""An object with several relevant URLs. Every URL object will contain an `href` and a `type` field."""
|
|
1557
|
+
|
|
1558
|
+
amount_refunded: Annotated[
|
|
1559
|
+
Optional[PaymentResponseAmountRefunded], pydantic.Field(alias="amountRefunded")
|
|
1560
|
+
] = None
|
|
1561
|
+
r"""The total amount that is already refunded. Only available when refunds are available for this payment. For some
|
|
1562
|
+
payment methods, this amount may be higher than the payment amount, for example to allow reimbursement of the
|
|
1563
|
+
costs for a return shipment to the customer.
|
|
1564
|
+
"""
|
|
1565
|
+
|
|
1566
|
+
amount_remaining: Annotated[
|
|
1567
|
+
Optional[PaymentResponseAmountRemaining],
|
|
1568
|
+
pydantic.Field(alias="amountRemaining"),
|
|
1569
|
+
] = None
|
|
1570
|
+
r"""The remaining amount that can be refunded. Only available when refunds are available for this payment."""
|
|
1571
|
+
|
|
1572
|
+
amount_captured: Annotated[
|
|
1573
|
+
Optional[PaymentResponseAmountCaptured], pydantic.Field(alias="amountCaptured")
|
|
1574
|
+
] = None
|
|
1575
|
+
r"""The total amount that is already captured for this payment. Only available when this payment supports captures."""
|
|
1576
|
+
|
|
1577
|
+
amount_charged_back: Annotated[
|
|
1578
|
+
Optional[PaymentResponseAmountChargedBack],
|
|
1579
|
+
pydantic.Field(alias="amountChargedBack"),
|
|
1580
|
+
] = None
|
|
1581
|
+
r"""The total amount that was charged back for this payment. Only available when the total charged back amount is not
|
|
1582
|
+
zero.
|
|
1583
|
+
"""
|
|
1584
|
+
|
|
1585
|
+
settlement_amount: Annotated[
|
|
1586
|
+
Optional[PaymentResponseSettlementAmount],
|
|
1587
|
+
pydantic.Field(alias="settlementAmount"),
|
|
1588
|
+
] = None
|
|
1589
|
+
r"""This optional field will contain the approximate amount that will be settled to your account, converted to the
|
|
1590
|
+
currency your account is settled in.
|
|
1591
|
+
|
|
1592
|
+
Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal or gift cards. If no amount is
|
|
1593
|
+
settled by Mollie the `settlementAmount` is omitted from the response.
|
|
1594
|
+
|
|
1595
|
+
Please note that this amount might be recalculated and changed when the status of the payment changes. We suggest
|
|
1596
|
+
using the List balance transactions endpoint instead to get more accurate settlement amounts for your payments.
|
|
1597
|
+
"""
|
|
1598
|
+
|
|
1599
|
+
redirect_url: Annotated[
|
|
1600
|
+
OptionalNullable[str], pydantic.Field(alias="redirectUrl")
|
|
1601
|
+
] = UNSET
|
|
1602
|
+
r"""The URL your customer will be redirected to after the payment process.
|
|
1603
|
+
|
|
1604
|
+
It could make sense for the redirectUrl to contain a unique identifier – like your order ID – so you can show the
|
|
1605
|
+
right page referencing the order when your customer returns.
|
|
1606
|
+
|
|
1607
|
+
The parameter is normally required, but can be omitted for recurring payments (`sequenceType: recurring`) and for
|
|
1608
|
+
Apple Pay payments with an `applePayPaymentToken`.
|
|
1609
|
+
"""
|
|
1610
|
+
|
|
1611
|
+
cancel_url: Annotated[OptionalNullable[str], pydantic.Field(alias="cancelUrl")] = (
|
|
1612
|
+
UNSET
|
|
1613
|
+
)
|
|
1614
|
+
r"""The URL your customer will be redirected to when the customer explicitly cancels the payment. If this URL is not
|
|
1615
|
+
provided, the customer will be redirected to the `redirectUrl` instead — see above.
|
|
1616
|
+
|
|
1617
|
+
Mollie will always give you status updates via webhooks, including for the canceled status. This parameter is
|
|
1618
|
+
therefore entirely optional, but can be useful when implementing a dedicated customer-facing flow to handle
|
|
1619
|
+
payment cancellations.
|
|
1620
|
+
"""
|
|
1621
|
+
|
|
1622
|
+
webhook_url: Annotated[
|
|
1623
|
+
OptionalNullable[str], pydantic.Field(alias="webhookUrl")
|
|
1624
|
+
] = UNSET
|
|
1625
|
+
r"""The webhook URL where we will send payment status updates to.
|
|
1626
|
+
|
|
1627
|
+
The webhookUrl is optional, but without a webhook you will miss out on important status changes to your payment.
|
|
1628
|
+
|
|
1629
|
+
The webhookUrl must be reachable from Mollie's point of view, so you cannot use `localhost`. If you want to use
|
|
1630
|
+
webhook during development on `localhost`, you must use a tool like ngrok to have the webhooks delivered to your
|
|
1631
|
+
local machine.
|
|
1632
|
+
"""
|
|
1633
|
+
|
|
1634
|
+
lines: OptionalNullable[List[PaymentResponseLine]] = UNSET
|
|
1635
|
+
r"""Optionally provide the order lines for the payment. Each line contains details such as a description of the item
|
|
1636
|
+
ordered and its price.
|
|
1637
|
+
|
|
1638
|
+
All lines must have the same currency as the payment.
|
|
1639
|
+
|
|
1640
|
+
Required for payment methods `billie`, `in3`, `klarna`, `riverty` and `voucher`.
|
|
1641
|
+
"""
|
|
1642
|
+
|
|
1643
|
+
billing_address: Annotated[
|
|
1644
|
+
Optional[PaymentResponseBillingAddress], pydantic.Field(alias="billingAddress")
|
|
1645
|
+
] = None
|
|
1646
|
+
r"""The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
1647
|
+
conversion.
|
|
1648
|
+
|
|
1649
|
+
Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
1650
|
+
`country`.
|
|
1651
|
+
|
|
1652
|
+
Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
1653
|
+
"""
|
|
1654
|
+
|
|
1655
|
+
shipping_address: Annotated[
|
|
1656
|
+
Optional[PaymentAddress], pydantic.Field(alias="shippingAddress")
|
|
1657
|
+
] = None
|
|
1658
|
+
|
|
1659
|
+
locale: Annotated[
|
|
1660
|
+
OptionalNullable[LocaleResponse], PlainValidator(validate_open_enum(False))
|
|
1661
|
+
] = UNSET
|
|
1662
|
+
r"""Allows you to preset the language to be used."""
|
|
1663
|
+
|
|
1664
|
+
country_code: Annotated[
|
|
1665
|
+
OptionalNullable[str], pydantic.Field(alias="countryCode")
|
|
1666
|
+
] = UNSET
|
|
1667
|
+
r"""This optional field contains your customer's ISO 3166-1 alpha-2 country code, detected by us during checkout. This
|
|
1668
|
+
field is omitted if the country code was not detected.
|
|
1669
|
+
"""
|
|
1670
|
+
|
|
1671
|
+
method: Annotated[
|
|
1672
|
+
OptionalNullable[MethodResponse], PlainValidator(validate_open_enum(False))
|
|
1673
|
+
] = UNSET
|
|
1674
|
+
r"""Normally, a payment method screen is shown. However, when using this parameter, you can choose a specific payment
|
|
1675
|
+
method and your customer will skip the selection screen and is sent directly to the chosen payment method. The
|
|
1676
|
+
parameter enables you to fully integrate the payment method selection into your website.
|
|
1677
|
+
|
|
1678
|
+
You can also specify the methods in an array. By doing so we will still show the payment method selection screen
|
|
1679
|
+
but will only show the methods specified in the array. For example, you can use this functionality to only show
|
|
1680
|
+
payment methods from a specific country to your customer `['bancontact', 'belfius']`.
|
|
1681
|
+
"""
|
|
1682
|
+
|
|
1683
|
+
restrict_payment_methods_to_country: Annotated[
|
|
1684
|
+
OptionalNullable[str], pydantic.Field(alias="restrictPaymentMethodsToCountry")
|
|
1685
|
+
] = UNSET
|
|
1686
|
+
r"""For digital goods in most jurisdictions, you must apply the VAT rate from your customer's country. Choose the VAT
|
|
1687
|
+
rates you have used for the order to ensure your customer's country matches the VAT country.
|
|
1688
|
+
|
|
1689
|
+
Use this parameter to restrict the payment methods available to your customer to those from a single country.
|
|
1690
|
+
|
|
1691
|
+
If available, the credit card method will still be offered, but only cards from the allowed country are accepted.
|
|
1692
|
+
|
|
1693
|
+
The field expects a country code in ISO 3166-1 alpha-2 format, for example `NL`.
|
|
1694
|
+
"""
|
|
1695
|
+
|
|
1696
|
+
metadata: OptionalNullable[Metadata] = UNSET
|
|
1697
|
+
r"""Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever
|
|
1698
|
+
you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
|
|
1699
|
+
"""
|
|
1700
|
+
|
|
1701
|
+
capture_mode: Annotated[
|
|
1702
|
+
Annotated[
|
|
1703
|
+
OptionalNullable[CaptureModeResponse],
|
|
1704
|
+
PlainValidator(validate_open_enum(False)),
|
|
1705
|
+
],
|
|
1706
|
+
pydantic.Field(alias="captureMode"),
|
|
1707
|
+
] = UNSET
|
|
1708
|
+
r"""Indicate if the funds should be captured immediately or if you want to [place a hold](https://docs.mollie.com/docs/place-a-hold-for-a-payment#/)
|
|
1709
|
+
and capture at a later time.
|
|
1710
|
+
|
|
1711
|
+
This field needs to be set to `manual` for method `riverty`.
|
|
1712
|
+
"""
|
|
1713
|
+
|
|
1714
|
+
capture_delay: Annotated[
|
|
1715
|
+
OptionalNullable[str], pydantic.Field(alias="captureDelay")
|
|
1716
|
+
] = UNSET
|
|
1717
|
+
r"""**Only relevant if you wish to manage authorization and capturing separately.**
|
|
1718
|
+
|
|
1719
|
+
Some payment methods allow placing a hold on the card or bank account. This hold or 'authorization' can then at a
|
|
1720
|
+
later point either be 'captured' or canceled.
|
|
1721
|
+
|
|
1722
|
+
By default, we charge the customer's card or bank account immediately when they complete the payment. If you set a
|
|
1723
|
+
capture delay however, we will delay the automatic capturing of the payment for the specified amount of time. For
|
|
1724
|
+
example `8 hours` or `2 days`.
|
|
1725
|
+
|
|
1726
|
+
To schedule an automatic capture, the `captureMode` must be set to `automatic`.
|
|
1727
|
+
|
|
1728
|
+
The maximum delay is 7 days (168 hours).
|
|
1729
|
+
|
|
1730
|
+
Possible values: `... hours` `... days`
|
|
1731
|
+
"""
|
|
1732
|
+
|
|
1733
|
+
capture_before: Annotated[
|
|
1734
|
+
OptionalNullable[str], pydantic.Field(alias="captureBefore")
|
|
1735
|
+
] = UNSET
|
|
1736
|
+
r"""Indicates the date before which the payment needs to be captured, in ISO 8601 format. From this date onwards we
|
|
1737
|
+
can no longer guarantee a successful capture. The parameter is omitted if the payment is not authorized (yet).
|
|
1738
|
+
"""
|
|
1739
|
+
|
|
1740
|
+
application_fee: Annotated[
|
|
1741
|
+
OptionalNullable[PaymentResponseApplicationFee],
|
|
1742
|
+
pydantic.Field(alias="applicationFee"),
|
|
1743
|
+
] = UNSET
|
|
1744
|
+
r"""With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
1745
|
+
merchants.
|
|
1746
|
+
|
|
1747
|
+
If you use OAuth to create payments on a connected merchant's account, you can charge a fee using this
|
|
1748
|
+
`applicationFee` parameter. If the payment succeeds, the fee will be deducted from the merchant's balance and sent
|
|
1749
|
+
to your own account balance.
|
|
1750
|
+
|
|
1751
|
+
If instead you want to split a payment on your own account between yourself and a connected merchant, refer to the
|
|
1752
|
+
`routing` parameter.
|
|
1753
|
+
"""
|
|
1754
|
+
|
|
1755
|
+
routing: OptionalNullable[List[EntityPaymentRouteResponse]] = UNSET
|
|
1756
|
+
r"""*This functionality is not enabled by default. Reach out to our partner management team if you wish to use it.*
|
|
1757
|
+
|
|
1758
|
+
With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
1759
|
+
merchants.
|
|
1760
|
+
|
|
1761
|
+
If you create payments on your own account that you want to split between yourself and one or more connected
|
|
1762
|
+
merchants, you can use this `routing` parameter to route the payment accordingly.
|
|
1763
|
+
|
|
1764
|
+
The `routing` parameter should contain an array of objects, with each object describing the destination for a
|
|
1765
|
+
specific portion of the payment.
|
|
1766
|
+
|
|
1767
|
+
It is not necessary to indicate in the array which portion goes to yourself. After all portions of the total
|
|
1768
|
+
payment amount have been routed, the amount left will be routed to the current organization automatically.
|
|
1769
|
+
|
|
1770
|
+
If instead you use OAuth to create payments on a connected merchant's account, refer to the `applicationFee`
|
|
1771
|
+
parameter.
|
|
1772
|
+
"""
|
|
1773
|
+
|
|
1774
|
+
subscription_id: Annotated[
|
|
1775
|
+
OptionalNullable[str], pydantic.Field(alias="subscriptionId")
|
|
1776
|
+
] = UNSET
|
|
1777
|
+
r"""If the payment was automatically created via a subscription, the ID of the [subscription](get-subscription) will
|
|
1778
|
+
be added to the response.
|
|
1779
|
+
"""
|
|
1780
|
+
|
|
1781
|
+
mandate_id: Annotated[OptionalNullable[str], pydantic.Field(alias="mandateId")] = (
|
|
1782
|
+
UNSET
|
|
1783
|
+
)
|
|
1784
|
+
r"""**Only relevant for recurring payments.**
|
|
1785
|
+
|
|
1786
|
+
When creating recurring payments, the ID of a specific [mandate](get-mandate) can be supplied to indicate which of
|
|
1787
|
+
the customer's accounts should be credited.
|
|
1788
|
+
"""
|
|
1789
|
+
|
|
1790
|
+
customer_id: Annotated[Optional[str], pydantic.Field(alias="customerId")] = None
|
|
1791
|
+
|
|
1792
|
+
settlement_id: Annotated[
|
|
1793
|
+
OptionalNullable[str], pydantic.Field(alias="settlementId")
|
|
1794
|
+
] = UNSET
|
|
1795
|
+
r"""The identifier referring to the [settlement](get-settlement) this payment was settled with."""
|
|
1796
|
+
|
|
1797
|
+
order_id: Annotated[OptionalNullable[str], pydantic.Field(alias="orderId")] = UNSET
|
|
1798
|
+
r"""If the payment was created for an [order](get-order), the ID of that order will be part of the response."""
|
|
1799
|
+
|
|
1800
|
+
status_reason: Annotated[
|
|
1801
|
+
OptionalNullable[StatusReason], pydantic.Field(alias="statusReason")
|
|
1802
|
+
] = UNSET
|
|
1803
|
+
r"""This object offers details about the status of a payment. Currently it is only available for point-of-sale
|
|
1804
|
+
payments.
|
|
1805
|
+
|
|
1806
|
+
You can find more information about the possible values of this object on
|
|
1807
|
+
[this page](status-reasons).**
|
|
1808
|
+
"""
|
|
1809
|
+
|
|
1810
|
+
is_cancelable: Annotated[
|
|
1811
|
+
OptionalNullable[bool], pydantic.Field(alias="isCancelable")
|
|
1812
|
+
] = UNSET
|
|
1813
|
+
r"""Whether the payment can be canceled. This parameter is omitted if the payment reaches a final state."""
|
|
1814
|
+
|
|
1815
|
+
details: OptionalNullable[PaymentResponseDetails] = UNSET
|
|
1816
|
+
r"""An object containing payment details collected during the payment process. For example, details may include the
|
|
1817
|
+
customer's card or bank details and a payment reference. For the full list of details, please refer to the
|
|
1818
|
+
[method-specific parameters](extra-payment-parameters) guide.
|
|
1819
|
+
"""
|
|
1820
|
+
|
|
1821
|
+
authorized_at: Annotated[
|
|
1822
|
+
OptionalNullable[str], pydantic.Field(alias="authorizedAt")
|
|
1823
|
+
] = UNSET
|
|
1824
|
+
r"""The date and time the payment became authorized, in ISO 8601 format. This parameter is omitted if the payment is
|
|
1825
|
+
not authorized (yet).
|
|
1826
|
+
"""
|
|
1827
|
+
|
|
1828
|
+
paid_at: Annotated[OptionalNullable[str], pydantic.Field(alias="paidAt")] = UNSET
|
|
1829
|
+
r"""The date and time the payment became paid, in ISO 8601 format. This parameter is omitted if the payment is not
|
|
1830
|
+
completed (yet).
|
|
1831
|
+
"""
|
|
1832
|
+
|
|
1833
|
+
canceled_at: Annotated[
|
|
1834
|
+
OptionalNullable[str], pydantic.Field(alias="canceledAt")
|
|
1835
|
+
] = UNSET
|
|
1836
|
+
r"""The date and time the payment was canceled, in ISO 8601 format. This parameter is omitted if the payment is not
|
|
1837
|
+
canceled (yet).
|
|
1838
|
+
"""
|
|
1839
|
+
|
|
1840
|
+
expires_at: Annotated[OptionalNullable[str], pydantic.Field(alias="expiresAt")] = (
|
|
1841
|
+
UNSET
|
|
1842
|
+
)
|
|
1843
|
+
r"""The date and time the payment will expire, in ISO 8601 format. This parameter is omitted if the payment can no
|
|
1844
|
+
longer expire.
|
|
1845
|
+
"""
|
|
1846
|
+
|
|
1847
|
+
expired_at: Annotated[OptionalNullable[str], pydantic.Field(alias="expiredAt")] = (
|
|
1848
|
+
UNSET
|
|
1849
|
+
)
|
|
1850
|
+
r"""The date and time the payment was expired, in ISO 8601 format. This parameter is omitted if the payment did not
|
|
1851
|
+
expire (yet).
|
|
1852
|
+
"""
|
|
1853
|
+
|
|
1854
|
+
failed_at: Annotated[OptionalNullable[str], pydantic.Field(alias="failedAt")] = (
|
|
1855
|
+
UNSET
|
|
1856
|
+
)
|
|
1857
|
+
r"""The date and time the payment failed, in ISO 8601 format. This parameter is omitted if the payment did not fail
|
|
1858
|
+
(yet).
|
|
1859
|
+
"""
|
|
1860
|
+
|
|
1861
|
+
@model_serializer(mode="wrap")
|
|
1862
|
+
def serialize_model(self, handler):
|
|
1863
|
+
optional_fields = [
|
|
1864
|
+
"amountRefunded",
|
|
1865
|
+
"amountRemaining",
|
|
1866
|
+
"amountCaptured",
|
|
1867
|
+
"amountChargedBack",
|
|
1868
|
+
"settlementAmount",
|
|
1869
|
+
"redirectUrl",
|
|
1870
|
+
"cancelUrl",
|
|
1871
|
+
"webhookUrl",
|
|
1872
|
+
"lines",
|
|
1873
|
+
"billingAddress",
|
|
1874
|
+
"shippingAddress",
|
|
1875
|
+
"locale",
|
|
1876
|
+
"countryCode",
|
|
1877
|
+
"method",
|
|
1878
|
+
"restrictPaymentMethodsToCountry",
|
|
1879
|
+
"metadata",
|
|
1880
|
+
"captureMode",
|
|
1881
|
+
"captureDelay",
|
|
1882
|
+
"captureBefore",
|
|
1883
|
+
"applicationFee",
|
|
1884
|
+
"routing",
|
|
1885
|
+
"subscriptionId",
|
|
1886
|
+
"mandateId",
|
|
1887
|
+
"customerId",
|
|
1888
|
+
"settlementId",
|
|
1889
|
+
"orderId",
|
|
1890
|
+
"statusReason",
|
|
1891
|
+
"isCancelable",
|
|
1892
|
+
"details",
|
|
1893
|
+
"authorizedAt",
|
|
1894
|
+
"paidAt",
|
|
1895
|
+
"canceledAt",
|
|
1896
|
+
"expiresAt",
|
|
1897
|
+
"expiredAt",
|
|
1898
|
+
"failedAt",
|
|
1899
|
+
]
|
|
1900
|
+
nullable_fields = [
|
|
1901
|
+
"redirectUrl",
|
|
1902
|
+
"cancelUrl",
|
|
1903
|
+
"webhookUrl",
|
|
1904
|
+
"lines",
|
|
1905
|
+
"locale",
|
|
1906
|
+
"countryCode",
|
|
1907
|
+
"method",
|
|
1908
|
+
"restrictPaymentMethodsToCountry",
|
|
1909
|
+
"metadata",
|
|
1910
|
+
"captureMode",
|
|
1911
|
+
"captureDelay",
|
|
1912
|
+
"captureBefore",
|
|
1913
|
+
"applicationFee",
|
|
1914
|
+
"routing",
|
|
1915
|
+
"subscriptionId",
|
|
1916
|
+
"mandateId",
|
|
1917
|
+
"settlementId",
|
|
1918
|
+
"orderId",
|
|
1919
|
+
"statusReason",
|
|
1920
|
+
"isCancelable",
|
|
1921
|
+
"details",
|
|
1922
|
+
"authorizedAt",
|
|
1923
|
+
"paidAt",
|
|
1924
|
+
"canceledAt",
|
|
1925
|
+
"expiresAt",
|
|
1926
|
+
"expiredAt",
|
|
1927
|
+
"failedAt",
|
|
1928
|
+
]
|
|
1929
|
+
null_default_fields = []
|
|
1930
|
+
|
|
1931
|
+
serialized = handler(self)
|
|
1932
|
+
|
|
1933
|
+
m = {}
|
|
1934
|
+
|
|
1935
|
+
for n, f in type(self).model_fields.items():
|
|
1936
|
+
k = f.alias or n
|
|
1937
|
+
val = serialized.get(k)
|
|
1938
|
+
serialized.pop(k, None)
|
|
1939
|
+
|
|
1940
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
1941
|
+
is_set = (
|
|
1942
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
1943
|
+
or k in null_default_fields
|
|
1944
|
+
) # pylint: disable=no-member
|
|
1945
|
+
|
|
1946
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
1947
|
+
m[k] = val
|
|
1948
|
+
elif val != UNSET_SENTINEL and (
|
|
1949
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
1950
|
+
):
|
|
1951
|
+
m[k] = val
|
|
1952
|
+
|
|
1953
|
+
return m
|