Package com.stripe.model
Class PaymentLink
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.PaymentLink
- All Implemented Interfaces:
- HasId,- MetadataStore<PaymentLink>,- StripeActiveObject,- StripeObjectInterface
A payment link is a shareable URL that will take your customers to a hosted payment page. A
 payment link can be shared and used multiple times.
 
When a customer opens a payment link it will open a new checkout session to render the payment page. You can use checkout session events to track payments through payment links.
Related guide: Payment Links API
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classFor more details about AfterCompletion, please refer to the API Reference.static classFor more details about AutomaticTax, please refer to the API Reference.static classFor more details about ConsentCollection, please refer to the API Reference.static classFor more details about CustomField, please refer to the API Reference.static classFor more details about CustomText, please refer to the API Reference.static classFor more details about InvoiceCreation, please refer to the API Reference.static classFor more details about NameCollection, please refer to the API Reference.static classFor more details about OptionalItem, please refer to the API Reference.static classFor more details about PaymentIntentData, please refer to the API Reference.static classFor more details about PhoneNumberCollection, please refer to the API Reference.static classFor more details about Restrictions, please refer to the API Reference.static classFor more details about ShippingAddressCollection, please refer to the API Reference.static classFor more details about ShippingOption, please refer to the API Reference.static classFor more details about SubscriptionData, please refer to the API Reference.static classFor more details about TaxIdCollection, please refer to the API Reference.static classFor more details about TransferData, please refer to the API Reference.Nested classes/interfaces inherited from class com.stripe.net.ApiResourceApiResource.RequestMethod
- 
Field SummaryFields inherited from class com.stripe.net.ApiResourceCHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObjectPRETTY_PRINT_GSON
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanstatic PaymentLinkcreate(PaymentLinkCreateParams params) Creates a payment link.static PaymentLinkcreate(PaymentLinkCreateParams params, RequestOptions options) Creates a payment link.static PaymentLinkCreates a payment link.static PaymentLinkcreate(Map<String, Object> params, RequestOptions options) Creates a payment link.booleanWhether the payment link'surlis active.Whether user redeemable promotion codes are enabled.Get ID of expandableapplicationobject.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.This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.Get expandedapplication.Configuration for collecting the customer's billing address.When set, provides configuration to gather active consent from customers.Three-letter ISO currency code, in lowercase.Configuration for Customer creation during checkout.Collect additional information from your customer using custom fields.getId()Unique identifier for the object.The custom message to be displayed to a customer when a payment link is no longer active.Configuration for creating invoice for payment mode payment links.The line items representing what is being sold.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.Get ID of expandableonBehalfOfobject.Get expandedonBehalfOf.The optional items presented to the customer at checkout.Indicates the parameters to be passed to PaymentIntent creation during checkout.Configuration for collecting a payment method during checkout.The list of payment method types that customers can use.Settings that restrict the usage of a payment link.Configuration for collecting the customer's shipping address.The shipping rate options applied to the session.Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.When creating a subscription, the specified configuration data will be used.The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.getUrl()The public URL that can be shared with customers.inthashCode()static PaymentLinkCollectionlist(PaymentLinkListParams params) Returns a list of your payment links.static PaymentLinkCollectionlist(PaymentLinkListParams params, RequestOptions options) Returns a list of your payment links.static PaymentLinkCollectionReturns a list of your payment links.static PaymentLinkCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of your payment links.When retrieving a payment link, there is an includable line_items property containing the first handful of those items.When retrieving a payment link, there is an includable line_items property containing the first handful of those items.listLineItems(PaymentLinkListLineItemsParams params, RequestOptions options) When retrieving a payment link, there is an includable line_items property containing the first handful of those items.listLineItems(Map<String, Object> params) When retrieving a payment link, there is an includable line_items property containing the first handful of those items.listLineItems(Map<String, Object> params, RequestOptions options) When retrieving a payment link, there is an includable line_items property containing the first handful of those items.static PaymentLinkRetrieve a payment link.static PaymentLinkretrieve(String paymentLink, RequestOptions options) Retrieve a payment link.static PaymentLinkretrieve(String paymentLink, PaymentLinkRetrieveParams params, RequestOptions options) Retrieve a payment link.static PaymentLinkRetrieve a payment link.voidWhether the payment link'surlis active.voidsetAfterCompletion(PaymentLink.AfterCompletion afterCompletion) voidsetAllowPromotionCodes(Boolean allowPromotionCodes) Whether user redeemable promotion codes are enabled.voidsetApplication(String id) voidsetApplicationFeeAmount(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.voidsetApplicationFeePercent(BigDecimal applicationFeePercent) This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.voidsetApplicationObject(Application expandableObject) voidsetAutomaticTax(PaymentLink.AutomaticTax automaticTax) voidsetBillingAddressCollection(String billingAddressCollection) Configuration for collecting the customer's billing address.voidsetConsentCollection(PaymentLink.ConsentCollection consentCollection) When set, provides configuration to gather active consent from customers.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCustomerCreation(String customerCreation) Configuration for Customer creation during checkout.voidsetCustomFields(List<PaymentLink.CustomField> customFields) Collect additional information from your customer using custom fields.voidsetCustomText(PaymentLink.CustomText customText) voidUnique identifier for the object.voidsetInactiveMessage(String inactiveMessage) The custom message to be displayed to a customer when a payment link is no longer active.voidsetInvoiceCreation(PaymentLink.InvoiceCreation invoiceCreation) Configuration for creating invoice for payment mode payment links.voidsetLineItems(LineItemCollection lineItems) The line items representing what is being sold.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidsetNameCollection(PaymentLink.NameCollection nameCollection) voidString representing the object's type.voidsetOnBehalfOf(String id) voidsetOnBehalfOfObject(Account expandableObject) voidsetOptionalItems(List<PaymentLink.OptionalItem> optionalItems) The optional items presented to the customer at checkout.voidsetPaymentIntentData(PaymentLink.PaymentIntentData paymentIntentData) Indicates the parameters to be passed to PaymentIntent creation during checkout.voidsetPaymentMethodCollection(String paymentMethodCollection) Configuration for collecting a payment method during checkout.voidsetPaymentMethodTypes(List<String> paymentMethodTypes) The list of payment method types that customers can use.voidsetPhoneNumberCollection(PaymentLink.PhoneNumberCollection phoneNumberCollection) voidsetResponseGetter(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.voidsetRestrictions(PaymentLink.Restrictions restrictions) Settings that restrict the usage of a payment link.voidsetShippingAddressCollection(PaymentLink.ShippingAddressCollection shippingAddressCollection) Configuration for collecting the customer's shipping address.voidsetShippingOptions(List<PaymentLink.ShippingOption> shippingOptions) The shipping rate options applied to the session.voidsetSubmitType(String submitType) Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.voidsetSubscriptionData(PaymentLink.SubscriptionData subscriptionData) When creating a subscription, the specified configuration data will be used.voidsetTaxIdCollection(PaymentLink.TaxIdCollection taxIdCollection) voidsetTransferData(PaymentLink.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.voidThe public URL that can be shared with customers.update(PaymentLinkUpdateParams params) Updates a payment link.update(PaymentLinkUpdateParams params, RequestOptions options) Updates a payment link.Updates a payment link.update(Map<String, Object> params, RequestOptions options) Updates a payment link.Methods inherited from class com.stripe.net.ApiResourcecheckNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObjectdeserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObjecttrySetResponseGetter
- 
Constructor Details- 
PaymentLinkpublic PaymentLink()
 
- 
- 
Method Details- 
getApplicationGet ID of expandableapplicationobject.
- 
setApplication
- 
getApplicationObjectGet expandedapplication.
- 
setApplicationObject
- 
getOnBehalfOfGet ID of expandableonBehalfOfobject.
- 
setOnBehalfOf
- 
getOnBehalfOfObjectGet expandedonBehalfOf.
- 
setOnBehalfOfObject
- 
createCreates a payment link.- Throws:
- StripeException
 
- 
createpublic static PaymentLink create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a payment link.- Throws:
- StripeException
 
- 
createCreates a payment link.- Throws:
- StripeException
 
- 
createpublic static PaymentLink create(PaymentLinkCreateParams params, RequestOptions options) throws StripeException Creates a payment link.- Throws:
- StripeException
 
- 
listReturns a list of your payment links.- Throws:
- StripeException
 
- 
listpublic static PaymentLinkCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your payment links.- Throws:
- StripeException
 
- 
listReturns a list of your payment links.- Throws:
- StripeException
 
- 
listpublic static PaymentLinkCollection list(PaymentLinkListParams params, RequestOptions options) throws StripeException Returns a list of your payment links.- Throws:
- StripeException
 
- 
listLineItemsWhen retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
- StripeException
 
- 
listLineItemsWhen retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
- StripeException
 
- 
listLineItemspublic LineItemCollection listLineItems(Map<String, Object> params, RequestOptions options) throws StripeExceptionWhen retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
- StripeException
 
- 
listLineItemspublic LineItemCollection listLineItems(PaymentLinkListLineItemsParams params) throws StripeException When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
- StripeException
 
- 
listLineItemspublic LineItemCollection listLineItems(PaymentLinkListLineItemsParams params, RequestOptions options) throws StripeException When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
- StripeException
 
- 
retrieveRetrieve a payment link.- Throws:
- StripeException
 
- 
retrievepublic static PaymentLink retrieve(String paymentLink, RequestOptions options) throws StripeException Retrieve a payment link.- Throws:
- StripeException
 
- 
retrievepublic static PaymentLink retrieve(String paymentLink, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieve a payment link.- Throws:
- StripeException
 
- 
retrievepublic static PaymentLink retrieve(String paymentLink, PaymentLinkRetrieveParams params, RequestOptions options) throws StripeException Retrieve a payment link.- Throws:
- StripeException
 
- 
updateUpdates a payment link.- Specified by:
- updatein interface- MetadataStore<PaymentLink>
- Throws:
- StripeException
 
- 
updateUpdates a payment link.- Specified by:
- updatein interface- MetadataStore<PaymentLink>
- Throws:
- StripeException
 
- 
updateUpdates a payment link.- Throws:
- StripeException
 
- 
updatepublic PaymentLink update(PaymentLinkUpdateParams params, RequestOptions options) throws StripeException Updates a payment link.- Throws:
- StripeException
 
- 
setResponseGetterDescription copied from interface:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
- setResponseGetterin interface- StripeActiveObject
- Overrides:
- setResponseGetterin class- ApiResource
- Parameters:
- responseGetter- the- StripeResponseGetterinstance to use for making further requests.
 
- 
getActiveWhether the payment link'surlis active. Iffalse, customers visiting the URL will be shown a page saying that the link has been deactivated.
- 
getAfterCompletion
- 
getAllowPromotionCodesWhether user redeemable promotion codes are enabled.
- 
getApplicationFeeAmountThe 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.
- 
getApplicationFeePercentThis represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
- 
getAutomaticTax
- 
getBillingAddressCollectionConfiguration for collecting the customer's billing address. Defaults toauto.One of auto, orrequired.
- 
getConsentCollectionWhen set, provides configuration to gather active consent from customers.
- 
getCurrencyThree-letter ISO currency code, in lowercase. Must be a supported currency.
- 
getCustomFieldsCollect additional information from your customer using custom fields. Up to 3 fields are supported.
- 
getCustomText
- 
getCustomerCreationConfiguration for Customer creation during checkout.One of always, orif_required.
- 
getInactiveMessageThe custom message to be displayed to a customer when a payment link is no longer active.
- 
getInvoiceCreationConfiguration for creating invoice for payment mode payment links.
- 
getLineItemsThe line items representing what is being sold.
- 
getLivemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
- 
getNameCollection
- 
getObjectString representing the object's type. Objects of the same type share the same value.Equal to payment_link.
- 
getOptionalItemsThe optional items presented to the customer at checkout.
- 
getPaymentIntentDataIndicates the parameters to be passed to PaymentIntent creation during checkout.
- 
getPaymentMethodCollectionConfiguration for collecting a payment method during checkout. Defaults toalways.One of always, orif_required.
- 
getPaymentMethodTypesThe list of payment method types that customers can use. Whennull, Stripe will dynamically show relevant payment methods you've enabled in your payment method settings.
- 
getPhoneNumberCollection
- 
getRestrictionsSettings that restrict the usage of a payment link.
- 
getShippingAddressCollectionConfiguration for collecting the customer's shipping address.
- 
getShippingOptionsThe shipping rate options applied to the session.
- 
getSubmitTypeIndicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.One of auto,book,donate,pay, orsubscribe.
- 
getSubscriptionDataWhen 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.
- 
getTaxIdCollection
- 
getTransferDataThe account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
- 
getUrlThe public URL that can be shared with customers.
- 
setActiveWhether the payment link'surlis active. Iffalse, customers visiting the URL will be shown a page saying that the link has been deactivated.
- 
setAfterCompletion
- 
setAllowPromotionCodesWhether user redeemable promotion codes are enabled.
- 
setApplicationFeeAmountThe 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.
- 
setApplicationFeePercentThis represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
- 
setAutomaticTax
- 
setBillingAddressCollectionConfiguration for collecting the customer's billing address. Defaults toauto.One of auto, orrequired.
- 
setConsentCollectionWhen set, provides configuration to gather active consent from customers.
- 
setCurrencyThree-letter ISO currency code, in lowercase. Must be a supported currency.
- 
setCustomFieldsCollect additional information from your customer using custom fields. Up to 3 fields are supported.
- 
setCustomText
- 
setCustomerCreationConfiguration for Customer creation during checkout.One of always, orif_required.
- 
setIdUnique identifier for the object.
- 
setInactiveMessageThe custom message to be displayed to a customer when a payment link is no longer active.
- 
setInvoiceCreationConfiguration for creating invoice for payment mode payment links.
- 
setLineItemsThe line items representing what is being sold.
- 
setLivemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
- 
setMetadataSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- 
setNameCollection
- 
setObjectString representing the object's type. Objects of the same type share the same value.Equal to payment_link.
- 
setOptionalItemsThe optional items presented to the customer at checkout.
- 
setPaymentIntentDataIndicates the parameters to be passed to PaymentIntent creation during checkout.
- 
setPaymentMethodCollectionConfiguration for collecting a payment method during checkout. Defaults toalways.One of always, orif_required.
- 
setPaymentMethodTypesThe list of payment method types that customers can use. Whennull, Stripe will dynamically show relevant payment methods you've enabled in your payment method settings.
- 
setPhoneNumberCollection
- 
setRestrictionsSettings that restrict the usage of a payment link.
- 
setShippingAddressCollectionpublic void setShippingAddressCollection(PaymentLink.ShippingAddressCollection shippingAddressCollection) Configuration for collecting the customer's shipping address.
- 
setShippingOptionsThe shipping rate options applied to the session.
- 
setSubmitTypeIndicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.One of auto,book,donate,pay, orsubscribe.
- 
setSubscriptionDataWhen 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
- 
setTransferDataThe account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
- 
setUrlThe public URL that can be shared with customers.
- 
equals
- 
canEqual
- 
hashCodepublic int hashCode()
- 
getIdUnique identifier for the object.
- 
getMetadataSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.- Specified by:
- getMetadatain interface- MetadataStore<PaymentLink>
 
 
-