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.
Files changed (337) hide show
  1. mollie/__init__.py +18 -0
  2. mollie/_hooks/__init__.py +5 -0
  3. mollie/_hooks/mollie_hooks.py +165 -0
  4. mollie/_hooks/registration.py +18 -0
  5. mollie/_hooks/sdkhooks.py +76 -0
  6. mollie/_hooks/types.py +113 -0
  7. mollie/_version.py +15 -0
  8. mollie/balance_transfers.py +651 -0
  9. mollie/balances.py +1105 -0
  10. mollie/basesdk.py +360 -0
  11. mollie/capabilities.py +209 -0
  12. mollie/captures.py +677 -0
  13. mollie/chargebacks_sdk.py +675 -0
  14. mollie/client_links.py +325 -0
  15. mollie/clients.py +409 -0
  16. mollie/customers.py +1563 -0
  17. mollie/delayed_routing.py +421 -0
  18. mollie/httpclient.py +125 -0
  19. mollie/invoices.py +429 -0
  20. mollie/mandates.py +895 -0
  21. mollie/methods.py +789 -0
  22. mollie/models/__init__.py +4002 -0
  23. mollie/models/address.py +29 -0
  24. mollie/models/amount.py +25 -0
  25. mollie/models/amount_nullable.py +24 -0
  26. mollie/models/apierror.py +40 -0
  27. mollie/models/balance_card_audience.py +10 -0
  28. mollie/models/balance_card_issuer.py +12 -0
  29. mollie/models/balance_card_region.py +12 -0
  30. mollie/models/balance_fee_type.py +43 -0
  31. mollie/models/balance_prepayment_part_type.py +13 -0
  32. mollie/models/balance_report_grouping.py +10 -0
  33. mollie/models/balance_transaction_type.py +47 -0
  34. mollie/models/balance_transfer_category.py +17 -0
  35. mollie/models/balance_transfer_category_response.py +18 -0
  36. mollie/models/balance_transfer_destination_type.py +14 -0
  37. mollie/models/balance_transfer_party_type.py +10 -0
  38. mollie/models/balance_transfer_party_type_response.py +11 -0
  39. mollie/models/balance_transfer_status.py +13 -0
  40. mollie/models/balance_transfer_status_reason_response.py +19 -0
  41. mollie/models/billingaddress.py +154 -0
  42. mollie/models/cancel_paymentop.py +93 -0
  43. mollie/models/cancel_refundop.py +86 -0
  44. mollie/models/cancel_subscriptionop.py +100 -0
  45. mollie/models/capability_requirement_status.py +15 -0
  46. mollie/models/capability_status.py +12 -0
  47. mollie/models/capability_status_reason.py +10 -0
  48. mollie/models/capture_mode.py +15 -0
  49. mollie/models/capture_mode_response.py +16 -0
  50. mollie/models/capture_response.py +265 -0
  51. mollie/models/client_link_request.py +210 -0
  52. mollie/models/client_link_response.py +56 -0
  53. mollie/models/clienterror.py +30 -0
  54. mollie/models/components_sub_totals.py +127 -0
  55. mollie/models/create_captureop.py +43 -0
  56. mollie/models/create_client_linkop.py +29 -0
  57. mollie/models/create_connect_balance_transferop.py +32 -0
  58. mollie/models/create_customer_paymentop.py +43 -0
  59. mollie/models/create_customerop.py +29 -0
  60. mollie/models/create_mandateop.py +43 -0
  61. mollie/models/create_payment_linkop.py +325 -0
  62. mollie/models/create_paymentop.py +73 -0
  63. mollie/models/create_profileop.py +29 -0
  64. mollie/models/create_refundop.py +43 -0
  65. mollie/models/create_sales_invoiceop.py +29 -0
  66. mollie/models/create_subscriptionop.py +43 -0
  67. mollie/models/create_webhook.py +123 -0
  68. mollie/models/create_webhookop.py +69 -0
  69. mollie/models/currencies.py +20 -0
  70. mollie/models/customer_response.py +169 -0
  71. mollie/models/delete_customerop.py +91 -0
  72. mollie/models/delete_payment_linkop.py +91 -0
  73. mollie/models/delete_profileop.py +29 -0
  74. mollie/models/delete_sales_invoiceop.py +44 -0
  75. mollie/models/delete_values_sales_invoice.py +54 -0
  76. mollie/models/delete_webhookop.py +56 -0
  77. mollie/models/entity_balance.py +325 -0
  78. mollie/models/entity_balance_report.py +541 -0
  79. mollie/models/entity_balance_transaction.py +1068 -0
  80. mollie/models/entity_balance_transfer.py +62 -0
  81. mollie/models/entity_balance_transfer_party.py +28 -0
  82. mollie/models/entity_balance_transfer_party_response.py +32 -0
  83. mollie/models/entity_balance_transfer_response.py +159 -0
  84. mollie/models/entity_capability.py +75 -0
  85. mollie/models/entity_capability_requirement.py +87 -0
  86. mollie/models/entity_capture.py +63 -0
  87. mollie/models/entity_chargeback.py +247 -0
  88. mollie/models/entity_customer.py +86 -0
  89. mollie/models/entity_event.py +46 -0
  90. mollie/models/entity_invoice.py +247 -0
  91. mollie/models/entity_method_get.py +329 -0
  92. mollie/models/entity_onboarding_status.py +95 -0
  93. mollie/models/entity_organization.py +178 -0
  94. mollie/models/entity_payment_route.py +111 -0
  95. mollie/models/entity_payment_route_response.py +140 -0
  96. mollie/models/entity_permission.py +61 -0
  97. mollie/models/entity_refund_response.py +361 -0
  98. mollie/models/entity_route.py +96 -0
  99. mollie/models/entity_settlement.py +467 -0
  100. mollie/models/entity_terminal.py +160 -0
  101. mollie/models/entity_webhook.py +122 -0
  102. mollie/models/entity_webhook_event.py +149 -0
  103. mollie/models/error_response.py +70 -0
  104. mollie/models/get_balance_reportop.py +126 -0
  105. mollie/models/get_balanceop.py +71 -0
  106. mollie/models/get_captureop.py +129 -0
  107. mollie/models/get_chargebackop.py +129 -0
  108. mollie/models/get_clientop.py +216 -0
  109. mollie/models/get_connect_balance_transferop.py +71 -0
  110. mollie/models/get_current_organizationop.py +22 -0
  111. mollie/models/get_current_profileop.py +22 -0
  112. mollie/models/get_customerop.py +286 -0
  113. mollie/models/get_invoiceop.py +29 -0
  114. mollie/models/get_mandateop.py +86 -0
  115. mollie/models/get_methodop.py +199 -0
  116. mollie/models/get_next_settlementop.py +22 -0
  117. mollie/models/get_onboarding_statusop.py +22 -0
  118. mollie/models/get_open_settlementop.py +22 -0
  119. mollie/models/get_organizationop.py +71 -0
  120. mollie/models/get_partner_statusop.py +231 -0
  121. mollie/models/get_payment_link_paymentsop.py +188 -0
  122. mollie/models/get_payment_linkop.py +77 -0
  123. mollie/models/get_paymentop.py +128 -0
  124. mollie/models/get_permissionop.py +73 -0
  125. mollie/models/get_primary_balanceop.py +22 -0
  126. mollie/models/get_profileop.py +71 -0
  127. mollie/models/get_refundop.py +129 -0
  128. mollie/models/get_sales_invoiceop.py +75 -0
  129. mollie/models/get_settlementop.py +29 -0
  130. mollie/models/get_subscriptionop.py +86 -0
  131. mollie/models/get_terminalop.py +77 -0
  132. mollie/models/get_webhook_eventop.py +71 -0
  133. mollie/models/get_webhookop.py +71 -0
  134. mollie/models/internal/__init__.py +54 -0
  135. mollie/models/internal/globals.py +59 -0
  136. mollie/models/line_categories.py +13 -0
  137. mollie/models/line_categories_response.py +14 -0
  138. mollie/models/list_all_chargebacksop.py +236 -0
  139. mollie/models/list_all_methodsop.py +249 -0
  140. mollie/models/list_all_refundsop.py +230 -0
  141. mollie/models/list_all_subscriptionsop.py +202 -0
  142. mollie/models/list_balance_transactionsop.py +174 -0
  143. mollie/models/list_balancesop.py +171 -0
  144. mollie/models/list_capabilitiesop.py +62 -0
  145. mollie/models/list_capture_response.py +264 -0
  146. mollie/models/list_capturesop.py +185 -0
  147. mollie/models/list_chargebacksop.py +185 -0
  148. mollie/models/list_clientsop.py +269 -0
  149. mollie/models/list_connect_balance_transfersop.py +177 -0
  150. mollie/models/list_customer_paymentsop.py +231 -0
  151. mollie/models/list_customer_response.py +164 -0
  152. mollie/models/list_customersop.py +172 -0
  153. mollie/models/list_entity_balance.py +322 -0
  154. mollie/models/list_entity_chargeback.py +244 -0
  155. mollie/models/list_entity_invoice.py +244 -0
  156. mollie/models/list_entity_method.py +315 -0
  157. mollie/models/list_entity_method_all.py +391 -0
  158. mollie/models/list_entity_permission.py +56 -0
  159. mollie/models/list_entity_refund.py +352 -0
  160. mollie/models/list_entity_settlement.py +457 -0
  161. mollie/models/list_entity_terminal.py +157 -0
  162. mollie/models/list_entity_webhook.py +117 -0
  163. mollie/models/list_invoicesop.py +175 -0
  164. mollie/models/list_links.py +68 -0
  165. mollie/models/list_mandate_response.py +261 -0
  166. mollie/models/list_mandatesop.py +186 -0
  167. mollie/models/list_methodsop.py +332 -0
  168. mollie/models/list_payment_linksop.py +159 -0
  169. mollie/models/list_payment_response.py +1953 -0
  170. mollie/models/list_paymentsop.py +217 -0
  171. mollie/models/list_permissionsop.py +85 -0
  172. mollie/models/list_profile_response.py +194 -0
  173. mollie/models/list_profilesop.py +118 -0
  174. mollie/models/list_refundsop.py +189 -0
  175. mollie/models/list_route_get_response.py +97 -0
  176. mollie/models/list_sales_invoice_response.py +505 -0
  177. mollie/models/list_sales_invoicesop.py +172 -0
  178. mollie/models/list_settlement_capturesop.py +187 -0
  179. mollie/models/list_settlement_chargebacksop.py +187 -0
  180. mollie/models/list_settlement_paymentsop.py +233 -0
  181. mollie/models/list_settlement_refundsop.py +191 -0
  182. mollie/models/list_settlementsop.py +178 -0
  183. mollie/models/list_subscription_paymentsop.py +242 -0
  184. mollie/models/list_subscription_response.py +344 -0
  185. mollie/models/list_subscriptionsop.py +189 -0
  186. mollie/models/list_terminalsop.py +172 -0
  187. mollie/models/list_webhooksop.py +189 -0
  188. mollie/models/locale.py +32 -0
  189. mollie/models/locale_response.py +33 -0
  190. mollie/models/mandate_details_card_label_response.py +22 -0
  191. mollie/models/mandate_method.py +15 -0
  192. mollie/models/mandate_method_response.py +16 -0
  193. mollie/models/mandate_request.py +160 -0
  194. mollie/models/mandate_response.py +264 -0
  195. mollie/models/metadata.py +19 -0
  196. mollie/models/method.py +50 -0
  197. mollie/models/method_include_wallets_parameter.py +8 -0
  198. mollie/models/method_resource_parameter.py +9 -0
  199. mollie/models/method_response.py +59 -0
  200. mollie/models/method_status.py +15 -0
  201. mollie/models/mode.py +12 -0
  202. mollie/models/no_response_error.py +17 -0
  203. mollie/models/onboarding_vat_regulation.py +16 -0
  204. mollie/models/organization_vat_regulation.py +17 -0
  205. mollie/models/payment_address.py +130 -0
  206. mollie/models/payment_create_routeop.py +43 -0
  207. mollie/models/payment_details_card_audition_response.py +12 -0
  208. mollie/models/payment_details_card_funding_response.py +14 -0
  209. mollie/models/payment_details_card_label_response.py +23 -0
  210. mollie/models/payment_details_card_security_response.py +12 -0
  211. mollie/models/payment_details_failure_reason_response.py +25 -0
  212. mollie/models/payment_details_fee_region_response.py +20 -0
  213. mollie/models/payment_details_receipt_card_read_method_response.py +17 -0
  214. mollie/models/payment_details_receipt_card_verification_method_response.py +21 -0
  215. mollie/models/payment_details_seller_protection_response.py +20 -0
  216. mollie/models/payment_details_wallet_response.py +11 -0
  217. mollie/models/payment_line_item.py +96 -0
  218. mollie/models/payment_line_item_response.py +104 -0
  219. mollie/models/payment_line_type.py +20 -0
  220. mollie/models/payment_line_type_response.py +21 -0
  221. mollie/models/payment_link_method.py +36 -0
  222. mollie/models/payment_link_method_response.py +37 -0
  223. mollie/models/payment_link_response.py +348 -0
  224. mollie/models/payment_link_sequence_type.py +9 -0
  225. mollie/models/payment_link_sequence_type_response.py +10 -0
  226. mollie/models/payment_list_routesop.py +140 -0
  227. mollie/models/payment_method.py +53 -0
  228. mollie/models/payment_request.py +919 -0
  229. mollie/models/payment_response.py +1953 -0
  230. mollie/models/profile_request.py +67 -0
  231. mollie/models/profile_response.py +197 -0
  232. mollie/models/profile_review_status_response.py +12 -0
  233. mollie/models/recurring_line_item.py +77 -0
  234. mollie/models/refund_external_reference_type.py +10 -0
  235. mollie/models/refund_external_reference_type_response.py +11 -0
  236. mollie/models/refund_request.py +200 -0
  237. mollie/models/release_authorizationop.py +108 -0
  238. mollie/models/request_apple_pay_payment_sessionop.py +76 -0
  239. mollie/models/responsevalidationerror.py +27 -0
  240. mollie/models/revoke_mandateop.py +100 -0
  241. mollie/models/route_create_response.py +97 -0
  242. mollie/models/route_destination_type.py +10 -0
  243. mollie/models/route_destination_type_response.py +11 -0
  244. mollie/models/sales_invoice_discount.py +21 -0
  245. mollie/models/sales_invoice_discount_response.py +25 -0
  246. mollie/models/sales_invoice_discount_type.py +11 -0
  247. mollie/models/sales_invoice_discount_type_response.py +12 -0
  248. mollie/models/sales_invoice_email_details.py +20 -0
  249. mollie/models/sales_invoice_line_item.py +67 -0
  250. mollie/models/sales_invoice_line_item_response.py +70 -0
  251. mollie/models/sales_invoice_payment_details.py +59 -0
  252. mollie/models/sales_invoice_payment_details_response.py +66 -0
  253. mollie/models/sales_invoice_payment_details_source.py +12 -0
  254. mollie/models/sales_invoice_payment_details_source_response.py +13 -0
  255. mollie/models/sales_invoice_payment_term.py +16 -0
  256. mollie/models/sales_invoice_payment_term_response.py +17 -0
  257. mollie/models/sales_invoice_recipient.py +176 -0
  258. mollie/models/sales_invoice_recipient_locale.py +18 -0
  259. mollie/models/sales_invoice_recipient_locale_response.py +19 -0
  260. mollie/models/sales_invoice_recipient_response.py +182 -0
  261. mollie/models/sales_invoice_recipient_type.py +13 -0
  262. mollie/models/sales_invoice_recipient_type_response.py +14 -0
  263. mollie/models/sales_invoice_request.py +256 -0
  264. mollie/models/sales_invoice_response.py +509 -0
  265. mollie/models/sales_invoice_status.py +25 -0
  266. mollie/models/sales_invoice_status_response.py +26 -0
  267. mollie/models/sales_invoice_vat_mode.py +13 -0
  268. mollie/models/sales_invoice_vat_mode_response.py +14 -0
  269. mollie/models/sales_invoice_vat_scheme.py +11 -0
  270. mollie/models/sales_invoice_vat_scheme_response.py +12 -0
  271. mollie/models/security.py +35 -0
  272. mollie/models/sequence_type.py +10 -0
  273. mollie/models/sequence_type_response.py +11 -0
  274. mollie/models/sorting.py +9 -0
  275. mollie/models/status_reason.py +168 -0
  276. mollie/models/sub_group.py +52 -0
  277. mollie/models/sub_totals.py +120 -0
  278. mollie/models/submit_onboarding_dataop.py +214 -0
  279. mollie/models/subscription_method.py +12 -0
  280. mollie/models/subscription_method_response.py +13 -0
  281. mollie/models/subscription_request.py +213 -0
  282. mollie/models/subscription_response.py +349 -0
  283. mollie/models/terminal_brand.py +12 -0
  284. mollie/models/terminal_model.py +16 -0
  285. mollie/models/test_webhookop.py +64 -0
  286. mollie/models/update_customerop.py +43 -0
  287. mollie/models/update_payment_linkop.py +172 -0
  288. mollie/models/update_paymentop.py +332 -0
  289. mollie/models/update_profileop.py +147 -0
  290. mollie/models/update_sales_invoiceop.py +44 -0
  291. mollie/models/update_subscriptionop.py +188 -0
  292. mollie/models/update_values_sales_invoice.py +176 -0
  293. mollie/models/update_webhookop.py +83 -0
  294. mollie/models/url.py +24 -0
  295. mollie/models/url_nullable.py +25 -0
  296. mollie/models/webhook_event_types.py +18 -0
  297. mollie/models/webhook_status.py +14 -0
  298. mollie/onboarding.py +403 -0
  299. mollie/organizations.py +579 -0
  300. mollie/payment_links.py +1323 -0
  301. mollie/payments_sdk.py +1385 -0
  302. mollie/permissions.py +397 -0
  303. mollie/profiles.py +1209 -0
  304. mollie/py.typed +1 -0
  305. mollie/refunds_sdk.py +1111 -0
  306. mollie/sales_invoices.py +1121 -0
  307. mollie/sdk.py +265 -0
  308. mollie/sdkconfiguration.py +50 -0
  309. mollie/settlements.py +1735 -0
  310. mollie/subscriptions.py +1617 -0
  311. mollie/terminals.py +427 -0
  312. mollie/types/__init__.py +21 -0
  313. mollie/types/basemodel.py +39 -0
  314. mollie/utils/__init__.py +200 -0
  315. mollie/utils/annotations.py +79 -0
  316. mollie/utils/datetimes.py +23 -0
  317. mollie/utils/enums.py +74 -0
  318. mollie/utils/eventstreaming.py +248 -0
  319. mollie/utils/forms.py +223 -0
  320. mollie/utils/headers.py +136 -0
  321. mollie/utils/logger.py +27 -0
  322. mollie/utils/metadata.py +118 -0
  323. mollie/utils/queryparams.py +205 -0
  324. mollie/utils/requestbodies.py +66 -0
  325. mollie/utils/retries.py +217 -0
  326. mollie/utils/security.py +195 -0
  327. mollie/utils/serializers.py +249 -0
  328. mollie/utils/unmarshal_json_response.py +24 -0
  329. mollie/utils/url.py +155 -0
  330. mollie/utils/values.py +137 -0
  331. mollie/wallets.py +263 -0
  332. mollie/webhook_events.py +211 -0
  333. mollie/webhooks.py +1305 -0
  334. mollie_api_py-1.0.0.dist-info/METADATA +834 -0
  335. mollie_api_py-1.0.0.dist-info/RECORD +337 -0
  336. mollie_api_py-1.0.0.dist-info/WHEEL +4 -0
  337. 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 ListPaymentResponseAmountRefundedTypedDict(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 ListPaymentResponseAmountRefunded(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 ListPaymentResponseAmountRemainingTypedDict(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 ListPaymentResponseAmountRemaining(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 ListPaymentResponseAmountCapturedTypedDict(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 ListPaymentResponseAmountCaptured(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 ListPaymentResponseAmountChargedBackTypedDict(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 ListPaymentResponseAmountChargedBack(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 ListPaymentResponseSettlementAmountTypedDict(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 ListPaymentResponseSettlementAmount(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 ListPaymentResponseLineTypedDict(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 ListPaymentResponseLine(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 ListPaymentResponseBillingAddressTypedDict(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 ListPaymentResponseBillingAddress(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 ListPaymentResponseApplicationFeeTypedDict(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 ListPaymentResponseApplicationFee(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 ListPaymentResponseStatus(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 ListPaymentResponseReceiptTypedDict(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 ListPaymentResponseReceipt(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 ListPaymentResponseQrCodeTypedDict(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 ListPaymentResponseQrCode(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 ListPaymentResponseDetailsTypedDict(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[ListPaymentResponseReceiptTypedDict]
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[ListPaymentResponseQrCodeTypedDict]
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 ListPaymentResponseDetails(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[ListPaymentResponseReceipt] = 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[ListPaymentResponseQrCode], 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 ListPaymentResponseLinksTypedDict(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
+ status: NotRequired[URLTypedDict]
1203
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1204
+ pay_online: NotRequired[URLTypedDict]
1205
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1206
+
1207
+
1208
+ class ListPaymentResponseLinks(BaseModel):
1209
+ r"""An object with several relevant URLs. Every URL object will contain an `href` and a `type` field."""
1210
+
1211
+ self_: Annotated[URL, pydantic.Field(alias="self")]
1212
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1213
+
1214
+ dashboard: URL
1215
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1216
+
1217
+ checkout: Optional[URL] = None
1218
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1219
+
1220
+ mobile_app_checkout: Annotated[
1221
+ Optional[URL], pydantic.Field(alias="mobileAppCheckout")
1222
+ ] = None
1223
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1224
+
1225
+ change_payment_state: Annotated[
1226
+ Optional[URL], pydantic.Field(alias="changePaymentState")
1227
+ ] = None
1228
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1229
+
1230
+ refunds: Optional[URL] = None
1231
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1232
+
1233
+ chargebacks: Optional[URL] = None
1234
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1235
+
1236
+ captures: Optional[URL] = None
1237
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1238
+
1239
+ settlement: Optional[URL] = None
1240
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1241
+
1242
+ customer: Optional[URL] = None
1243
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1244
+
1245
+ mandate: Optional[URL] = None
1246
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1247
+
1248
+ subscription: Optional[URL] = None
1249
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1250
+
1251
+ order: Optional[URL] = None
1252
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1253
+
1254
+ terminal: Optional[URL] = None
1255
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1256
+
1257
+ status: Optional[URL] = None
1258
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1259
+
1260
+ pay_online: Annotated[Optional[URL], pydantic.Field(alias="payOnline")] = None
1261
+ r"""In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field."""
1262
+
1263
+
1264
+ class ListPaymentResponseTypedDict(TypedDict):
1265
+ resource: str
1266
+ r"""Indicates the response contains a payment object. Will always contain the string `payment` for this endpoint."""
1267
+ id: str
1268
+ r"""The identifier uniquely referring to this payment. Mollie assigns this identifier at payment creation time. Mollie
1269
+ will always refer to the payment by this ID. Example: `tr_5B8cwPMGnU6qLbRvo7qEZo`.
1270
+ """
1271
+ mode: Mode
1272
+ r"""Whether this entity was created in live mode or in test mode."""
1273
+ description: str
1274
+ r"""The description of the payment. This will be shown to your customer on their card or bank statement when possible.
1275
+ We truncate the description automatically according to the limits of the used payment method. The description is
1276
+ also visible in any exports you generate.
1277
+
1278
+ We recommend you use a unique identifier so that you can always link the payment to the order in your back office.
1279
+ This is particularly useful for bookkeeping.
1280
+
1281
+ The maximum length of the description field differs per payment method, with the absolute maximum being 255
1282
+ characters. The API will not reject strings longer than the maximum length but it will truncate them to fit.
1283
+ """
1284
+ amount: AmountTypedDict
1285
+ r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
1286
+ sequence_type: SequenceTypeResponse
1287
+ profile_id: str
1288
+ r"""The identifier referring to the [profile](get-profile) this entity belongs to.
1289
+
1290
+ Most API credentials are linked to a single profile. In these cases the `profileId` can be omitted in the creation
1291
+ request. For organization-level credentials such as OAuth access tokens however, the `profileId` parameter is
1292
+ required.
1293
+ """
1294
+ status: ListPaymentResponseStatus
1295
+ created_at: str
1296
+ r"""The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."""
1297
+ links: ListPaymentResponseLinksTypedDict
1298
+ r"""An object with several relevant URLs. Every URL object will contain an `href` and a `type` field."""
1299
+ amount_refunded: NotRequired[ListPaymentResponseAmountRefundedTypedDict]
1300
+ r"""The total amount that is already refunded. Only available when refunds are available for this payment. For some
1301
+ payment methods, this amount may be higher than the payment amount, for example to allow reimbursement of the
1302
+ costs for a return shipment to the customer.
1303
+ """
1304
+ amount_remaining: NotRequired[ListPaymentResponseAmountRemainingTypedDict]
1305
+ r"""The remaining amount that can be refunded. Only available when refunds are available for this payment."""
1306
+ amount_captured: NotRequired[ListPaymentResponseAmountCapturedTypedDict]
1307
+ r"""The total amount that is already captured for this payment. Only available when this payment supports captures."""
1308
+ amount_charged_back: NotRequired[ListPaymentResponseAmountChargedBackTypedDict]
1309
+ r"""The total amount that was charged back for this payment. Only available when the total charged back amount is not
1310
+ zero.
1311
+ """
1312
+ settlement_amount: NotRequired[ListPaymentResponseSettlementAmountTypedDict]
1313
+ r"""This optional field will contain the approximate amount that will be settled to your account, converted to the
1314
+ currency your account is settled in.
1315
+
1316
+ Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal or gift cards. If no amount is
1317
+ settled by Mollie the `settlementAmount` is omitted from the response.
1318
+
1319
+ Please note that this amount might be recalculated and changed when the status of the payment changes. We suggest
1320
+ using the List balance transactions endpoint instead to get more accurate settlement amounts for your payments.
1321
+ """
1322
+ redirect_url: NotRequired[Nullable[str]]
1323
+ r"""The URL your customer will be redirected to after the payment process.
1324
+
1325
+ It could make sense for the redirectUrl to contain a unique identifier – like your order ID – so you can show the
1326
+ right page referencing the order when your customer returns.
1327
+
1328
+ The parameter is normally required, but can be omitted for recurring payments (`sequenceType: recurring`) and for
1329
+ Apple Pay payments with an `applePayPaymentToken`.
1330
+ """
1331
+ cancel_url: NotRequired[Nullable[str]]
1332
+ r"""The URL your customer will be redirected to when the customer explicitly cancels the payment. If this URL is not
1333
+ provided, the customer will be redirected to the `redirectUrl` instead — see above.
1334
+
1335
+ Mollie will always give you status updates via webhooks, including for the canceled status. This parameter is
1336
+ therefore entirely optional, but can be useful when implementing a dedicated customer-facing flow to handle
1337
+ payment cancellations.
1338
+ """
1339
+ webhook_url: NotRequired[Nullable[str]]
1340
+ r"""The webhook URL where we will send payment status updates to.
1341
+
1342
+ The webhookUrl is optional, but without a webhook you will miss out on important status changes to your payment.
1343
+
1344
+ The webhookUrl must be reachable from Mollie's point of view, so you cannot use `localhost`. If you want to use
1345
+ webhook during development on `localhost`, you must use a tool like ngrok to have the webhooks delivered to your
1346
+ local machine.
1347
+ """
1348
+ lines: NotRequired[Nullable[List[ListPaymentResponseLineTypedDict]]]
1349
+ r"""Optionally provide the order lines for the payment. Each line contains details such as a description of the item
1350
+ ordered and its price.
1351
+
1352
+ All lines must have the same currency as the payment.
1353
+
1354
+ Required for payment methods `billie`, `in3`, `klarna`, `riverty` and `voucher`.
1355
+ """
1356
+ billing_address: NotRequired[ListPaymentResponseBillingAddressTypedDict]
1357
+ r"""The customer's billing address details. We advise to provide these details to improve fraud protection and
1358
+ conversion.
1359
+
1360
+ Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
1361
+ `country`.
1362
+
1363
+ Required for payment method `in3`, `klarna`, `billie` and `riverty`.
1364
+ """
1365
+ shipping_address: NotRequired[PaymentAddressTypedDict]
1366
+ locale: NotRequired[Nullable[LocaleResponse]]
1367
+ r"""Allows you to preset the language to be used."""
1368
+ country_code: NotRequired[Nullable[str]]
1369
+ r"""This optional field contains your customer's ISO 3166-1 alpha-2 country code, detected by us during checkout. This
1370
+ field is omitted if the country code was not detected.
1371
+ """
1372
+ method: NotRequired[Nullable[MethodResponse]]
1373
+ r"""Normally, a payment method screen is shown. However, when using this parameter, you can choose a specific payment
1374
+ method and your customer will skip the selection screen and is sent directly to the chosen payment method. The
1375
+ parameter enables you to fully integrate the payment method selection into your website.
1376
+
1377
+ You can also specify the methods in an array. By doing so we will still show the payment method selection screen
1378
+ but will only show the methods specified in the array. For example, you can use this functionality to only show
1379
+ payment methods from a specific country to your customer `['bancontact', 'belfius']`.
1380
+ """
1381
+ restrict_payment_methods_to_country: NotRequired[Nullable[str]]
1382
+ r"""For digital goods in most jurisdictions, you must apply the VAT rate from your customer's country. Choose the VAT
1383
+ rates you have used for the order to ensure your customer's country matches the VAT country.
1384
+
1385
+ Use this parameter to restrict the payment methods available to your customer to those from a single country.
1386
+
1387
+ If available, the credit card method will still be offered, but only cards from the allowed country are accepted.
1388
+
1389
+ The field expects a country code in ISO 3166-1 alpha-2 format, for example `NL`.
1390
+ """
1391
+ metadata: NotRequired[Nullable[MetadataTypedDict]]
1392
+ r"""Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever
1393
+ you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
1394
+ """
1395
+ capture_mode: NotRequired[Nullable[CaptureModeResponse]]
1396
+ 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#/)
1397
+ and capture at a later time.
1398
+
1399
+ This field needs to be set to `manual` for method `riverty`.
1400
+ """
1401
+ capture_delay: NotRequired[Nullable[str]]
1402
+ r"""**Only relevant if you wish to manage authorization and capturing separately.**
1403
+
1404
+ Some payment methods allow placing a hold on the card or bank account. This hold or 'authorization' can then at a
1405
+ later point either be 'captured' or canceled.
1406
+
1407
+ By default, we charge the customer's card or bank account immediately when they complete the payment. If you set a
1408
+ capture delay however, we will delay the automatic capturing of the payment for the specified amount of time. For
1409
+ example `8 hours` or `2 days`.
1410
+
1411
+ To schedule an automatic capture, the `captureMode` must be set to `automatic`.
1412
+
1413
+ The maximum delay is 7 days (168 hours).
1414
+
1415
+ Possible values: `... hours` `... days`
1416
+ """
1417
+ capture_before: NotRequired[Nullable[str]]
1418
+ r"""Indicates the date before which the payment needs to be captured, in ISO 8601 format. From this date onwards we
1419
+ can no longer guarantee a successful capture. The parameter is omitted if the payment is not authorized (yet).
1420
+ """
1421
+ application_fee: NotRequired[Nullable[ListPaymentResponseApplicationFeeTypedDict]]
1422
+ r"""With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
1423
+ merchants.
1424
+
1425
+ If you use OAuth to create payments on a connected merchant's account, you can charge a fee using this
1426
+ `applicationFee` parameter. If the payment succeeds, the fee will be deducted from the merchant's balance and sent
1427
+ to your own account balance.
1428
+
1429
+ If instead you want to split a payment on your own account between yourself and a connected merchant, refer to the
1430
+ `routing` parameter.
1431
+ """
1432
+ routing: NotRequired[Nullable[List[EntityPaymentRouteResponseTypedDict]]]
1433
+ r"""*This functionality is not enabled by default. Reach out to our partner management team if you wish to use it.*
1434
+
1435
+ With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
1436
+ merchants.
1437
+
1438
+ If you create payments on your own account that you want to split between yourself and one or more connected
1439
+ merchants, you can use this `routing` parameter to route the payment accordingly.
1440
+
1441
+ The `routing` parameter should contain an array of objects, with each object describing the destination for a
1442
+ specific portion of the payment.
1443
+
1444
+ It is not necessary to indicate in the array which portion goes to yourself. After all portions of the total
1445
+ payment amount have been routed, the amount left will be routed to the current organization automatically.
1446
+
1447
+ If instead you use OAuth to create payments on a connected merchant's account, refer to the `applicationFee`
1448
+ parameter.
1449
+ """
1450
+ subscription_id: NotRequired[Nullable[str]]
1451
+ r"""If the payment was automatically created via a subscription, the ID of the [subscription](get-subscription) will
1452
+ be added to the response.
1453
+ """
1454
+ mandate_id: NotRequired[Nullable[str]]
1455
+ r"""**Only relevant for recurring payments.**
1456
+
1457
+ When creating recurring payments, the ID of a specific [mandate](get-mandate) can be supplied to indicate which of
1458
+ the customer's accounts should be credited.
1459
+ """
1460
+ customer_id: NotRequired[str]
1461
+ settlement_id: NotRequired[Nullable[str]]
1462
+ r"""The identifier referring to the [settlement](get-settlement) this payment was settled with."""
1463
+ order_id: NotRequired[Nullable[str]]
1464
+ r"""If the payment was created for an [order](get-order), the ID of that order will be part of the response."""
1465
+ status_reason: NotRequired[Nullable[StatusReasonTypedDict]]
1466
+ r"""This object offers details about the status of a payment. Currently it is only available for point-of-sale
1467
+ payments.
1468
+
1469
+ You can find more information about the possible values of this object on
1470
+ [this page](status-reasons).**
1471
+ """
1472
+ is_cancelable: NotRequired[Nullable[bool]]
1473
+ r"""Whether the payment can be canceled. This parameter is omitted if the payment reaches a final state."""
1474
+ details: NotRequired[Nullable[ListPaymentResponseDetailsTypedDict]]
1475
+ r"""An object containing payment details collected during the payment process. For example, details may include the
1476
+ customer's card or bank details and a payment reference. For the full list of details, please refer to the
1477
+ [method-specific parameters](extra-payment-parameters) guide.
1478
+ """
1479
+ authorized_at: NotRequired[Nullable[str]]
1480
+ r"""The date and time the payment became authorized, in ISO 8601 format. This parameter is omitted if the payment is
1481
+ not authorized (yet).
1482
+ """
1483
+ paid_at: NotRequired[Nullable[str]]
1484
+ r"""The date and time the payment became paid, in ISO 8601 format. This parameter is omitted if the payment is not
1485
+ completed (yet).
1486
+ """
1487
+ canceled_at: NotRequired[Nullable[str]]
1488
+ r"""The date and time the payment was canceled, in ISO 8601 format. This parameter is omitted if the payment is not
1489
+ canceled (yet).
1490
+ """
1491
+ expires_at: NotRequired[Nullable[str]]
1492
+ r"""The date and time the payment will expire, in ISO 8601 format. This parameter is omitted if the payment can no
1493
+ longer expire.
1494
+ """
1495
+ expired_at: NotRequired[Nullable[str]]
1496
+ r"""The date and time the payment was expired, in ISO 8601 format. This parameter is omitted if the payment did not
1497
+ expire (yet).
1498
+ """
1499
+ failed_at: NotRequired[Nullable[str]]
1500
+ r"""The date and time the payment failed, in ISO 8601 format. This parameter is omitted if the payment did not fail
1501
+ (yet).
1502
+ """
1503
+
1504
+
1505
+ class ListPaymentResponse(BaseModel):
1506
+ resource: str
1507
+ r"""Indicates the response contains a payment object. Will always contain the string `payment` for this endpoint."""
1508
+
1509
+ id: str
1510
+ r"""The identifier uniquely referring to this payment. Mollie assigns this identifier at payment creation time. Mollie
1511
+ will always refer to the payment by this ID. Example: `tr_5B8cwPMGnU6qLbRvo7qEZo`.
1512
+ """
1513
+
1514
+ mode: Annotated[Mode, PlainValidator(validate_open_enum(False))]
1515
+ r"""Whether this entity was created in live mode or in test mode."""
1516
+
1517
+ description: str
1518
+ r"""The description of the payment. This will be shown to your customer on their card or bank statement when possible.
1519
+ We truncate the description automatically according to the limits of the used payment method. The description is
1520
+ also visible in any exports you generate.
1521
+
1522
+ We recommend you use a unique identifier so that you can always link the payment to the order in your back office.
1523
+ This is particularly useful for bookkeeping.
1524
+
1525
+ The maximum length of the description field differs per payment method, with the absolute maximum being 255
1526
+ characters. The API will not reject strings longer than the maximum length but it will truncate them to fit.
1527
+ """
1528
+
1529
+ amount: Amount
1530
+ r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
1531
+
1532
+ sequence_type: Annotated[
1533
+ Annotated[SequenceTypeResponse, PlainValidator(validate_open_enum(False))],
1534
+ pydantic.Field(alias="sequenceType"),
1535
+ ]
1536
+
1537
+ profile_id: Annotated[str, pydantic.Field(alias="profileId")]
1538
+ r"""The identifier referring to the [profile](get-profile) this entity belongs to.
1539
+
1540
+ Most API credentials are linked to a single profile. In these cases the `profileId` can be omitted in the creation
1541
+ request. For organization-level credentials such as OAuth access tokens however, the `profileId` parameter is
1542
+ required.
1543
+ """
1544
+
1545
+ status: Annotated[
1546
+ ListPaymentResponseStatus, PlainValidator(validate_open_enum(False))
1547
+ ]
1548
+
1549
+ created_at: Annotated[str, pydantic.Field(alias="createdAt")]
1550
+ r"""The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."""
1551
+
1552
+ links: Annotated[ListPaymentResponseLinks, pydantic.Field(alias="_links")]
1553
+ r"""An object with several relevant URLs. Every URL object will contain an `href` and a `type` field."""
1554
+
1555
+ amount_refunded: Annotated[
1556
+ Optional[ListPaymentResponseAmountRefunded],
1557
+ pydantic.Field(alias="amountRefunded"),
1558
+ ] = None
1559
+ r"""The total amount that is already refunded. Only available when refunds are available for this payment. For some
1560
+ payment methods, this amount may be higher than the payment amount, for example to allow reimbursement of the
1561
+ costs for a return shipment to the customer.
1562
+ """
1563
+
1564
+ amount_remaining: Annotated[
1565
+ Optional[ListPaymentResponseAmountRemaining],
1566
+ pydantic.Field(alias="amountRemaining"),
1567
+ ] = None
1568
+ r"""The remaining amount that can be refunded. Only available when refunds are available for this payment."""
1569
+
1570
+ amount_captured: Annotated[
1571
+ Optional[ListPaymentResponseAmountCaptured],
1572
+ pydantic.Field(alias="amountCaptured"),
1573
+ ] = None
1574
+ r"""The total amount that is already captured for this payment. Only available when this payment supports captures."""
1575
+
1576
+ amount_charged_back: Annotated[
1577
+ Optional[ListPaymentResponseAmountChargedBack],
1578
+ pydantic.Field(alias="amountChargedBack"),
1579
+ ] = None
1580
+ r"""The total amount that was charged back for this payment. Only available when the total charged back amount is not
1581
+ zero.
1582
+ """
1583
+
1584
+ settlement_amount: Annotated[
1585
+ Optional[ListPaymentResponseSettlementAmount],
1586
+ pydantic.Field(alias="settlementAmount"),
1587
+ ] = None
1588
+ r"""This optional field will contain the approximate amount that will be settled to your account, converted to the
1589
+ currency your account is settled in.
1590
+
1591
+ Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal or gift cards. If no amount is
1592
+ settled by Mollie the `settlementAmount` is omitted from the response.
1593
+
1594
+ Please note that this amount might be recalculated and changed when the status of the payment changes. We suggest
1595
+ using the List balance transactions endpoint instead to get more accurate settlement amounts for your payments.
1596
+ """
1597
+
1598
+ redirect_url: Annotated[
1599
+ OptionalNullable[str], pydantic.Field(alias="redirectUrl")
1600
+ ] = UNSET
1601
+ r"""The URL your customer will be redirected to after the payment process.
1602
+
1603
+ It could make sense for the redirectUrl to contain a unique identifier – like your order ID – so you can show the
1604
+ right page referencing the order when your customer returns.
1605
+
1606
+ The parameter is normally required, but can be omitted for recurring payments (`sequenceType: recurring`) and for
1607
+ Apple Pay payments with an `applePayPaymentToken`.
1608
+ """
1609
+
1610
+ cancel_url: Annotated[OptionalNullable[str], pydantic.Field(alias="cancelUrl")] = (
1611
+ UNSET
1612
+ )
1613
+ r"""The URL your customer will be redirected to when the customer explicitly cancels the payment. If this URL is not
1614
+ provided, the customer will be redirected to the `redirectUrl` instead — see above.
1615
+
1616
+ Mollie will always give you status updates via webhooks, including for the canceled status. This parameter is
1617
+ therefore entirely optional, but can be useful when implementing a dedicated customer-facing flow to handle
1618
+ payment cancellations.
1619
+ """
1620
+
1621
+ webhook_url: Annotated[
1622
+ OptionalNullable[str], pydantic.Field(alias="webhookUrl")
1623
+ ] = UNSET
1624
+ r"""The webhook URL where we will send payment status updates to.
1625
+
1626
+ The webhookUrl is optional, but without a webhook you will miss out on important status changes to your payment.
1627
+
1628
+ The webhookUrl must be reachable from Mollie's point of view, so you cannot use `localhost`. If you want to use
1629
+ webhook during development on `localhost`, you must use a tool like ngrok to have the webhooks delivered to your
1630
+ local machine.
1631
+ """
1632
+
1633
+ lines: OptionalNullable[List[ListPaymentResponseLine]] = UNSET
1634
+ r"""Optionally provide the order lines for the payment. Each line contains details such as a description of the item
1635
+ ordered and its price.
1636
+
1637
+ All lines must have the same currency as the payment.
1638
+
1639
+ Required for payment methods `billie`, `in3`, `klarna`, `riverty` and `voucher`.
1640
+ """
1641
+
1642
+ billing_address: Annotated[
1643
+ Optional[ListPaymentResponseBillingAddress],
1644
+ 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[ListPaymentResponseApplicationFee],
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[ListPaymentResponseDetails] = 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