Class AccountSession
- All Implemented Interfaces:
StripeObjectInterface
We recommend that you create an AccountSession each time you need to display an embedded UI to your user. Do not save AccountSessions to your database as they expire relatively quickly, and cannot be used more than once.
Related guide: Connect embedded UIs.
-
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
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static AccountSession
create
(AccountSessionCreateParams params) Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.static AccountSession
create
(AccountSessionCreateParams params, RequestOptions options) Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.static AccountSession
Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.static AccountSession
create
(Map<String, Object> params, RequestOptions options) Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.boolean
The ID of the account the AccountSession was created for.The client secret of this AccountSession.The timestamp at which this AccountSession will expire.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.String representing the object's type.int
hashCode()
void
setAccount
(String account) The ID of the account the AccountSession was created for.void
setClientSecret
(String clientSecret) The client secret of this AccountSession.void
setExpiresAt
(Long expiresAt) The timestamp at which this AccountSession will expire.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
String representing the object's type.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, requestSearchResult, requestSearchResult, requestStream, requestStream, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Constructor Details
-
AccountSession
public AccountSession()
-
-
Method Details
-
create
Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.- Throws:
StripeException
-
create
public static AccountSession create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.- Throws:
StripeException
-
create
Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.- Throws:
StripeException
-
create
public static AccountSession create(AccountSessionCreateParams params, RequestOptions options) throws StripeException Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.- Throws:
StripeException
-
getAccount
The ID of the account the AccountSession was created for. -
getClientSecret
The client secret of this AccountSession. Used on the client to set up secure access to the givenaccount
.The client secret can be used to provide access to
account
from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.Refer to our docs to setup Connect embedded UIs and learn about how
client_secret
should be handled. -
getExpiresAt
The timestamp at which this AccountSession will expire. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
account_session
. -
setAccount
The ID of the account the AccountSession was created for. -
setClientSecret
The client secret of this AccountSession. Used on the client to set up secure access to the givenaccount
.The client secret can be used to provide access to
account
from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.Refer to our docs to setup Connect embedded UIs and learn about how
client_secret
should be handled. -
setExpiresAt
The timestamp at which this AccountSession will expire. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
account_session
. -
equals
-
canEqual
-
hashCode
public int hashCode()
-