Package com.stripe.param
Class PaymentLinkCreateParams.Builder
java.lang.Object
com.stripe.param.PaymentLinkCreateParams.Builder
- Enclosing class:
- PaymentLinkCreateParams
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd all elements to `customFields` list.addAllExpand
(List<String> elements) Add all elements to `expand` list.addAllLineItem
(List<PaymentLinkCreateParams.LineItem> elements) Add all elements to `lineItems` list.Add all elements to `paymentMethodTypes` list.Add all elements to `shippingOptions` list.Add an element to `customFields` list.Add an element to `expand` list.Add an element to `lineItems` list.Add an element to `paymentMethodTypes` list.Add an element to `shippingOptions` list.build()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putAllMetadata
(Map<String, String> map) Add all map key/value pairs to `metadata` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.putMetadata
(String key, String value) Add a key/value pair to `metadata` map.setAfterCompletion
(PaymentLinkCreateParams.AfterCompletion afterCompletion) Behavior after the purchase is complete.setAllowPromotionCodes
(Boolean allowPromotionCodes) Enables user redeemable promotion codes.setApplicationFeeAmount
(Long applicationFeeAmount) 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.setApplicationFeePercent
(BigDecimal applicationFeePercent) A non-negative decimal between 0 and 100, with at most two decimal places.setAutomaticTax
(PaymentLinkCreateParams.AutomaticTax automaticTax) Configuration for automatic tax collection.setBillingAddressCollection
(PaymentLinkCreateParams.BillingAddressCollection billingAddressCollection) Configuration for collecting the customer's billing address.setConsentCollection
(PaymentLinkCreateParams.ConsentCollection consentCollection) Configure fields to gather active consent from customers.setCurrency
(String currency) Three-letter ISO currency code, in lowercase.setCustomerCreation
(PaymentLinkCreateParams.CustomerCreation customerCreation) Configures whether checkout sessions created by this payment link create a Customer.setCustomText
(PaymentLinkCreateParams.CustomText customText) Display additional text for your customers using custom text.setInactiveMessage
(String inactiveMessage) The custom message to be displayed to a customer when a payment link is no longer active.setInvoiceCreation
(PaymentLinkCreateParams.InvoiceCreation invoiceCreation) Generate a post-purchase Invoice for one-time payments.setOnBehalfOf
(String onBehalfOf) The account on behalf of which to charge.setPaymentIntentData
(PaymentLinkCreateParams.PaymentIntentData paymentIntentData) A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions inpayment
mode.setPaymentMethodCollection
(PaymentLinkCreateParams.PaymentMethodCollection paymentMethodCollection) Specify whether Checkout should collect a payment method.setPhoneNumberCollection
(PaymentLinkCreateParams.PhoneNumberCollection phoneNumberCollection) Controls phone number collection settings during checkout.setRestrictions
(PaymentLinkCreateParams.Restrictions restrictions) Settings that restrict the usage of a payment link.setShippingAddressCollection
(PaymentLinkCreateParams.ShippingAddressCollection shippingAddressCollection) Configuration for collecting the customer's shipping address.setSubmitType
(PaymentLinkCreateParams.SubmitType submitType) Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button.setSubscriptionData
(PaymentLinkCreateParams.SubscriptionData subscriptionData) When creating a subscription, the specified configuration data will be used.setTaxIdCollection
(PaymentLinkCreateParams.TaxIdCollection taxIdCollection) Controls tax ID collection during checkout.setTransferData
(PaymentLinkCreateParams.TransferData transferData) The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setAfterCompletion
public PaymentLinkCreateParams.Builder setAfterCompletion(PaymentLinkCreateParams.AfterCompletion afterCompletion) Behavior after the purchase is complete. -
setAllowPromotionCodes
Enables user redeemable promotion codes. -
setApplicationFeeAmount
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. -
setApplicationFeePercent
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. -
setAutomaticTax
public PaymentLinkCreateParams.Builder setAutomaticTax(PaymentLinkCreateParams.AutomaticTax automaticTax) Configuration for automatic tax collection. -
setBillingAddressCollection
public PaymentLinkCreateParams.Builder setBillingAddressCollection(PaymentLinkCreateParams.BillingAddressCollection billingAddressCollection) Configuration for collecting the customer's billing address. Defaults toauto
. -
setConsentCollection
public PaymentLinkCreateParams.Builder setConsentCollection(PaymentLinkCreateParams.ConsentCollection consentCollection) Configure fields to gather active consent from customers. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency and supported by each line item's price. -
addCustomField
Add an element to `customFields` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.customFields
for the field documentation. -
addAllCustomField
public PaymentLinkCreateParams.Builder addAllCustomField(List<PaymentLinkCreateParams.CustomField> elements) Add all elements to `customFields` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.customFields
for the field documentation. -
setCustomText
Display additional text for your customers using custom text. -
setCustomerCreation
public PaymentLinkCreateParams.Builder setCustomerCreation(PaymentLinkCreateParams.CustomerCreation customerCreation) Configures whether checkout sessions created by this payment link create a Customer. -
addExpand
Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.expand
for the field documentation. -
addAllExpand
Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.expand
for the field documentation. -
putExtraParam
Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeePaymentLinkCreateParams.extraParams
for the field documentation. -
putAllExtraParam
Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeePaymentLinkCreateParams.extraParams
for the field documentation. -
setInactiveMessage
The custom message to be displayed to a customer when a payment link is no longer active. -
setInvoiceCreation
public PaymentLinkCreateParams.Builder setInvoiceCreation(PaymentLinkCreateParams.InvoiceCreation invoiceCreation) Generate a post-purchase Invoice for one-time payments. -
addLineItem
Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.lineItems
for the field documentation. -
addAllLineItem
public PaymentLinkCreateParams.Builder addAllLineItem(List<PaymentLinkCreateParams.LineItem> elements) Add all elements to `lineItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.lineItems
for the field documentation. -
putMetadata
Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeePaymentLinkCreateParams.metadata
for the field documentation. -
putAllMetadata
Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeePaymentLinkCreateParams.metadata
for the field documentation. -
setOnBehalfOf
The account on behalf of which to charge. -
setPaymentIntentData
public PaymentLinkCreateParams.Builder setPaymentIntentData(PaymentLinkCreateParams.PaymentIntentData paymentIntentData) A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions inpayment
mode. -
setPaymentMethodCollection
public PaymentLinkCreateParams.Builder setPaymentMethodCollection(PaymentLinkCreateParams.PaymentMethodCollection paymentMethodCollection) Specify whether Checkout should collect a payment method. When set toif_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.Can only be set in
subscription
mode. Defaults toalways
.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.
-
addPaymentMethodType
public PaymentLinkCreateParams.Builder addPaymentMethodType(PaymentLinkCreateParams.PaymentMethodType element) Add an element to `paymentMethodTypes` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.paymentMethodTypes
for the field documentation. -
addAllPaymentMethodType
public PaymentLinkCreateParams.Builder addAllPaymentMethodType(List<PaymentLinkCreateParams.PaymentMethodType> elements) Add all elements to `paymentMethodTypes` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.paymentMethodTypes
for the field documentation. -
setPhoneNumberCollection
public PaymentLinkCreateParams.Builder setPhoneNumberCollection(PaymentLinkCreateParams.PhoneNumberCollection phoneNumberCollection) Controls phone number collection settings during checkout.We recommend that you review your privacy policy and check with your legal contacts.
-
setRestrictions
public PaymentLinkCreateParams.Builder setRestrictions(PaymentLinkCreateParams.Restrictions restrictions) Settings that restrict the usage of a payment link. -
setShippingAddressCollection
public PaymentLinkCreateParams.Builder setShippingAddressCollection(PaymentLinkCreateParams.ShippingAddressCollection shippingAddressCollection) Configuration for collecting the customer's shipping address. -
addShippingOption
public PaymentLinkCreateParams.Builder addShippingOption(PaymentLinkCreateParams.ShippingOption element) Add an element to `shippingOptions` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.shippingOptions
for the field documentation. -
addAllShippingOption
public PaymentLinkCreateParams.Builder addAllShippingOption(List<PaymentLinkCreateParams.ShippingOption> elements) Add all elements to `shippingOptions` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePaymentLinkCreateParams.shippingOptions
for the field documentation. -
setSubmitType
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 property (example:donate.stripe.com
). -
setSubscriptionData
public PaymentLinkCreateParams.Builder setSubscriptionData(PaymentLinkCreateParams.SubscriptionData subscriptionData) When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to usesubscription_data
. -
setTaxIdCollection
public PaymentLinkCreateParams.Builder setTaxIdCollection(PaymentLinkCreateParams.TaxIdCollection taxIdCollection) Controls tax ID collection during checkout. -
setTransferData
public PaymentLinkCreateParams.Builder setTransferData(PaymentLinkCreateParams.TransferData transferData) The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
-