Package com.stripe.model
Class ConfirmationToken
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.ConfirmationToken
- All Implemented Interfaces:
HasId
,StripeActiveObject
,StripeObjectInterface
ConfirmationTokens help transport client side data collected by Stripe JS over to your server for
confirming a PaymentIntent or SetupIntent. If the confirmation is successful, values present on
the ConfirmationToken are written onto the Intent.
To learn more about how to use ConfirmationToken, visit the related guides: - Finalize payments on the server - Build two-step confirmation.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Data used for generating a Mandate.static class
Payment-method-specific configuration.static class
Details of the PaymentMethod collected by Payment Element.static class
static class
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
boolean
Time at which the object was created.Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.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.Data used for generating a Mandate.String representing the object's type.ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.Payment-method-specific configuration for this ConfirmationToken.Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.Return URL used to confirm the Intent.Indicates that you intend to make future payments with this ConfirmationToken's payment method.ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.Shipping information collected on this ConfirmationToken.Indicates whether the Stripe SDK is used to handle confirmation flow.int
hashCode()
static ConfirmationToken
Retrieves an existing ConfirmationToken object.static ConfirmationToken
retrieve
(String confirmationToken, RequestOptions options) Retrieves an existing ConfirmationToken object.static ConfirmationToken
retrieve
(String confirmationToken, ConfirmationTokenRetrieveParams params, RequestOptions options) Retrieves an existing ConfirmationToken object.static ConfirmationToken
Retrieves an existing ConfirmationToken object.void
setCreated
(Long created) Time at which the object was created.void
setExpiresAt
(Long expiresAt) Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.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
setMandateData
(ConfirmationToken.MandateData mandateData) Data used for generating a Mandate.void
String representing the object's type.void
setPaymentIntent
(String paymentIntent) ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.void
setPaymentMethodOptions
(ConfirmationToken.PaymentMethodOptions paymentMethodOptions) Payment-method-specific configuration for this ConfirmationToken.void
setPaymentMethodPreview
(ConfirmationToken.PaymentMethodPreview paymentMethodPreview) Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
setReturnUrl
(String returnUrl) Return URL used to confirm the Intent.void
setSetupFutureUsage
(String setupFutureUsage) Indicates that you intend to make future payments with this ConfirmationToken's payment method.void
setSetupIntent
(String setupIntent) ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.void
setShipping
(ConfirmationToken.Shipping shipping) Shipping information collected on this ConfirmationToken.void
setUseStripeSdk
(Boolean useStripeSdk) Indicates whether the Stripe SDK is used to handle confirmation flow.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
-
ConfirmationToken
public ConfirmationToken()
-
-
Method Details
-
retrieve
Retrieves an existing ConfirmationToken object.- Throws:
StripeException
-
retrieve
public static ConfirmationToken retrieve(String confirmationToken, RequestOptions options) throws StripeException Retrieves an existing ConfirmationToken object.- Throws:
StripeException
-
retrieve
public static ConfirmationToken retrieve(String confirmationToken, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves an existing ConfirmationToken object.- Throws:
StripeException
-
retrieve
public static ConfirmationToken retrieve(String confirmationToken, ConfirmationTokenRetrieveParams params, RequestOptions options) throws StripeException Retrieves an existing ConfirmationToken object.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- 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. -
getExpiresAt
Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getMandateData
Data used for generating a Mandate. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
confirmation_token
. -
getPaymentIntent
ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. -
getPaymentMethodOptions
Payment-method-specific configuration for this ConfirmationToken. -
getPaymentMethodPreview
Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. -
getReturnUrl
Return URL used to confirm the Intent. -
getSetupFutureUsage
Indicates that you intend to make future payments with this ConfirmationToken's payment method.The presence of this property will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
One of
off_session
, oron_session
. -
getSetupIntent
ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. -
getShipping
Shipping information collected on this ConfirmationToken. -
getUseStripeSdk
Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults totrue
on ConfirmationToken. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setExpiresAt
Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. -
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. -
setMandateData
Data used for generating a Mandate. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
confirmation_token
. -
setPaymentIntent
ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. -
setPaymentMethodOptions
Payment-method-specific configuration for this ConfirmationToken. -
setPaymentMethodPreview
Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. -
setReturnUrl
Return URL used to confirm the Intent. -
setSetupFutureUsage
Indicates that you intend to make future payments with this ConfirmationToken's payment method.The presence of this property will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
One of
off_session
, oron_session
. -
setSetupIntent
ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. -
setShipping
Shipping information collected on this ConfirmationToken. -
setUseStripeSdk
Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults totrue
on ConfirmationToken. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object.
-