Class PaymentSessionRequest.PaymentSessionRequestBuilder
- java.lang.Object
-
- com.checkout.handlepaymentsandpayouts.flow.paymentsessions.requests.PaymentSessionRequest.PaymentSessionRequestBuilder
-
- Enclosing class:
- PaymentSessionRequest
public static class PaymentSessionRequest.PaymentSessionRequestBuilder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PaymentSessionRequest.PaymentSessionRequestBuilderamount(java.lang.Long amount)The payment amount.PaymentSessionRequest.PaymentSessionRequestBuilderamountAllocations(java.util.List<AmountAllocation> amountAllocations)The sub-entities that the payment is being processed on behalf of.PaymentSessionRequest.PaymentSessionRequestBuilderbilling(Billing billing)The billing details.PaymentSessionRequest.PaymentSessionRequestBuilderbillingDescriptor(BillingDescriptor billingDescriptor)A description of the purchase, which is displayed on the customer's statement.PaymentSessionRequestbuild()PaymentSessionRequest.PaymentSessionRequestBuildercapture(java.lang.Boolean capture)Default: true Specifies whether to capture the payment, if applicable.PaymentSessionRequest.PaymentSessionRequestBuildercaptureOn(java.time.Instant captureOn)A timestamp specifying when to capture the payment, as an ISO 8601 code.PaymentSessionRequest.PaymentSessionRequestBuildercurrency(Currency currency)The three-letter ISO currency codePaymentSessionRequest.PaymentSessionRequestBuildercustomer(Customer customer)The customer's details.PaymentSessionRequest.PaymentSessionRequestBuildercustomerRetry(CustomerRetry customerRetry)Configuration for asynchronous retries.PaymentSessionRequest.PaymentSessionRequestBuilderdescription(java.lang.String description)A description for the payment.PaymentSessionRequest.PaymentSessionRequestBuilderdisabledPaymentMethods(java.util.List<DisabledPaymentMethodsType> disabledPaymentMethods)Specifies which payment method options to not present to the customer.PaymentSessionRequest.PaymentSessionRequestBuilderdisplayName(java.lang.String displayName)The merchant's display name.PaymentSessionRequest.PaymentSessionRequestBuilderenabledPaymentMethods(java.util.List<EnabledPaymentMethodsType> enabledPaymentMethods)Specifies which payment method options to present to the customer.PaymentSessionRequest.PaymentSessionRequestBuilderexpiresOn(java.time.Instant expiresOn)A timestamp specifying when the PaymentSession should expire, as an ISO 8601 code.PaymentSessionRequest.PaymentSessionRequestBuilderfailureUrl(java.lang.String failureUrl)Overrides the default failure redirect URL configured on your account, for payment methods that require a redirect.PaymentSessionRequest.PaymentSessionRequestBuilderinstruction(Instruction instruction)Details about the payment instruction.PaymentSessionRequest.PaymentSessionRequestBuilderipAddress(java.lang.String ipAddress)Deprecated.This property will be removed in the future, and should be used with caution.PaymentSessionRequest.PaymentSessionRequestBuilderitems(java.util.List<Item> items)The line items in the order.PaymentSessionRequest.PaymentSessionRequestBuilderlocale(LocaleType locale)Default: "en-GB" Creates a translated version of the page in the specified language.PaymentSessionRequest.PaymentSessionRequestBuildermetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)Allows you to store additional information about a transaction with custom fields and up to five user-defined fields, which can be used for reporting purposes.PaymentSessionRequest.PaymentSessionRequestBuilderpaymentMethodConfiguration(PaymentMethodConfiguration paymentMethodConfiguration)Configurations for payment method-specific settings.PaymentSessionRequest.PaymentSessionRequestBuilderpaymentType(PaymentType paymentType)Default: "Regular" Must be specified for card-not-present (CNP) payments.PaymentSessionRequest.PaymentSessionRequestBuilderprocessing(Processing processing)Use the processing object to influence or override the data sent during card processingPaymentSessionRequest.PaymentSessionRequestBuilderprocessingChannelId(java.lang.String processingChannelId)The processing channel to use for the payment.PaymentSessionRequest.PaymentSessionRequestBuilderrecipient(Recipient recipient)Information about the recipient of the payment's funds.PaymentSessionRequest.PaymentSessionRequestBuilderreference(java.lang.String reference)A reference you can use to identify the payment.PaymentSessionRequest.PaymentSessionRequestBuilderrisk(Risk risk)Configures the risk assessment performed during payment processing.PaymentSessionRequest.PaymentSessionRequestBuildersender(AbstractSender sender)The sender of the payment.PaymentSessionRequest.PaymentSessionRequestBuildershipping(Shipping shipping)The shipping detailsPaymentSessionRequest.PaymentSessionRequestBuildersuccessUrl(java.lang.String successUrl)Overrides the default success redirect URL configured on your account, for payment methods that require a redirect.PaymentSessionRequest.PaymentSessionRequestBuilderthreeds(Threeds threeds)Information required for 3D Secure authentication payments.java.lang.StringtoString()
-
-
-
Method Detail
-
amount
public PaymentSessionRequest.PaymentSessionRequestBuilder amount(java.lang.Long amount)
The payment amount. Provide a value of 0 to perform a card verification. The amount must be provided in the minor currency unit.- Returns:
this.
-
currency
public PaymentSessionRequest.PaymentSessionRequestBuilder currency(Currency currency)
The three-letter ISO currency code- Returns:
this.
-
billing
public PaymentSessionRequest.PaymentSessionRequestBuilder billing(Billing billing)
The billing details.- Returns:
this.
-
successUrl
public PaymentSessionRequest.PaymentSessionRequestBuilder successUrl(java.lang.String successUrl)
Overrides the default success redirect URL configured on your account, for payment methods that require a redirect.- Returns:
this.
-
failureUrl
public PaymentSessionRequest.PaymentSessionRequestBuilder failureUrl(java.lang.String failureUrl)
Overrides the default failure redirect URL configured on your account, for payment methods that require a redirect.- Returns:
this.
-
paymentType
public PaymentSessionRequest.PaymentSessionRequestBuilder paymentType(PaymentType paymentType)
Default: "Regular" Must be specified for card-not-present (CNP) payments. For example, a recurring mail order / telephone order (MOTO) payment.- Returns:
this.
-
billingDescriptor
public PaymentSessionRequest.PaymentSessionRequestBuilder billingDescriptor(BillingDescriptor billingDescriptor)
A description of the purchase, which is displayed on the customer's statement.- Returns:
this.
-
reference
public PaymentSessionRequest.PaymentSessionRequestBuilder reference(java.lang.String reference)
A reference you can use to identify the payment. For example, an order number. For Amex payments, this must be at most 30 characters. For Benefit payments, the reference must be a unique alphanumeric value. For iDEAL payments, the reference is required and must be an alphanumeric value with a 35-character limit.- Returns:
this.
-
description
public PaymentSessionRequest.PaymentSessionRequestBuilder description(java.lang.String description)
A description for the payment.- Returns:
this.
-
customer
public PaymentSessionRequest.PaymentSessionRequestBuilder customer(Customer customer)
The customer's details. Required if source.type is tamara.- Returns:
this.
-
shipping
public PaymentSessionRequest.PaymentSessionRequestBuilder shipping(Shipping shipping)
The shipping details- Returns:
this.
-
recipient
public PaymentSessionRequest.PaymentSessionRequestBuilder recipient(Recipient recipient)
Information about the recipient of the payment's funds. Applies to Account Funding Transactions, and VISA or Mastercard domestic UK transactions processed by financial institutions.- Returns:
this.
-
processing
public PaymentSessionRequest.PaymentSessionRequestBuilder processing(Processing processing)
Use the processing object to influence or override the data sent during card processing- Returns:
this.
-
instruction
public PaymentSessionRequest.PaymentSessionRequestBuilder instruction(Instruction instruction)
Details about the payment instruction.- Returns:
this.
-
processingChannelId
public PaymentSessionRequest.PaymentSessionRequestBuilder processingChannelId(java.lang.String processingChannelId)
The processing channel to use for the payment.- Returns:
this.
-
paymentMethodConfiguration
public PaymentSessionRequest.PaymentSessionRequestBuilder paymentMethodConfiguration(PaymentMethodConfiguration paymentMethodConfiguration)
Configurations for payment method-specific settings.- Returns:
this.
-
items
public PaymentSessionRequest.PaymentSessionRequestBuilder items(java.util.List<Item> items)
The line items in the order.- Returns:
this.
-
amountAllocations
public PaymentSessionRequest.PaymentSessionRequestBuilder amountAllocations(java.util.List<AmountAllocation> amountAllocations)
The sub-entities that the payment is being processed on behalf of.- Returns:
this.
-
risk
public PaymentSessionRequest.PaymentSessionRequestBuilder risk(Risk risk)
Configures the risk assessment performed during payment processing.- Returns:
this.
-
displayName
public PaymentSessionRequest.PaymentSessionRequestBuilder displayName(java.lang.String displayName)
The merchant's display name.- Returns:
this.
-
metadata
public PaymentSessionRequest.PaymentSessionRequestBuilder metadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Allows you to store additional information about a transaction with custom fields and up to five user-defined fields, which can be used for reporting purposes. You can supply fields of type string, number, and boolean within the metadata object. Arrays and objects are not supported. You can provide up to 18 metadata fields per API call, but the value of each field must not exceed 255 characters in length. You can also reference metadata properties in your custom rules for Fraud Detection. For example, $coupon_code = '1234’.- Returns:
this.
-
locale
public PaymentSessionRequest.PaymentSessionRequestBuilder locale(LocaleType locale)
Default: "en-GB" Creates a translated version of the page in the specified language.- Returns:
this.
-
threeds
public PaymentSessionRequest.PaymentSessionRequestBuilder threeds(Threeds threeds)
Information required for 3D Secure authentication payments.- Returns:
this.
-
sender
public PaymentSessionRequest.PaymentSessionRequestBuilder sender(AbstractSender sender)
The sender of the payment.- Returns:
this.
-
capture
public PaymentSessionRequest.PaymentSessionRequestBuilder capture(java.lang.Boolean capture)
Default: true Specifies whether to capture the payment, if applicable.- Returns:
this.
-
captureOn
public PaymentSessionRequest.PaymentSessionRequestBuilder captureOn(java.time.Instant captureOn)
A timestamp specifying when to capture the payment, as an ISO 8601 code. If a value is provided, capture is automatically set to true.- Returns:
this.
-
expiresOn
public PaymentSessionRequest.PaymentSessionRequestBuilder expiresOn(java.time.Instant expiresOn)
A timestamp specifying when the PaymentSession should expire, as an ISO 8601 code. If no value is provided, expiry is set to 1 hour after the PaymentSession is created. You cannot set the session expiry to more than 60 days after the PaymentSession is created.- Returns:
this.
-
enabledPaymentMethods
public PaymentSessionRequest.PaymentSessionRequestBuilder enabledPaymentMethods(java.util.List<EnabledPaymentMethodsType> enabledPaymentMethods)
Specifies which payment method options to present to the customer. The values in this field override any equivalent values in disabled_payment_methods.- Returns:
this.
-
disabledPaymentMethods
public PaymentSessionRequest.PaymentSessionRequestBuilder disabledPaymentMethods(java.util.List<DisabledPaymentMethodsType> disabledPaymentMethods)
Specifies which payment method options to not present to the customer. If you specify the same payment method in this field and in enabled_payment_methods, the disabled_payment_methods value will be overridden. Any payment method options not explicitly specified in this field will be presented to the customer by default.- Returns:
this.
-
customerRetry
public PaymentSessionRequest.PaymentSessionRequestBuilder customerRetry(CustomerRetry customerRetry)
Configuration for asynchronous retries.- Returns:
this.
-
ipAddress
@Deprecated public PaymentSessionRequest.PaymentSessionRequestBuilder ipAddress(java.lang.String ipAddress)
Deprecated.This property will be removed in the future, and should be used with caution. The Customers IP address. Only IPv4 and IPv6 addresses are accepted.- Returns:
this.
-
build
public PaymentSessionRequest build()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-