Class SessionCreateParams
- java.lang.Object
-
- com.stripe.net.ApiRequestParams
-
- com.stripe.param.checkout.SessionCreateParams
-
public class SessionCreateParams extends ApiRequestParams
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSessionCreateParams.AutomaticTaxstatic classSessionCreateParams.BillingAddressCollectionAdd all map key/value pairs to `extraParams` map.static classSessionCreateParams.Builderstatic classSessionCreateParams.CustomerUpdateAdd all map key/value pairs to `extraParams` map.static classSessionCreateParams.Discountstatic classSessionCreateParams.LineItemThe ID of a promotion code to apply to this Session.static classSessionCreateParams.Localestatic classSessionCreateParams.Modestatic classSessionCreateParams.PaymentIntentDataThe number of intervals between subscription billings.static classSessionCreateParams.PaymentMethodOptionsstatic classSessionCreateParams.PaymentMethodTypestatic classSessionCreateParams.SetupIntentDataTransaction type of the mandate.static classSessionCreateParams.ShippingAddressCollectionThe Stripe account for which the setup is intended.static classSessionCreateParams.SubmitTypestatic classSessionCreateParams.SubscriptionDatastatic classSessionCreateParams.TaxIdCollectionAdd all map key/value pairs to `extraParams` map.-
Nested classes/interfaces inherited from class com.stripe.net.ApiRequestParams
ApiRequestParams.EnumParam
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiRequestParams
EXTRA_PARAMS_KEY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SessionCreateParams.Builderbuilder()java.lang.BooleangetAllowPromotionCodes()Enables user redeemable promotion codes.SessionCreateParams.AutomaticTaxgetAutomaticTax()SessionCreateParams.BillingAddressCollectiongetBillingAddressCollection()Specify whether Checkout should collect the customer's billing address.java.lang.StringgetCancelUrl()The URL the customer will be directed to if they decide to cancel payment and return to your website.java.lang.StringgetClientReferenceId()A unique string to reference the Checkout Session.java.lang.StringgetCustomer()ID of an existing Customer, if one exists.java.lang.StringgetCustomerEmail()If provided, this value will be used when the Customer object is created.SessionCreateParams.CustomerUpdategetCustomerUpdate()Controls what fields on Customer can be updated by the Checkout Session.java.util.List<SessionCreateParams.Discount>getDiscounts()The coupon or promotion code to apply to this Session.java.util.List<java.lang.String>getExpand()Specifies which fields in the response should be expanded.java.util.Map<java.lang.String,java.lang.Object>getExtraParams()Map of extra parameters for custom features not available in this client library.java.util.List<SessionCreateParams.LineItem>getLineItems()A list of items the customer is purchasing.SessionCreateParams.LocalegetLocale()The IETF language tag of the locale Checkout is displayed in.java.util.Map<java.lang.String,java.lang.String>getMetadata()Set of key-value pairs that you can attach to an object.SessionCreateParams.ModegetMode()The mode of the Checkout Session.SessionCreateParams.PaymentIntentDatagetPaymentIntentData()A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions inpaymentmode.SessionCreateParams.PaymentMethodOptionsgetPaymentMethodOptions()Payment-method-specific configuration.java.util.List<SessionCreateParams.PaymentMethodType>getPaymentMethodTypes()A list of the types of payment methods (e.g.,card) this Checkout Session can accept.SessionCreateParams.SetupIntentDatagetSetupIntentData()A subset of parameters to be passed to SetupIntent creation for Checkout Sessions insetupmode.SessionCreateParams.ShippingAddressCollectiongetShippingAddressCollection()When set, provides configuration for Checkout to collect a shipping address from a customer.java.util.List<java.lang.String>getShippingRates()The shipping rate to apply to this Session.SessionCreateParams.SubmitTypegetSubmitType()Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button.SessionCreateParams.SubscriptionDatagetSubscriptionData()A subset of parameters to be passed to subscription creation for Checkout Sessions insubscriptionmode.java.lang.StringgetSuccessUrl()The URL to which Stripe should send customers when payment or setup is complete.SessionCreateParams.TaxIdCollectiongetTaxIdCollection()-
Methods inherited from class com.stripe.net.ApiRequestParams
toMap
-
-
-
-
Method Detail
-
builder
public static SessionCreateParams.Builder builder()
-
getAllowPromotionCodes
public java.lang.Boolean getAllowPromotionCodes()
Enables user redeemable promotion codes.
-
getAutomaticTax
public SessionCreateParams.AutomaticTax getAutomaticTax()
-
getBillingAddressCollection
public SessionCreateParams.BillingAddressCollection getBillingAddressCollection()
Specify whether Checkout should collect the customer's billing address.
-
getCancelUrl
public java.lang.String getCancelUrl()
The URL the customer will be directed to if they decide to cancel payment and return to your website.
-
getClientReferenceId
public java.lang.String getClientReferenceId()
A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems.
-
getCustomer
public java.lang.String getCustomer()
ID of an existing Customer, if one exists. Inpaymentmode, the customer’s most recent card payment method will be used to prefill the email, name, card details, and billing address on the Checkout page. Insubscriptionmode, the customer’s default payment method will be used if it’s a card, and otherwise the most recent card will be used. A valid billing address is required for Checkout to prefill the customer's card details.If the customer changes their email on the Checkout page, the Customer object will be updated with the new email.
If blank for Checkout Sessions in
paymentorsubscriptionmode, Checkout will create a new Customer object based on information provided during the payment flow.You can set
payment_intent_data.setup_future_usageto have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
-
getCustomerEmail
public java.lang.String getCustomerEmail()
If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once a session is complete, use thecustomerfield.
-
getCustomerUpdate
public SessionCreateParams.CustomerUpdate getCustomerUpdate()
Controls what fields on Customer can be updated by the Checkout Session. Can only be provided whencustomeris provided.
-
getDiscounts
public java.util.List<SessionCreateParams.Discount> getDiscounts()
The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
-
getExpand
public java.util.List<java.lang.String> getExpand()
Specifies which fields in the response should be expanded.
-
getExtraParams
public java.util.Map<java.lang.String,java.lang.Object> getExtraParams()
Map of extra parameters for custom features not available in this client library. The content in this map is not serialized under this field's@SerializedNamevalue. Instead, each key/value pair is serialized as if the key is a root-level field (serialized) name in this param object. Effectively, this map is flattened to its parent instance.
-
getLineItems
public java.util.List<SessionCreateParams.LineItem> getLineItems()
A list of items the customer is purchasing. Use this parameter to pass one-time or recurring Prices.For
paymentmode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.For
subscriptionmode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only.
-
getLocale
public SessionCreateParams.Locale getLocale()
The IETF language tag of the locale Checkout is displayed in. If blank orauto, the browser's locale is used.
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
Set 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata.
-
getMode
public SessionCreateParams.Mode getMode()
The mode of the Checkout Session. Required when using prices orsetupmode. Passsubscriptionif the Checkout Session includes at least one recurring item.
-
getPaymentIntentData
public SessionCreateParams.PaymentIntentData getPaymentIntentData()
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions inpaymentmode.
-
getPaymentMethodOptions
public SessionCreateParams.PaymentMethodOptions getPaymentMethodOptions()
Payment-method-specific configuration.
-
getPaymentMethodTypes
public java.util.List<SessionCreateParams.PaymentMethodType> getPaymentMethodTypes()
A list of the types of payment methods (e.g.,card) this Checkout Session can accept.Read more about the supported payment methods and their requirements in our payment method details guide.
If multiple payment methods are passed, Checkout will dynamically reorder them to prioritize the most relevant payment methods based on the customer's location and other characteristics.
-
getSetupIntentData
public SessionCreateParams.SetupIntentData getSetupIntentData()
A subset of parameters to be passed to SetupIntent creation for Checkout Sessions insetupmode.
-
getShippingAddressCollection
public SessionCreateParams.ShippingAddressCollection getShippingAddressCollection()
When set, provides configuration for Checkout to collect a shipping address from a customer.
-
getShippingRates
public java.util.List<java.lang.String> getShippingRates()
The shipping rate to apply to this Session. Currently, only up to one may be specified
-
getSubmitType
public SessionCreateParams.SubmitType getSubmitType()
Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button.submit_typecan only be specified on Checkout Sessions inpaymentmode, but not Checkout Sessions insubscriptionorsetupmode.
-
getSubscriptionData
public SessionCreateParams.SubscriptionData getSubscriptionData()
A subset of parameters to be passed to subscription creation for Checkout Sessions insubscriptionmode.
-
getSuccessUrl
public java.lang.String getSuccessUrl()
The URL to which Stripe should send customers when payment or setup is complete. If you’d like access to the Checkout Session for the successful payment, read more about it in the guide on fulfilling orders.
-
getTaxIdCollection
public SessionCreateParams.TaxIdCollection getTaxIdCollection()
-
-