Class CustomerSession
- All Implemented Interfaces:
StripeActiveObject,StripeObjectInterface
Related guides: Customer Session with the Payment Element, Customer Session with the Pricing Table, Customer Session with the Buy Button.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration for the components supported by this Customer Session.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic CustomerSessioncreate(CustomerSessionCreateParams params) Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.static CustomerSessioncreate(CustomerSessionCreateParams params, RequestOptions options) Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.static CustomerSessionCreates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.static CustomerSessioncreate(Map<String, Object> params, RequestOptions options) Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.booleanThe client secret of this Customer Session.Configuration for the components supported by this Customer Session.Time at which the object was created.Get ID of expandablecustomerobject.The Account that the Customer Session was created for.Get expandedcustomer.The timestamp at which this Customer Session will expire.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.String representing the object's type.inthashCode()voidsetClientSecret(String clientSecret) The client secret of this Customer Session.voidsetComponents(CustomerSession.Components components) Configuration for the components supported by this Customer Session.voidsetCreated(Long created) Time at which the object was created.voidsetCustomer(String id) voidsetCustomerAccount(String customerAccount) The Account that the Customer Session was created for.voidsetCustomerObject(Customer expandableObject) voidsetExpiresAt(Long expiresAt) The timestamp at which this Customer Session will expire.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidString representing the object's type.voidsetResponseGetter(StripeResponseGetter responseGetter) Controls whether the Tax ID Element allows merchants to save new tax IDs for their customer.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
CustomerSession
public CustomerSession()
-
-
Method Details
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
create
Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.- Throws:
StripeException
-
create
public static CustomerSession create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.- Throws:
StripeException
-
create
Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.- Throws:
StripeException
-
create
public static CustomerSession create(CustomerSessionCreateParams params, RequestOptions options) throws StripeException Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.- Throws:
StripeException
-
setResponseGetter
Controls whether the Tax ID Element allows merchants to save new tax IDs for their customer. This parameter defaults todisabled.When enabled, customers can enter and save new tax identification numbers during the payment flow, which will be stored securely and associated with their customer object for future use.
One of
disabled, orenabled.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getClientSecret
The client secret of this Customer Session. Used on the client to set up secure access to the givencustomer.The client secret can be used to provide access to
customerfrom your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. -
getComponents
Configuration for the components supported by this Customer Session. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCustomerAccount
The Account that the Customer Session was created for. -
getExpiresAt
The timestamp at which this Customer Session will expire. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
customer_session. -
setClientSecret
The client secret of this Customer Session. Used on the client to set up secure access to the givencustomer.The client secret can be used to provide access to
customerfrom your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. -
setComponents
Configuration for the components supported by this Customer Session. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCustomerAccount
The Account that the Customer Session was created for. -
setExpiresAt
The timestamp at which this Customer Session will expire. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
customer_session. -
equals
-
canEqual
-
hashCode
public int hashCode()
-