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 classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static Session
create
(SessionCreateParams params) Creates a session of the customer portal.static Session
create
(SessionCreateParams params, RequestOptions options) Creates a session of the customer portal.static Session
Creates a session of the customer portal.static Session
create
(Map<String, Object> params, RequestOptions options) Creates a session of the customer portal.boolean
Get ID of expandableconfiguration
object.Get expandedconfiguration
.Time at which the object was created.The ID of the customer for this session.getFlow()
Information about a specific flow for the customer to go through.getId()
Unique identifier for the object.Has the valuetrue
if the object exists in live mode or the valuefalse
if 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.int
hashCode()
void
void
setConfigurationObject
(Configuration expandableObject) void
setCreated
(Long created) Time at which the object was created.void
setCustomer
(String customer) The ID of the customer for this session.void
setFlow
(Session.Flow flow) Information about a specific flow for the customer to go through.void
Unique identifier for the object.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
The IETF language tag of the locale Customer Portal is displayed in.void
String representing the object's type.void
setOnBehalfOf
(String onBehalfOf) The account for which the session was created on behalf of.void
setResponseGetter
(StripeResponseGetter responseGetter) Quantity for this item that the customer should subscribe to through this flow.void
setReturnUrl
(String returnUrl) The URL to redirect customers to when they click on the portal's link to return to your website.void
The 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, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
Session
public Session()
-
-
Method Details
-
getConfiguration
Get ID of expandableconfiguration
object. -
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:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance 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. -
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 valuetrue
if the object exists in live mode or the valuefalse
if 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_locales
or 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_of
account appear in the portal. For more information, see the docs. Use the Accounts API to modify theon_behalf_of
account'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. -
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 valuetrue
if the object exists in live mode or the valuefalse
if 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_locales
or 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_of
account appear in the portal. For more information, see the docs. Use the Accounts API to modify theon_behalf_of
account'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.
-