Package com.adyen.model.checkout
Class CreatePaymentLinkRequest
- java.lang.Object
-
- com.adyen.model.checkout.CreatePaymentLinkRequest
-
public class CreatePaymentLinkRequest extends Object
CreatePaymentLinkRequest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreatePaymentLinkRequest.RecurringProcessingModelEnumDefines a recurring payment type.static classCreatePaymentLinkRequest.RequiredShopperFieldsEnumGets or Sets requiredShopperFieldsstatic classCreatePaymentLinkRequest.StorePaymentMethodModeEnumIndicates if the details of the payment method will be stored for the shopper.
-
Constructor Summary
Constructors Constructor Description CreatePaymentLinkRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreatePaymentLinkRequestaddAllowedPaymentMethodsItem(String allowedPaymentMethodsItem)CreatePaymentLinkRequestaddBlockedPaymentMethodsItem(String blockedPaymentMethodsItem)CreatePaymentLinkRequestaddLineItemsItem(LineItem lineItemsItem)CreatePaymentLinkRequestaddRequiredShopperFieldsItem(CreatePaymentLinkRequest.RequiredShopperFieldsEnum requiredShopperFieldsItem)CreatePaymentLinkRequestaddSplitsItem(Split splitsItem)CreatePaymentLinkRequestallowedPaymentMethods(List<String> allowedPaymentMethods)CreatePaymentLinkRequestamount(Amount amount)CreatePaymentLinkRequestapplicationInfo(ApplicationInfo applicationInfo)CreatePaymentLinkRequestbillingAddress(Address billingAddress)CreatePaymentLinkRequestblockedPaymentMethods(List<String> blockedPaymentMethods)CreatePaymentLinkRequestcaptureDelayHours(Integer captureDelayHours)CreatePaymentLinkRequestcountryCode(String countryCode)CreatePaymentLinkRequestdateOfBirth(Date dateOfBirth)CreatePaymentLinkRequestdeliverAt(Date deliverAt)CreatePaymentLinkRequestdeliveryAddress(Address deliveryAddress)CreatePaymentLinkRequestdescription(String description)booleanequals(Object o)CreatePaymentLinkRequestexpiresAt(String expiresAt)List<String>getAllowedPaymentMethods()List of payment methods to be presented to the shopper.AmountgetAmount()Get amountApplicationInfogetApplicationInfo()Get applicationInfoAddressgetBillingAddress()Get billingAddressList<String>getBlockedPaymentMethods()List of payment methods to be hidden from the shopper.IntegergetCaptureDelayHours()The delay between the authorisation and scheduled auto-capture, specified in hours.StringgetCountryCode()The shopper's two-letter country code.DategetDateOfBirth()The shopper's date of birth.DategetDeliverAt()The date and time the purchased goods should be delivered.AddressgetDeliveryAddress()Get deliveryAddressStringgetDescription()A short description visible on the payment page.StringgetExpiresAt()The date that the payment link expires, in ISO 8601 format.Map<String,InstallmentOption>getInstallmentOptions()A set of key-value pairs that specifies the installment options available per payment method.List<LineItem>getLineItems()Price and product information about the purchased items, to be included on the invoice sent to the shopper.StringgetMcc()The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment.StringgetMerchantAccount()The merchant account identifier for which the payment link is created.StringgetMerchantOrderReference()This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate).Map<String,String>getMetadata()Metadata consists of entries, each of which includes a key and a value.CreatePaymentLinkRequest.RecurringProcessingModelEnumgetRecurringProcessingModel()Defines a recurring payment type.StringgetReference()A reference that is used to uniquely identify the payment in future communications about the payment status.List<CreatePaymentLinkRequest.RequiredShopperFieldsEnum>getRequiredShopperFields()List of fields that the shopper has to provide on the payment page before completing the payment.StringgetReturnUrl()Website URL used for redirection after payment is completed.RiskDatagetRiskData()Get riskDataStringgetShopperEmail()The shopper's email address.StringgetShopperLocale()The language to be used in the payment page, specified by a combination of a language and country code.NamegetShopperName()Get shopperNameStringgetShopperReference()Your reference to uniquely identify this shopper (for example, user ID or account ID).List<Split>getSplits()An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms.StringgetStore()The physical store, for which this payment is processed.CreatePaymentLinkRequest.StorePaymentMethodModeEnumgetStorePaymentMethodMode()Indicates if the details of the payment method will be stored for the shopper.inthashCode()CreatePaymentLinkRequestinstallmentOptions(Map<String,InstallmentOption> installmentOptions)BooleanisReusable()Indicates whether the payment link can be reused for multiple payments.BooleanisStorePaymentMethod()When this is set to **true** and the `shopperReference` is provided, the payment details will be stored.CreatePaymentLinkRequestlineItems(List<LineItem> lineItems)CreatePaymentLinkRequestmcc(String mcc)CreatePaymentLinkRequestmerchantAccount(String merchantAccount)CreatePaymentLinkRequestmerchantOrderReference(String merchantOrderReference)CreatePaymentLinkRequestmetadata(Map<String,String> metadata)CreatePaymentLinkRequestputInstallmentOptionsItem(String key, InstallmentOption installmentOptionsItem)CreatePaymentLinkRequestputMetadataItem(String key, String metadataItem)CreatePaymentLinkRequestrecurringProcessingModel(CreatePaymentLinkRequest.RecurringProcessingModelEnum recurringProcessingModel)CreatePaymentLinkRequestreference(String reference)CreatePaymentLinkRequestrequiredShopperFields(List<CreatePaymentLinkRequest.RequiredShopperFieldsEnum> requiredShopperFields)CreatePaymentLinkRequestreturnUrl(String returnUrl)CreatePaymentLinkRequestreusable(Boolean reusable)CreatePaymentLinkRequestriskData(RiskData riskData)voidsetAllowedPaymentMethods(List<String> allowedPaymentMethods)voidsetAmount(Amount amount)voidsetApplicationInfo(ApplicationInfo applicationInfo)voidsetBillingAddress(Address billingAddress)voidsetBlockedPaymentMethods(List<String> blockedPaymentMethods)voidsetCaptureDelayHours(Integer captureDelayHours)voidsetCountryCode(String countryCode)voidsetDateOfBirth(Date dateOfBirth)voidsetDeliverAt(Date deliverAt)voidsetDeliveryAddress(Address deliveryAddress)voidsetDescription(String description)voidsetExpiresAt(String expiresAt)voidsetInstallmentOptions(Map<String,InstallmentOption> installmentOptions)voidsetLineItems(List<LineItem> lineItems)voidsetMcc(String mcc)voidsetMerchantAccount(String merchantAccount)voidsetMerchantOrderReference(String merchantOrderReference)voidsetMetadata(Map<String,String> metadata)voidsetRecurringProcessingModel(CreatePaymentLinkRequest.RecurringProcessingModelEnum recurringProcessingModel)voidsetReference(String reference)voidsetRequiredShopperFields(List<CreatePaymentLinkRequest.RequiredShopperFieldsEnum> requiredShopperFields)voidsetReturnUrl(String returnUrl)voidsetReusable(Boolean reusable)voidsetRiskData(RiskData riskData)voidsetShopperEmail(String shopperEmail)voidsetShopperLocale(String shopperLocale)voidsetShopperName(Name shopperName)voidsetShopperReference(String shopperReference)voidsetSplits(List<Split> splits)voidsetStore(String store)voidsetStorePaymentMethod(Boolean storePaymentMethod)voidsetStorePaymentMethodMode(CreatePaymentLinkRequest.StorePaymentMethodModeEnum storePaymentMethodMode)CreatePaymentLinkRequestshopperEmail(String shopperEmail)CreatePaymentLinkRequestshopperLocale(String shopperLocale)CreatePaymentLinkRequestshopperName(Name shopperName)CreatePaymentLinkRequestshopperReference(String shopperReference)CreatePaymentLinkRequestsplits(List<Split> splits)CreatePaymentLinkRequeststore(String store)CreatePaymentLinkRequeststorePaymentMethod(Boolean storePaymentMethod)CreatePaymentLinkRequeststorePaymentMethodMode(CreatePaymentLinkRequest.StorePaymentMethodModeEnum storePaymentMethodMode)StringtoString()
-
-
-
Method Detail
-
allowedPaymentMethods
public CreatePaymentLinkRequest allowedPaymentMethods(List<String> allowedPaymentMethods)
-
addAllowedPaymentMethodsItem
public CreatePaymentLinkRequest addAllowedPaymentMethodsItem(String allowedPaymentMethodsItem)
-
getAllowedPaymentMethods
public List<String> getAllowedPaymentMethods()
List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]`- Returns:
- allowedPaymentMethods
-
amount
public CreatePaymentLinkRequest amount(Amount amount)
-
getAmount
public Amount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
-
applicationInfo
public CreatePaymentLinkRequest applicationInfo(ApplicationInfo applicationInfo)
-
getApplicationInfo
public ApplicationInfo getApplicationInfo()
Get applicationInfo- Returns:
- applicationInfo
-
setApplicationInfo
public void setApplicationInfo(ApplicationInfo applicationInfo)
-
billingAddress
public CreatePaymentLinkRequest billingAddress(Address billingAddress)
-
getBillingAddress
public Address getBillingAddress()
Get billingAddress- Returns:
- billingAddress
-
setBillingAddress
public void setBillingAddress(Address billingAddress)
-
blockedPaymentMethods
public CreatePaymentLinkRequest blockedPaymentMethods(List<String> blockedPaymentMethods)
-
addBlockedPaymentMethodsItem
public CreatePaymentLinkRequest addBlockedPaymentMethodsItem(String blockedPaymentMethodsItem)
-
getBlockedPaymentMethods
public List<String> getBlockedPaymentMethods()
List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]`- Returns:
- blockedPaymentMethods
-
captureDelayHours
public CreatePaymentLinkRequest captureDelayHours(Integer captureDelayHours)
-
getCaptureDelayHours
public Integer getCaptureDelayHours()
The delay between the authorisation and scheduled auto-capture, specified in hours.- Returns:
- captureDelayHours
-
setCaptureDelayHours
public void setCaptureDelayHours(Integer captureDelayHours)
-
countryCode
public CreatePaymentLinkRequest countryCode(String countryCode)
-
getCountryCode
public String getCountryCode()
The shopper's two-letter country code.- Returns:
- countryCode
-
setCountryCode
public void setCountryCode(String countryCode)
-
dateOfBirth
public CreatePaymentLinkRequest dateOfBirth(Date dateOfBirth)
-
getDateOfBirth
public Date getDateOfBirth()
The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD- Returns:
- dateOfBirth
-
setDateOfBirth
public void setDateOfBirth(Date dateOfBirth)
-
deliverAt
public CreatePaymentLinkRequest deliverAt(Date deliverAt)
-
getDeliverAt
public Date getDeliverAt()
The date and time the purchased goods should be delivered.- Returns:
- deliverAt
-
setDeliverAt
public void setDeliverAt(Date deliverAt)
-
deliveryAddress
public CreatePaymentLinkRequest deliveryAddress(Address deliveryAddress)
-
getDeliveryAddress
public Address getDeliveryAddress()
Get deliveryAddress- Returns:
- deliveryAddress
-
setDeliveryAddress
public void setDeliveryAddress(Address deliveryAddress)
-
description
public CreatePaymentLinkRequest description(String description)
-
getDescription
public String getDescription()
A short description visible on the payment page. Maximum length: 280 characters.- Returns:
- description
-
setDescription
public void setDescription(String description)
-
expiresAt
public CreatePaymentLinkRequest expiresAt(String expiresAt)
-
getExpiresAt
public String getExpiresAt()
The date that the payment link expires, in ISO 8601 format. For example `2019-11-23T12:25:28Z`, or `2020-05-27T20:25:28+08:00`. Maximum expiry date should be 70 days from when the payment link is created. If not provided, the default expiry is set to 24 hours after the payment link is created.- Returns:
- expiresAt
-
setExpiresAt
public void setExpiresAt(String expiresAt)
-
installmentOptions
public CreatePaymentLinkRequest installmentOptions(Map<String,InstallmentOption> installmentOptions)
-
putInstallmentOptionsItem
public CreatePaymentLinkRequest putInstallmentOptionsItem(String key, InstallmentOption installmentOptionsItem)
-
getInstallmentOptions
public Map<String,InstallmentOption> getInstallmentOptions()
A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options.- Returns:
- installmentOptions
-
setInstallmentOptions
public void setInstallmentOptions(Map<String,InstallmentOption> installmentOptions)
-
lineItems
public CreatePaymentLinkRequest lineItems(List<LineItem> lineItems)
-
addLineItemsItem
public CreatePaymentLinkRequest addLineItemsItem(LineItem lineItemsItem)
-
getLineItems
public List<LineItem> getLineItems()
Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such AfterPay, Klarna, RatePay, and Zip.- Returns:
- lineItems
-
mcc
public CreatePaymentLinkRequest mcc(String mcc)
-
getMcc
public String getMcc()
The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.- Returns:
- mcc
-
setMcc
public void setMcc(String mcc)
-
merchantAccount
public CreatePaymentLinkRequest merchantAccount(String merchantAccount)
-
getMerchantAccount
public String getMerchantAccount()
The merchant account identifier for which the payment link is created.- Returns:
- merchantAccount
-
setMerchantAccount
public void setMerchantAccount(String merchantAccount)
-
merchantOrderReference
public CreatePaymentLinkRequest merchantOrderReference(String merchantOrderReference)
-
getMerchantOrderReference
public String getMerchantOrderReference()
This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle.- Returns:
- merchantOrderReference
-
setMerchantOrderReference
public void setMerchantOrderReference(String merchantOrderReference)
-
metadata
public CreatePaymentLinkRequest metadata(Map<String,String> metadata)
-
putMetadataItem
public CreatePaymentLinkRequest putMetadataItem(String key, String metadataItem)
-
getMetadata
public Map<String,String> getMetadata()
Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID.- Returns:
- metadata
-
recurringProcessingModel
public CreatePaymentLinkRequest recurringProcessingModel(CreatePaymentLinkRequest.RecurringProcessingModelEnum recurringProcessingModel)
-
getRecurringProcessingModel
public CreatePaymentLinkRequest.RecurringProcessingModelEnum getRecurringProcessingModel()
Defines a recurring payment type. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.- Returns:
- recurringProcessingModel
-
setRecurringProcessingModel
public void setRecurringProcessingModel(CreatePaymentLinkRequest.RecurringProcessingModelEnum recurringProcessingModel)
-
reference
public CreatePaymentLinkRequest reference(String reference)
-
getReference
public String getReference()
A reference that is used to uniquely identify the payment in future communications about the payment status.- Returns:
- reference
-
setReference
public void setReference(String reference)
-
requiredShopperFields
public CreatePaymentLinkRequest requiredShopperFields(List<CreatePaymentLinkRequest.RequiredShopperFieldsEnum> requiredShopperFields)
-
addRequiredShopperFieldsItem
public CreatePaymentLinkRequest addRequiredShopperFieldsItem(CreatePaymentLinkRequest.RequiredShopperFieldsEnum requiredShopperFieldsItem)
-
getRequiredShopperFields
public List<CreatePaymentLinkRequest.RequiredShopperFieldsEnum> getRequiredShopperFields()
List of fields that the shopper has to provide on the payment page before completing the payment. For more information, refer to [Provide shopper information](https://docs.adyen.com/online-payments/pay-by-link/api#shopper-information). Possible values: * **billingAddress** – The address where to send the invoice. * **deliveryAddress** – The address where the purchased goods should be delivered. * **shopperEmail** – The shopper's email address. * **shopperName** – The shopper's full name. * **telephoneNumber** – The shopper's phone number.- Returns:
- requiredShopperFields
-
setRequiredShopperFields
public void setRequiredShopperFields(List<CreatePaymentLinkRequest.RequiredShopperFieldsEnum> requiredShopperFields)
-
returnUrl
public CreatePaymentLinkRequest returnUrl(String returnUrl)
-
getReturnUrl
public String getReturnUrl()
Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL.- Returns:
- returnUrl
-
setReturnUrl
public void setReturnUrl(String returnUrl)
-
reusable
public CreatePaymentLinkRequest reusable(Boolean reusable)
-
isReusable
public Boolean isReusable()
Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only.- Returns:
- reusable
-
setReusable
public void setReusable(Boolean reusable)
-
riskData
public CreatePaymentLinkRequest riskData(RiskData riskData)
-
getRiskData
public RiskData getRiskData()
Get riskData- Returns:
- riskData
-
setRiskData
public void setRiskData(RiskData riskData)
-
shopperEmail
public CreatePaymentLinkRequest shopperEmail(String shopperEmail)
-
getShopperEmail
public String getShopperEmail()
The shopper's email address.- Returns:
- shopperEmail
-
setShopperEmail
public void setShopperEmail(String shopperEmail)
-
shopperLocale
public CreatePaymentLinkRequest shopperLocale(String shopperLocale)
-
getShopperLocale
public String getShopperLocale()
The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/online-payments/pay-by-link#language-and-localization).- Returns:
- shopperLocale
-
setShopperLocale
public void setShopperLocale(String shopperLocale)
-
shopperName
public CreatePaymentLinkRequest shopperName(Name shopperName)
-
getShopperName
public Name getShopperName()
Get shopperName- Returns:
- shopperName
-
setShopperName
public void setShopperName(Name shopperName)
-
shopperReference
public CreatePaymentLinkRequest shopperReference(String shopperReference)
-
getShopperReference
public String getShopperReference()
Your reference to uniquely identify this shopper (for example, user ID or account ID). Minimum length: 3 characters.- Returns:
- shopperReference
-
setShopperReference
public void setShopperReference(String shopperReference)
-
splits
public CreatePaymentLinkRequest splits(List<Split> splits)
-
addSplitsItem
public CreatePaymentLinkRequest addSplitsItem(Split splitsItem)
-
getSplits
public List<Split> getSplits()
An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/platforms/processing-payments#providing-split-information).- Returns:
- splits
-
store
public CreatePaymentLinkRequest store(String store)
-
getStore
public String getStore()
The physical store, for which this payment is processed.- Returns:
- store
-
setStore
public void setStore(String store)
-
storePaymentMethod
public CreatePaymentLinkRequest storePaymentMethod(Boolean storePaymentMethod)
-
isStorePaymentMethod
public Boolean isStorePaymentMethod()
When this is set to **true** and the `shopperReference` is provided, the payment details will be stored.- Returns:
- storePaymentMethod
-
setStorePaymentMethod
public void setStorePaymentMethod(Boolean storePaymentMethod)
-
storePaymentMethodMode
public CreatePaymentLinkRequest storePaymentMethodMode(CreatePaymentLinkRequest.StorePaymentMethodModeEnum storePaymentMethodMode)
-
getStorePaymentMethodMode
public CreatePaymentLinkRequest.StorePaymentMethodModeEnum getStorePaymentMethodMode()
Indicates if the details of the payment method will be stored for the shopper. Possible values:* **disabled** – No details will be stored.* **askForConsent** – If the `shopperReference` is provided the shopper can decide whether or not the details will be stored.* **enabled** – If the `shopperReference` is provided the details will be stored without asking consent to the shopper.- Returns:
- storePaymentMethodMode
-
setStorePaymentMethodMode
public void setStorePaymentMethodMode(CreatePaymentLinkRequest.StorePaymentMethodModeEnum storePaymentMethodMode)
-
-