Class Session
- All Implemented Interfaces:
HasId,StripeActiveObject,StripeObjectInterface
A portal configuration describes the functionality and features that you want to provide to your customers through the portal.
A portal session describes the instantiation of the customer portal for a particular customer. By visiting the session's URL, the customer can manage their subscriptions and billing details. For security reasons, sessions are short-lived and will expire if the customer does not visit the URL. Create sessions on-demand when customers intend to manage their subscriptions and billing details.
Related guide: Customer management
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about Flow, please refer to the API Reference.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 Sessioncreate(SessionCreateParams params) Creates a session of the customer portal.static Sessioncreate(SessionCreateParams params, RequestOptions options) Creates a session of the customer portal.static SessionCreates a session of the customer portal.static Sessioncreate(Map<String, Object> params, RequestOptions options) Creates a session of the customer portal.booleanGet ID of expandableconfigurationobject.Get expandedconfiguration.Time at which the object was created.The ID of the customer for this session.The ID of the account for this session.getFlow()Information about a specific flow for the customer to go through.getId()Unique identifier for the object.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.The IETF language tag of the locale Customer Portal is displayed in.String representing the object's type.The account for which the session was created on behalf of.The URL to redirect customers to when they click on the portal's link to return to your website.getUrl()The short-lived URL of the session that gives customers access to the customer portal.inthashCode()voidvoidsetConfigurationObject(Configuration expandableObject) voidsetCreated(Long created) Time at which the object was created.voidsetCustomer(String customer) The ID of the customer for this session.voidsetCustomerAccount(String customerAccount) The ID of the account for this session.voidsetFlow(Session.Flow flow) Information about a specific flow for the customer to go through.voidUnique identifier for the object.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidThe IETF language tag of the locale Customer Portal is displayed in.voidString representing the object's type.voidsetOnBehalfOf(String onBehalfOf) The account for which the session was created on behalf of.voidsetResponseGetter(StripeResponseGetter responseGetter) Quantity for this item that the customer should subscribe to through this flow.voidsetReturnUrl(String returnUrl) The URL to redirect customers to when they click on the portal's link to return to your website.voidThe short-lived URL of the session that gives customers access to the customer portal.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
-
Session
public Session()
-
-
Method Details
-
getConfiguration
Get ID of expandableconfigurationobject. -
setConfiguration
-
getConfigurationObject
Get expandedconfiguration. -
setConfigurationObject
-
create
Creates a session of the customer portal.- Throws:
StripeException
-
create
public static Session create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a session of the customer portal.- Throws:
StripeException
-
create
Creates a session of the customer portal.- Throws:
StripeException
-
create
public static Session create(SessionCreateParams params, RequestOptions options) throws StripeException Creates a session of the customer portal.- Throws:
StripeException
-
setResponseGetter
Quantity for this item that the customer should subscribe to through this flow.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCustomer
The ID of the customer for this session. -
getCustomerAccount
The ID of the account for this session. -
getFlow
Information about a specific flow for the customer to go through. See the docs to learn more about using customer portal deep links and flows. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getLocale
The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’spreferred_localesor browser’s locale is used.One of
auto,bg,cs,da,de,el,en,en-AU,en-CA,en-GB,en-IE,en-IN,en-NZ,en-SG,es,es-419,et,fi,fil,fr,fr-CA,hr,hu,id,it,ja,ko,lt,lv,ms,mt,nb,nl,pl,pt,pt-BR,ro,ru,sk,sl,sv,th,tr,vi,zh,zh-HK, orzh-TW. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
billing_portal.session. -
getOnBehalfOf
The account for which the session was created on behalf of. When specified, only subscriptions and invoices with thison_behalf_ofaccount appear in the portal. For more information, see the docs. Use the Accounts API to modify theon_behalf_ofaccount's branding settings, which the portal displays. -
getReturnUrl
The URL to redirect customers to when they click on the portal's link to return to your website. -
getUrl
The short-lived URL of the session that gives customers access to the customer portal. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCustomer
The ID of the customer for this session. -
setCustomerAccount
The ID of the account for this session. -
setFlow
Information about a specific flow for the customer to go through. See the docs to learn more about using customer portal deep links and flows. -
setId
Unique identifier for the object. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setLocale
The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’spreferred_localesor browser’s locale is used.One of
auto,bg,cs,da,de,el,en,en-AU,en-CA,en-GB,en-IE,en-IN,en-NZ,en-SG,es,es-419,et,fi,fil,fr,fr-CA,hr,hu,id,it,ja,ko,lt,lv,ms,mt,nb,nl,pl,pt,pt-BR,ro,ru,sk,sl,sv,th,tr,vi,zh,zh-HK, orzh-TW. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
billing_portal.session. -
setOnBehalfOf
The account for which the session was created on behalf of. When specified, only subscriptions and invoices with thison_behalf_ofaccount appear in the portal. For more information, see the docs. Use the Accounts API to modify theon_behalf_ofaccount's branding settings, which the portal displays. -
setReturnUrl
The URL to redirect customers to when they click on the portal's link to return to your website. -
setUrl
The short-lived URL of the session that gives customers access to the customer portal. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object.
-