Class AccountSession
- All Implemented Interfaces:
StripeActiveObject,StripeObjectInterface
We recommend that you create an AccountSession each time you need to display an embedded component 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 components
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about Components, 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 AccountSessioncreate(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 AccountSessioncreate(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 AccountSessionCreates 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 AccountSessioncreate(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.booleanThe 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 valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.String representing the object's type.inthashCode()voidsetAccount(String account) The ID of the account the AccountSession was created for.voidsetClientSecret(String clientSecret) The client secret of this AccountSession.voidsetComponents(AccountSession.Components components) voidsetExpiresAt(Long expiresAt) The timestamp at which this AccountSession 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) For more details about Features, please refer to the API Reference.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
-
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
-
setResponseGetter
For more details about Features, please refer to the API Reference.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
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
accountfrom 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 components and learn about how
client_secretshould be handled. -
getComponents
-
getExpiresAt
The timestamp at which this AccountSession 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
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
accountfrom 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 components and learn about how
client_secretshould be handled. -
setComponents
-
setExpiresAt
The timestamp at which this AccountSession 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
account_session. -
equals
-
canEqual
-
hashCode
public int hashCode()
-