Debian Codegraph @

stripe/params/_payment_link_create_params.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from stripe._request_options import RequestOptions
4 from typing import Dict, List
5 from typing_extensions import Literal, NotRequired, TypedDict
6
7
8 class PaymentLinkCreateParams(RequestOptions):
9 after_completion: NotRequired["PaymentLinkCreateParamsAfterCompletion"]
10 """
11 Behavior after the purchase is complete.
12 """
13 allow_promotion_codes: NotRequired[bool]
14 """
15 Enables user redeemable promotion codes.
16 """
17 application_fee_amount: NotRequired[int]
18 """
19 The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices.
20 """
21 application_fee_percent: NotRequired[float]
22 """
23 A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
24 """
25 automatic_tax: NotRequired["PaymentLinkCreateParamsAutomaticTax"]
26 """
27 Configuration for automatic tax collection.
28 """
29 billing_address_collection: NotRequired[Literal["auto", "required"]]
30 """
31 Configuration for collecting the customer's billing address. Defaults to `auto`.
32 """
33 consent_collection: NotRequired["PaymentLinkCreateParamsConsentCollection"]
34 """
35 Configure fields to gather active consent from customers.
36 """
37 currency: NotRequired[str]
38 """
39 Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price.
40 """
41 custom_fields: NotRequired[List["PaymentLinkCreateParamsCustomField"]]
42 """
43 Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`.
44 """
45 custom_text: NotRequired["PaymentLinkCreateParamsCustomText"]
46 """
47 Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `custom`.
48 """
49 customer_creation: NotRequired[Literal["always", "if_required"]]
50 """
51 Configures whether [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link create a [Customer](https://docs.stripe.com/api/customers).
52 """
53 expand: NotRequired[List[str]]
54 """
55 Specifies which fields in the response should be expanded.
56 """
57 inactive_message: NotRequired[str]
58 """
59 The custom message to be displayed to a customer when a payment link is no longer active.
60 """
61 invoice_creation: NotRequired["PaymentLinkCreateParamsInvoiceCreation"]
62 """
63 Generate a post-purchase Invoice for one-time payments.
64 """
65 line_items: List["PaymentLinkCreateParamsLineItem"]
66 """
67 The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
68 """
69 metadata: NotRequired[Dict[str, str]]
70 """
71 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link.
72 """
73 name_collection: NotRequired["PaymentLinkCreateParamsNameCollection"]
74 """
75 Controls settings applied for collecting the customer's name.
76 """
77 on_behalf_of: NotRequired[str]
78 """
79 The account on behalf of which to charge.
80 """
81 optional_items: NotRequired[List["PaymentLinkCreateParamsOptionalItem"]]
82 """
83 A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://docs.stripe.com/api/prices).
84 There is a maximum of 10 optional items allowed on a payment link, and the existing limits on the number of line items allowed on a payment link apply to the combined number of line items and optional items.
85 There is a maximum of 20 combined line items and optional items.
86 """
87 payment_intent_data: NotRequired[
88 "PaymentLinkCreateParamsPaymentIntentData"
89 ]
90 """
91 A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
92 """
93 payment_method_collection: NotRequired[Literal["always", "if_required"]]
94 """
95 Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.
96
97 Can only be set in `subscription` mode. Defaults to `always`.
98
99 If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://docs.stripe.com/payments/checkout/free-trials).
100 """
101 payment_method_types: NotRequired[
102 List[
103 Literal[
104 "affirm",
105 "afterpay_clearpay",
106 "alipay",
107 "alma",
108 "au_becs_debit",
109 "bacs_debit",
110 "bancontact",
111 "billie",
112 "blik",
113 "boleto",
114 "card",
115 "cashapp",
116 "eps",
117 "fpx",
118 "giropay",
119 "grabpay",
120 "ideal",
121 "klarna",
122 "konbini",
123 "link",
124 "mb_way",
125 "mobilepay",
126 "multibanco",
127 "oxxo",
128 "p24",
129 "pay_by_bank",
130 "paynow",
131 "paypal",
132 "payto",
133 "pix",
134 "promptpay",
135 "satispay",
136 "sepa_debit",
137 "sofort",
138 "swish",
139 "twint",
140 "us_bank_account",
141 "wechat_pay",
142 "zip",
143 ]
144 ]
145 ]
146 """
147 The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://docs.stripe.com/payments/payment-methods/integration-options#payment-method-product-support)).
148 """
149 phone_number_collection: NotRequired[
150 "PaymentLinkCreateParamsPhoneNumberCollection"
151 ]
152 """
153 Controls phone number collection settings during checkout.
154
155 We recommend that you review your privacy policy and check with your legal contacts.
156 """
157 restrictions: NotRequired["PaymentLinkCreateParamsRestrictions"]
158 """
159 Settings that restrict the usage of a payment link.
160 """
161 shipping_address_collection: NotRequired[
162 "PaymentLinkCreateParamsShippingAddressCollection"
163 ]
164 """
165 Configuration for collecting the customer's shipping address.
166 """
167 shipping_options: NotRequired[
168 List["PaymentLinkCreateParamsShippingOption"]
169 ]
170 """
171 The shipping rate options to apply to [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link.
172 """
173 submit_type: NotRequired[
174 Literal["auto", "book", "donate", "pay", "subscribe"]
175 ]
176 """
177 Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://docs.stripe.com/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).
178 """
179 subscription_data: NotRequired["PaymentLinkCreateParamsSubscriptionData"]
180 """
181 When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
182 """
183 tax_id_collection: NotRequired["PaymentLinkCreateParamsTaxIdCollection"]
184 """
185 Controls tax ID collection during checkout.
186 """
187 transfer_data: NotRequired["PaymentLinkCreateParamsTransferData"]
188 """
189 The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
190 """
191
192
193 class PaymentLinkCreateParamsAfterCompletion(TypedDict):
194 hosted_confirmation: NotRequired[
195 "PaymentLinkCreateParamsAfterCompletionHostedConfirmation"
196 ]
197 """
198 Configuration when `type=hosted_confirmation`.
199 """
200 redirect: NotRequired["PaymentLinkCreateParamsAfterCompletionRedirect"]
201 """
202 Configuration when `type=redirect`.
203 """
204 type: Literal["hosted_confirmation", "redirect"]
205 """
206 The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
207 """
208
209
210 class PaymentLinkCreateParamsAfterCompletionHostedConfirmation(TypedDict):
211 custom_message: NotRequired[str]
212 """
213 A custom message to display to the customer after the purchase is complete.
214 """
215
216
217 class PaymentLinkCreateParamsAfterCompletionRedirect(TypedDict):
218 url: str
219 """
220 The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-id) included.
221 """
222
223
224 class PaymentLinkCreateParamsAutomaticTax(TypedDict):
225 enabled: bool
226 """
227 Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
228
229 Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
230 """
231 liability: NotRequired["PaymentLinkCreateParamsAutomaticTaxLiability"]
232 """
233 The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
234 """
235
236
237 class PaymentLinkCreateParamsAutomaticTaxLiability(TypedDict):
238 account: NotRequired[str]
239 """
240 The connected account being referenced when `type` is `account`.
241 """
242 type: Literal["account", "self"]
243 """
244 Type of the account referenced in the request.
245 """
246
247
248 class PaymentLinkCreateParamsConsentCollection(TypedDict):
249 payment_method_reuse_agreement: NotRequired[
250 "PaymentLinkCreateParamsConsentCollectionPaymentMethodReuseAgreement"
251 ]
252 """
253 Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
254 """
255 promotions: NotRequired[Literal["auto", "none"]]
256 """
257 If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
258 Session will determine whether to display an option to opt into promotional communication
259 from the merchant depending on the customer's locale. Only available to US merchants.
260 """
261 terms_of_service: NotRequired[Literal["none", "required"]]
262 """
263 If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
264 There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
265 """
266
267
268 class PaymentLinkCreateParamsConsentCollectionPaymentMethodReuseAgreement(
269 TypedDict,
270 ):
271 position: Literal["auto", "hidden"]
272 """
273 Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
274 defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
275 """
276
277
278 class PaymentLinkCreateParamsCustomField(TypedDict):
279 dropdown: NotRequired["PaymentLinkCreateParamsCustomFieldDropdown"]
280 """
281 Configuration for `type=dropdown` fields.
282 """
283 key: str
284 """
285 String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
286 """
287 label: "PaymentLinkCreateParamsCustomFieldLabel"
288 """
289 The label for the field, displayed to the customer.
290 """
291 numeric: NotRequired["PaymentLinkCreateParamsCustomFieldNumeric"]
292 """
293 Configuration for `type=numeric` fields.
294 """
295 optional: NotRequired[bool]
296 """
297 Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
298 """
299 text: NotRequired["PaymentLinkCreateParamsCustomFieldText"]
300 """
301 Configuration for `type=text` fields.
302 """
303 type: Literal["dropdown", "numeric", "text"]
304 """
305 The type of the field.
306 """
307
308
309 class PaymentLinkCreateParamsCustomFieldDropdown(TypedDict):
310 default_value: NotRequired[str]
311 """
312 The value that pre-fills the field on the payment page.Must match a `value` in the `options` array.
313 """
314 options: List["PaymentLinkCreateParamsCustomFieldDropdownOption"]
315 """
316 The options available for the customer to select. Up to 200 options allowed.
317 """
318
319
320 class PaymentLinkCreateParamsCustomFieldDropdownOption(TypedDict):
321 label: str
322 """
323 The label for the option, displayed to the customer. Up to 100 characters.
324 """
325 value: str
326 """
327 The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
328 """
329
330
331 class PaymentLinkCreateParamsCustomFieldLabel(TypedDict):
332 custom: str
333 """
334 Custom text for the label, displayed to the customer. Up to 50 characters.
335 """
336 type: Literal["custom"]
337 """
338 The type of the label.
339 """
340
341
342 class PaymentLinkCreateParamsCustomFieldNumeric(TypedDict):
343 default_value: NotRequired[str]
344 """
345 The value that pre-fills the field on the payment page.
346 """
347 maximum_length: NotRequired[int]
348 """
349 The maximum character length constraint for the customer's input.
350 """
351 minimum_length: NotRequired[int]
352 """
353 The minimum character length requirement for the customer's input.
354 """
355
356
357 class PaymentLinkCreateParamsCustomFieldText(TypedDict):
358 default_value: NotRequired[str]
359 """
360 The value that pre-fills the field on the payment page.
361 """
362 maximum_length: NotRequired[int]
363 """
364 The maximum character length constraint for the customer's input.
365 """
366 minimum_length: NotRequired[int]
367 """
368 The minimum character length requirement for the customer's input.
369 """
370
371
372 class PaymentLinkCreateParamsCustomText(TypedDict):
373 after_submit: NotRequired[
374 "Literal['']|PaymentLinkCreateParamsCustomTextAfterSubmit"
375 ]
376 """
377 Custom text that should be displayed after the payment confirmation button.
378 """
379 shipping_address: NotRequired[
380 "Literal['']|PaymentLinkCreateParamsCustomTextShippingAddress"
381 ]
382 """
383 Custom text that should be displayed alongside shipping address collection.
384 """
385 submit: NotRequired["Literal['']|PaymentLinkCreateParamsCustomTextSubmit"]
386 """
387 Custom text that should be displayed alongside the payment confirmation button.
388 """
389 terms_of_service_acceptance: NotRequired[
390 "Literal['']|PaymentLinkCreateParamsCustomTextTermsOfServiceAcceptance"
391 ]
392 """
393 Custom text that should be displayed in place of the default terms of service agreement text.
394 """
395
396
397 class PaymentLinkCreateParamsCustomTextAfterSubmit(TypedDict):
398 message: str
399 """
400 Text can be up to 1200 characters in length.
401 """
402
403
404 class PaymentLinkCreateParamsCustomTextShippingAddress(TypedDict):
405 message: str
406 """
407 Text can be up to 1200 characters in length.
408 """
409
410
411 class PaymentLinkCreateParamsCustomTextSubmit(TypedDict):
412 message: str
413 """
414 Text can be up to 1200 characters in length.
415 """
416
417
418 class PaymentLinkCreateParamsCustomTextTermsOfServiceAcceptance(TypedDict):
419 message: str
420 """
421 Text can be up to 1200 characters in length.
422 """
423
424
425 class PaymentLinkCreateParamsInvoiceCreation(TypedDict):
426 enabled: bool
427 """
428 Whether the feature is enabled
429 """
430 invoice_data: NotRequired[
431 "PaymentLinkCreateParamsInvoiceCreationInvoiceData"
432 ]
433 """
434 Invoice PDF configuration.
435 """
436
437
438 class PaymentLinkCreateParamsInvoiceCreationInvoiceData(TypedDict):
439 account_tax_ids: NotRequired["Literal['']|List[str]"]
440 """
441 The account tax IDs associated with the invoice.
442 """
443 custom_fields: NotRequired[
444 "Literal['']|List[PaymentLinkCreateParamsInvoiceCreationInvoiceDataCustomField]"
445 ]
446 """
447 Default custom fields to be displayed on invoices for this customer.
448 """
449 description: NotRequired[str]
450 """
451 An arbitrary string attached to the object. Often useful for displaying to users.
452 """
453 footer: NotRequired[str]
454 """
455 Default footer to be displayed on invoices for this customer.
456 """
457 issuer: NotRequired[
458 "PaymentLinkCreateParamsInvoiceCreationInvoiceDataIssuer"
459 ]
460 """
461 The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
462 """
463 metadata: NotRequired["Literal['']|Dict[str, str]"]
464 """
465 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
466 """
467 rendering_options: NotRequired[
468 "Literal['']|PaymentLinkCreateParamsInvoiceCreationInvoiceDataRenderingOptions"
469 ]
470 """
471 Default options for invoice PDF rendering for this customer.
472 """
473
474
475 class PaymentLinkCreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict):
476 name: str
477 """
478 The name of the custom field. This may be up to 40 characters.
479 """
480 value: str
481 """
482 The value of the custom field. This may be up to 140 characters.
483 """
484
485
486 class PaymentLinkCreateParamsInvoiceCreationInvoiceDataIssuer(TypedDict):
487 account: NotRequired[str]
488 """
489 The connected account being referenced when `type` is `account`.
490 """
491 type: Literal["account", "self"]
492 """
493 Type of the account referenced in the request.
494 """
495
496
497 class PaymentLinkCreateParamsInvoiceCreationInvoiceDataRenderingOptions(
498 TypedDict,
499 ):
500 amount_tax_display: NotRequired[
501 "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']"
502 ]
503 """
504 How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
505 """
506 template: NotRequired[str]
507 """
508 ID of the invoice rendering template to use for this invoice.
509 """
510
511
512 class PaymentLinkCreateParamsLineItem(TypedDict):
513 adjustable_quantity: NotRequired[
514 "PaymentLinkCreateParamsLineItemAdjustableQuantity"
515 ]
516 """
517 When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.
518 """
519 price: NotRequired[str]
520 """
521 The ID of the [Price](https://docs.stripe.com/api/prices) or [Plan](https://docs.stripe.com/api/plans) object. One of `price` or `price_data` is required.
522 """
523 price_data: NotRequired["PaymentLinkCreateParamsLineItemPriceData"]
524 """
525 Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
526 """
527 quantity: int
528 """
529 The quantity of the line item being purchased.
530 """
531
532
533 class PaymentLinkCreateParamsLineItemAdjustableQuantity(TypedDict):
534 enabled: bool
535 """
536 Set to true if the quantity can be adjusted to any non-negative Integer.
537 """
538 maximum: NotRequired[int]
539 """
540 The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999.
541 """
542 minimum: NotRequired[int]
543 """
544 The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0.
545 """
546
547
548 class PaymentLinkCreateParamsLineItemPriceData(TypedDict):
549 currency: str
550 """
551 Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
552 """
553 product: NotRequired[str]
554 """
555 The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
556 """
557 product_data: NotRequired[
558 "PaymentLinkCreateParamsLineItemPriceDataProductData"
559 ]
560 """
561 Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
562 """
563 recurring: NotRequired["PaymentLinkCreateParamsLineItemPriceDataRecurring"]
564 """
565 The recurring components of a price such as `interval` and `interval_count`.
566 """
567 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
568 """
569 Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
570 """
571 unit_amount: NotRequired[int]
572 """
573 A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
574 """
575 unit_amount_decimal: NotRequired[str]
576 """
577 Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
578 """
579
580
581 class PaymentLinkCreateParamsLineItemPriceDataProductData(TypedDict):
582 description: NotRequired[str]
583 """
584 The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
585 """
586 images: NotRequired[List[str]]
587 """
588 A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
589 """
590 metadata: NotRequired[Dict[str, str]]
591 """
592 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
593 """
594 name: str
595 """
596 The product's name, meant to be displayable to the customer.
597 """
598 tax_code: NotRequired[str]
599 """
600 A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
601 """
602 unit_label: NotRequired[str]
603 """
604 A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
605 """
606
607
608 class PaymentLinkCreateParamsLineItemPriceDataRecurring(TypedDict):
609 interval: Literal["day", "month", "week", "year"]
610 """
611 Specifies billing frequency. Either `day`, `week`, `month` or `year`.
612 """
613 interval_count: NotRequired[int]
614 """
615 The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
616 """
617
618
619 class PaymentLinkCreateParamsNameCollection(TypedDict):
620 business: NotRequired["PaymentLinkCreateParamsNameCollectionBusiness"]
621 """
622 Controls settings applied for collecting the customer's business name.
623 """
624 individual: NotRequired["PaymentLinkCreateParamsNameCollectionIndividual"]
625 """
626 Controls settings applied for collecting the customer's individual name.
627 """
628
629
630 class PaymentLinkCreateParamsNameCollectionBusiness(TypedDict):
631 enabled: bool
632 """
633 Enable business name collection on the payment link. Defaults to `false`.
634 """
635 optional: NotRequired[bool]
636 """
637 Whether the customer is required to provide their business name before checking out. Defaults to `false`.
638 """
639
640
641 class PaymentLinkCreateParamsNameCollectionIndividual(TypedDict):
642 enabled: bool
643 """
644 Enable individual name collection on the payment link. Defaults to `false`.
645 """
646 optional: NotRequired[bool]
647 """
648 Whether the customer is required to provide their full name before checking out. Defaults to `false`.
649 """
650
651
652 class PaymentLinkCreateParamsOptionalItem(TypedDict):
653 adjustable_quantity: NotRequired[
654 "PaymentLinkCreateParamsOptionalItemAdjustableQuantity"
655 ]
656 """
657 When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order.
658 """
659 price: str
660 """
661 The ID of the [Price](https://docs.stripe.com/api/prices) or [Plan](https://docs.stripe.com/api/plans) object.
662 """
663 quantity: int
664 """
665 The initial quantity of the line item created when a customer chooses to add this optional item to their order.
666 """
667
668
669 class PaymentLinkCreateParamsOptionalItemAdjustableQuantity(TypedDict):
670 enabled: bool
671 """
672 Set to true if the quantity can be adjusted to any non-negative integer.
673 """
674 maximum: NotRequired[int]
675 """
676 The maximum quantity of this item the customer can purchase. By default this value is 99.
677 """
678 minimum: NotRequired[int]
679 """
680 The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0.
681 """
682
683
684 class PaymentLinkCreateParamsPaymentIntentData(TypedDict):
685 capture_method: NotRequired[
686 Literal["automatic", "automatic_async", "manual"]
687 ]
688 """
689 Controls when the funds will be captured from the customer's account.
690 """
691 description: NotRequired[str]
692 """
693 An arbitrary string attached to the object. Often useful for displaying to users.
694 """
695 metadata: NotRequired[Dict[str, str]]
696 """
697 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will declaratively set metadata on [Payment Intents](https://docs.stripe.com/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
698 """
699 setup_future_usage: NotRequired[Literal["off_session", "on_session"]]
700 """
701 Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session.
702
703 When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved.
704
705 When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments.
706
707 If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer.
708
709 If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent.
710
711 When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.
712 """
713 statement_descriptor: NotRequired[str]
714 """
715 Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
716
717 Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
718 """
719 statement_descriptor_suffix: NotRequired[str]
720 """
721 Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
722 """
723 transfer_group: NotRequired[str]
724 """
725 A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://docs.stripe.com/connect/separate-charges-and-transfers) for details.
726 """
727
728
729 class PaymentLinkCreateParamsPhoneNumberCollection(TypedDict):
730 enabled: bool
731 """
732 Set to `true` to enable phone number collection.
733 """
734
735
736 class PaymentLinkCreateParamsRestrictions(TypedDict):
737 completed_sessions: "PaymentLinkCreateParamsRestrictionsCompletedSessions"
738 """
739 Configuration for the `completed_sessions` restriction type.
740 """
741
742
743 class PaymentLinkCreateParamsRestrictionsCompletedSessions(TypedDict):
744 limit: int
745 """
746 The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
747 """
748
749
750 class PaymentLinkCreateParamsShippingAddressCollection(TypedDict):
751 allowed_countries: List[
752 Literal[
753 "AC",
754 "AD",
755 "AE",
756 "AF",
757 "AG",
758 "AI",
759 "AL",
760 "AM",
761 "AO",
762 "AQ",
763 "AR",
764 "AT",
765 "AU",
766 "AW",
767 "AX",
768 "AZ",
769 "BA",
770 "BB",
771 "BD",
772 "BE",
773 "BF",
774 "BG",
775 "BH",
776 "BI",
777 "BJ",
778 "BL",
779 "BM",
780 "BN",
781 "BO",
782 "BQ",
783 "BR",
784 "BS",
785 "BT",
786 "BV",
787 "BW",
788 "BY",
789 "BZ",
790 "CA",
791 "CD",
792 "CF",
793 "CG",
794 "CH",
795 "CI",
796 "CK",
797 "CL",
798 "CM",
799 "CN",
800 "CO",
801 "CR",
802 "CV",
803 "CW",
804 "CY",
805 "CZ",
806 "DE",
807 "DJ",
808 "DK",
809 "DM",
810 "DO",
811 "DZ",
812 "EC",
813 "EE",
814 "EG",
815 "EH",
816 "ER",
817 "ES",
818 "ET",
819 "FI",
820 "FJ",
821 "FK",
822 "FO",
823 "FR",
824 "GA",
825 "GB",
826 "GD",
827 "GE",
828 "GF",
829 "GG",
830 "GH",
831 "GI",
832 "GL",
833 "GM",
834 "GN",
835 "GP",
836 "GQ",
837 "GR",
838 "GS",
839 "GT",
840 "GU",
841 "GW",
842 "GY",
843 "HK",
844 "HN",
845 "HR",
846 "HT",
847 "HU",
848 "ID",
849 "IE",
850 "IL",
851 "IM",
852 "IN",
853 "IO",
854 "IQ",
855 "IS",
856 "IT",
857 "JE",
858 "JM",
859 "JO",
860 "JP",
861 "KE",
862 "KG",
863 "KH",
864 "KI",
865 "KM",
866 "KN",
867 "KR",
868 "KW",
869 "KY",
870 "KZ",
871 "LA",
872 "LB",
873 "LC",
874 "LI",
875 "LK",
876 "LR",
877 "LS",
878 "LT",
879 "LU",
880 "LV",
881 "LY",
882 "MA",
883 "MC",
884 "MD",
885 "ME",
886 "MF",
887 "MG",
888 "MK",
889 "ML",
890 "MM",
891 "MN",
892 "MO",
893 "MQ",
894 "MR",
895 "MS",
896 "MT",
897 "MU",
898 "MV",
899 "MW",
900 "MX",
901 "MY",
902 "MZ",
903 "NA",
904 "NC",
905 "NE",
906 "NG",
907 "NI",
908 "NL",
909 "NO",
910 "NP",
911 "NR",
912 "NU",
913 "NZ",
914 "OM",
915 "PA",
916 "PE",
917 "PF",
918 "PG",
919 "PH",
920 "PK",
921 "PL",
922 "PM",
923 "PN",
924 "PR",
925 "PS",
926 "PT",
927 "PY",
928 "QA",
929 "RE",
930 "RO",
931 "RS",
932 "RU",
933 "RW",
934 "SA",
935 "SB",
936 "SC",
937 "SD",
938 "SE",
939 "SG",
940 "SH",
941 "SI",
942 "SJ",
943 "SK",
944 "SL",
945 "SM",
946 "SN",
947 "SO",
948 "SR",
949 "SS",
950 "ST",
951 "SV",
952 "SX",
953 "SZ",
954 "TA",
955 "TC",
956 "TD",
957 "TF",
958 "TG",
959 "TH",
960 "TJ",
961 "TK",
962 "TL",
963 "TM",
964 "TN",
965 "TO",
966 "TR",
967 "TT",
968 "TV",
969 "TW",
970 "TZ",
971 "UA",
972 "UG",
973 "US",
974 "UY",
975 "UZ",
976 "VA",
977 "VC",
978 "VE",
979 "VG",
980 "VN",
981 "VU",
982 "WF",
983 "WS",
984 "XK",
985 "YE",
986 "YT",
987 "ZA",
988 "ZM",
989 "ZW",
990 "ZZ",
991 ]
992 ]
993 """
994 An array of two-letter ISO country codes representing which countries Checkout should provide as options for
995 shipping locations.
996 """
997
998
999 class PaymentLinkCreateParamsShippingOption(TypedDict):
1000 shipping_rate: NotRequired[str]
1001 """
1002 The ID of the Shipping Rate to use for this shipping option.
1003 """
1004
1005
1006 class PaymentLinkCreateParamsSubscriptionData(TypedDict):
1007 description: NotRequired[str]
1008 """
1009 The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1010 """
1011 invoice_settings: NotRequired[
1012 "PaymentLinkCreateParamsSubscriptionDataInvoiceSettings"
1013 ]
1014 """
1015 All invoices will be billed using the specified settings.
1016 """
1017 metadata: NotRequired[Dict[str, str]]
1018 """
1019 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will declaratively set metadata on [Subscriptions](https://docs.stripe.com/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
1020 """
1021 trial_period_days: NotRequired[int]
1022 """
1023 Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
1024 """
1025 trial_settings: NotRequired[
1026 "PaymentLinkCreateParamsSubscriptionDataTrialSettings"
1027 ]
1028 """
1029 Settings related to subscription trials.
1030 """
1031
1032
1033 class PaymentLinkCreateParamsSubscriptionDataInvoiceSettings(TypedDict):
1034 issuer: NotRequired[
1035 "PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer"
1036 ]
1037 """
1038 The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1039 """
1040
1041
1042 class PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict):
1043 account: NotRequired[str]
1044 """
1045 The connected account being referenced when `type` is `account`.
1046 """
1047 type: Literal["account", "self"]
1048 """
1049 Type of the account referenced in the request.
1050 """
1051
1052
1053 class PaymentLinkCreateParamsSubscriptionDataTrialSettings(TypedDict):
1054 end_behavior: (
1055 "PaymentLinkCreateParamsSubscriptionDataTrialSettingsEndBehavior"
1056 )
1057 """
1058 Defines how the subscription should behave when the user's free trial ends.
1059 """
1060
1061
1062 class PaymentLinkCreateParamsSubscriptionDataTrialSettingsEndBehavior(
1063 TypedDict,
1064 ):
1065 missing_payment_method: Literal["cancel", "create_invoice", "pause"]
1066 """
1067 Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1068 """
1069
1070
1071 class PaymentLinkCreateParamsTaxIdCollection(TypedDict):
1072 enabled: bool
1073 """
1074 Enable tax ID collection during checkout. Defaults to `false`.
1075 """
1076 required: NotRequired[Literal["if_supported", "never"]]
1077 """
1078 Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `custom`.
1079 """
1080
1081
1082 class PaymentLinkCreateParamsTransferData(TypedDict):
1083 amount: NotRequired[int]
1084 """
1085 The amount that will be transferred automatically when a charge succeeds.
1086 """
1087 destination: str
1088 """
1089 If specified, successful charges will be attributed to the destination
1090 account for tax reporting, and the funds from charges will be transferred
1091 to the destination account. The ID of the resulting transfer will be
1092 returned on the successful charge's `transfer` field.
1093 """