public class SetupIntent extends ApiResource implements HasId, MetadataStore<SetupIntent>
| Modifier and Type | Class and Description |
|---|---|
static class |
SetupIntent.NextAction |
static class |
SetupIntent.NextActionRedirectToUrl |
static class |
SetupIntent.PaymentMethodOptions |
ApiResource.RequestMethodCHARSET, GSONPRETTY_PRINT_GSON| Constructor and Description |
|---|
SetupIntent() |
| Modifier and Type | Method and Description |
|---|---|
SetupIntent |
cancel()
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method, requires_confirmation, or requires_action
. |
SetupIntent |
cancel(java.util.Map<java.lang.String,java.lang.Object> params)
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method, requires_confirmation, or requires_action
. |
SetupIntent |
cancel(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method, requires_confirmation, or requires_action
. |
SetupIntent |
cancel(RequestOptions options)
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method, requires_confirmation, or requires_action
. |
SetupIntent |
cancel(SetupIntentCancelParams params)
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method, requires_confirmation, or requires_action
. |
SetupIntent |
cancel(SetupIntentCancelParams params,
RequestOptions options)
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method, requires_confirmation, or requires_action
. |
protected boolean |
canEqual(java.lang.Object other) |
SetupIntent |
confirm()
Confirm that your customer intends to set up the current or provided payment method.
|
SetupIntent |
confirm(java.util.Map<java.lang.String,java.lang.Object> params)
Confirm that your customer intends to set up the current or provided payment method.
|
SetupIntent |
confirm(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Confirm that your customer intends to set up the current or provided payment method.
|
SetupIntent |
confirm(RequestOptions options)
Confirm that your customer intends to set up the current or provided payment method.
|
SetupIntent |
confirm(SetupIntentConfirmParams params)
Confirm that your customer intends to set up the current or provided payment method.
|
SetupIntent |
confirm(SetupIntentConfirmParams params,
RequestOptions options)
Confirm that your customer intends to set up the current or provided payment method.
|
static SetupIntent |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a SetupIntent object.
|
static SetupIntent |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Creates a SetupIntent object.
|
static SetupIntent |
create(SetupIntentCreateParams params)
Creates a SetupIntent object.
|
static SetupIntent |
create(SetupIntentCreateParams params,
RequestOptions options)
Creates a SetupIntent object.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getApplication()
Get ID of expandable
application object. |
Application |
getApplicationObject()
Get expanded
application. |
java.lang.String |
getCancellationReason()
Reason for cancellation of this SetupIntent, one of
abandoned, requested_by_customer, or duplicate. |
java.lang.String |
getClientSecret()
The client secret of this SetupIntent.
|
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.String |
getCustomer()
Get ID of expandable
customer object. |
Customer |
getCustomerObject()
Get expanded
customer. |
java.lang.String |
getDescription()
An arbitrary string attached to the object.
|
java.lang.String |
getId()
Unique identifier for the object.
|
StripeError |
getLastSetupError()
The error encountered in the previous SetupIntent confirmation.
|
java.lang.Boolean |
getLivemode()
Has the value
true if the object exists in live mode or the value false if the
object exists in test mode. |
java.lang.String |
getMandate()
Get ID of expandable
mandate object. |
Mandate |
getMandateObject()
Get expanded
mandate. |
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Set of key-value pairs that you can attach
to an object.
|
SetupIntent.NextAction |
getNextAction()
If present, this property tells you what actions you need to take in order for your customer to
continue payment setup.
|
java.lang.String |
getObject()
String representing the object's type.
|
java.lang.String |
getOnBehalfOf()
Get ID of expandable
onBehalfOf object. |
Account |
getOnBehalfOfObject()
Get expanded
onBehalfOf. |
java.lang.String |
getPaymentMethod()
Get ID of expandable
paymentMethod object. |
PaymentMethod |
getPaymentMethodObject()
Get expanded
paymentMethod. |
SetupIntent.PaymentMethodOptions |
getPaymentMethodOptions()
Payment-method-specific configuration for this SetupIntent.
|
java.util.List<java.lang.String> |
getPaymentMethodTypes()
The list of payment method types (e.g.
|
java.lang.String |
getSingleUseMandate()
Get ID of expandable
singleUseMandate object. |
Mandate |
getSingleUseMandateObject()
Get expanded
singleUseMandate. |
java.lang.String |
getStatus()
Status of this
SetupIntent, one of
requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded. |
java.lang.String |
getUsage()
Indicates how the payment method is intended to be used in the future.
|
int |
hashCode() |
static SetupIntentCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of SetupIntents.
|
static SetupIntentCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of SetupIntents.
|
static SetupIntentCollection |
list(SetupIntentListParams params)
Returns a list of SetupIntents.
|
static SetupIntentCollection |
list(SetupIntentListParams params,
RequestOptions options)
Returns a list of SetupIntents.
|
static SetupIntent |
retrieve(java.lang.String intent)
Retrieves the details of a SetupIntent that has previously been created.
|
static SetupIntent |
retrieve(java.lang.String intent,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the details of a SetupIntent that has previously been created.
|
static SetupIntent |
retrieve(java.lang.String intent,
RequestOptions options)
Retrieves the details of a SetupIntent that has previously been created.
|
static SetupIntent |
retrieve(java.lang.String intent,
SetupIntentRetrieveParams params,
RequestOptions options)
Retrieves the details of a SetupIntent that has previously been created.
|
void |
setApplication(java.lang.String id) |
void |
setApplicationObject(Application expandableObject) |
void |
setCancellationReason(java.lang.String cancellationReason)
Reason for cancellation of this SetupIntent, one of
abandoned, requested_by_customer, or duplicate. |
void |
setClientSecret(java.lang.String clientSecret)
The client secret of this SetupIntent.
|
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setCustomer(java.lang.String id) |
void |
setCustomerObject(Customer expandableObject) |
void |
setDescription(java.lang.String description)
An arbitrary string attached to the object.
|
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setLastSetupError(StripeError lastSetupError)
The error encountered in the previous SetupIntent confirmation.
|
void |
setLivemode(java.lang.Boolean livemode)
Has the value
true if the object exists in live mode or the value false if the
object exists in test mode. |
void |
setMandate(java.lang.String id) |
void |
setMandateObject(Mandate expandableObject) |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach
to an object.
|
void |
setNextAction(SetupIntent.NextAction nextAction)
If present, this property tells you what actions you need to take in order for your customer to
continue payment setup.
|
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setOnBehalfOf(java.lang.String id) |
void |
setOnBehalfOfObject(Account expandableObject) |
void |
setPaymentMethod(java.lang.String id) |
void |
setPaymentMethodObject(PaymentMethod expandableObject) |
void |
setPaymentMethodOptions(SetupIntent.PaymentMethodOptions paymentMethodOptions)
Payment-method-specific configuration for this SetupIntent.
|
void |
setPaymentMethodTypes(java.util.List<java.lang.String> paymentMethodTypes)
The list of payment method types (e.g.
|
void |
setSingleUseMandate(java.lang.String id) |
void |
setSingleUseMandateObject(Mandate expandableObject) |
void |
setStatus(java.lang.String status)
Status of this
SetupIntent, one of
requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded. |
void |
setUsage(java.lang.String usage)
Indicates how the payment method is intended to be used in the future.
|
SetupIntent |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates a SetupIntent object.
|
SetupIntent |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates a SetupIntent object.
|
SetupIntent |
update(SetupIntentUpdateParams params)
Updates a SetupIntent object.
|
SetupIntent |
update(SetupIntentUpdateParams params,
RequestOptions options)
Updates a SetupIntent object.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeIdequals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringpublic java.lang.String getApplication()
application object.public void setApplication(java.lang.String id)
public Application getApplicationObject()
application.public void setApplicationObject(Application expandableObject)
public java.lang.String getCustomer()
customer object.public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
customer.public void setCustomerObject(Customer expandableObject)
public java.lang.String getMandate()
mandate object.public void setMandate(java.lang.String id)
public Mandate getMandateObject()
mandate.public void setMandateObject(Mandate expandableObject)
public java.lang.String getOnBehalfOf()
onBehalfOf object.public void setOnBehalfOf(java.lang.String id)
public Account getOnBehalfOfObject()
onBehalfOf.public void setOnBehalfOfObject(Account expandableObject)
public java.lang.String getPaymentMethod()
paymentMethod object.public void setPaymentMethod(java.lang.String id)
public PaymentMethod getPaymentMethodObject()
paymentMethod.public void setPaymentMethodObject(PaymentMethod expandableObject)
public java.lang.String getSingleUseMandate()
singleUseMandate object.public void setSingleUseMandate(java.lang.String id)
public Mandate getSingleUseMandateObject()
singleUseMandate.public void setSingleUseMandateObject(Mandate expandableObject)
public static SetupIntent create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
After the SetupIntent is created, attach a payment method and confirm to collect any required permissions to charge the payment method later.
StripeExceptionpublic static SetupIntent create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
After the SetupIntent is created, attach a payment method and confirm to collect any required permissions to charge the payment method later.
StripeExceptionpublic static SetupIntent create(SetupIntentCreateParams params) throws StripeException
After the SetupIntent is created, attach a payment method and confirm to collect any required permissions to charge the payment method later.
StripeExceptionpublic static SetupIntent create(SetupIntentCreateParams params, RequestOptions options) throws StripeException
After the SetupIntent is created, attach a payment method and confirm to collect any required permissions to charge the payment method later.
StripeExceptionpublic static SetupIntentCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static SetupIntentCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static SetupIntentCollection list(SetupIntentListParams params) throws StripeException
StripeExceptionpublic static SetupIntentCollection list(SetupIntentListParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static SetupIntent retrieve(java.lang.String intent) throws StripeException
Client-side retrieval using a publishable key is allowed when the client_secret
is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.
StripeExceptionpublic static SetupIntent retrieve(java.lang.String intent, RequestOptions options) throws StripeException
Client-side retrieval using a publishable key is allowed when the client_secret
is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.
StripeExceptionpublic static SetupIntent retrieve(java.lang.String intent, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Client-side retrieval using a publishable key is allowed when the client_secret
is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.
StripeExceptionpublic static SetupIntent retrieve(java.lang.String intent, SetupIntentRetrieveParams params, RequestOptions options) throws StripeException
Client-side retrieval using a publishable key is allowed when the client_secret
is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.
StripeExceptionpublic SetupIntent update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update in interface MetadataStore<SetupIntent>StripeExceptionpublic SetupIntent update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update in interface MetadataStore<SetupIntent>StripeExceptionpublic SetupIntent update(SetupIntentUpdateParams params) throws StripeException
StripeExceptionpublic SetupIntent update(SetupIntentUpdateParams params, RequestOptions options) throws StripeException
StripeExceptionpublic SetupIntent confirm() throws StripeException
If the selected payment method does not require any additional steps from the customer, the
SetupIntent will transition to the succeeded status.
Otherwise, it will transition to the requires_action status and suggest
additional actions via next_action. If setup fails, the SetupIntent will
transition to the requires_payment_method status.
StripeExceptionpublic SetupIntent confirm(RequestOptions options) throws StripeException
If the selected payment method does not require any additional steps from the customer, the
SetupIntent will transition to the succeeded status.
Otherwise, it will transition to the requires_action status and suggest
additional actions via next_action. If setup fails, the SetupIntent will
transition to the requires_payment_method status.
StripeExceptionpublic SetupIntent confirm(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
If the selected payment method does not require any additional steps from the customer, the
SetupIntent will transition to the succeeded status.
Otherwise, it will transition to the requires_action status and suggest
additional actions via next_action. If setup fails, the SetupIntent will
transition to the requires_payment_method status.
StripeExceptionpublic SetupIntent confirm(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
If the selected payment method does not require any additional steps from the customer, the
SetupIntent will transition to the succeeded status.
Otherwise, it will transition to the requires_action status and suggest
additional actions via next_action. If setup fails, the SetupIntent will
transition to the requires_payment_method status.
StripeExceptionpublic SetupIntent confirm(SetupIntentConfirmParams params) throws StripeException
If the selected payment method does not require any additional steps from the customer, the
SetupIntent will transition to the succeeded status.
Otherwise, it will transition to the requires_action status and suggest
additional actions via next_action. If setup fails, the SetupIntent will
transition to the requires_payment_method status.
StripeExceptionpublic SetupIntent confirm(SetupIntentConfirmParams params, RequestOptions options) throws StripeException
If the selected payment method does not require any additional steps from the customer, the
SetupIntent will transition to the succeeded status.
Otherwise, it will transition to the requires_action status and suggest
additional actions via next_action. If setup fails, the SetupIntent will
transition to the requires_payment_method status.
StripeExceptionpublic SetupIntent cancel() throws StripeException
requires_payment_method, requires_confirmation, or requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeExceptionpublic SetupIntent cancel(RequestOptions options) throws StripeException
requires_payment_method, requires_confirmation, or requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeExceptionpublic SetupIntent cancel(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
requires_payment_method, requires_confirmation, or requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeExceptionpublic SetupIntent cancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
requires_payment_method, requires_confirmation, or requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeExceptionpublic SetupIntent cancel(SetupIntentCancelParams params) throws StripeException
requires_payment_method, requires_confirmation, or requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeExceptionpublic SetupIntent cancel(SetupIntentCancelParams params, RequestOptions options) throws StripeException
requires_payment_method, requires_confirmation, or requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeExceptionpublic java.lang.String getCancellationReason()
abandoned, requested_by_customer, or duplicate.public java.lang.String getClientSecret()
The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
public java.lang.Long getCreated()
public java.lang.String getDescription()
public StripeError getLastSetupError()
public java.lang.Boolean getLivemode()
true if the object exists in live mode or the value false if the
object exists in test mode.public SetupIntent.NextAction getNextAction()
public java.lang.String getObject()
Equal to setup_intent.
public SetupIntent.PaymentMethodOptions getPaymentMethodOptions()
public java.util.List<java.lang.String> getPaymentMethodTypes()
public java.lang.String getStatus()
requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.public java.lang.String getUsage()
Use on_session if you intend to only reuse the payment method when the customer is
in your checkout flow. Use off_session if your customer may or may not be in your
checkout flow. If not provided, this value defaults to off_session.
public void setCancellationReason(java.lang.String cancellationReason)
abandoned, requested_by_customer, or duplicate.public void setClientSecret(java.lang.String clientSecret)
The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
public void setCreated(java.lang.Long created)
public void setDescription(java.lang.String description)
public void setId(java.lang.String id)
public void setLastSetupError(StripeError lastSetupError)
public void setLivemode(java.lang.Boolean livemode)
true if the object exists in live mode or the value false if the
object exists in test mode.public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setNextAction(SetupIntent.NextAction nextAction)
public void setObject(java.lang.String object)
Equal to setup_intent.
public void setPaymentMethodOptions(SetupIntent.PaymentMethodOptions paymentMethodOptions)
public void setPaymentMethodTypes(java.util.List<java.lang.String> paymentMethodTypes)
public void setStatus(java.lang.String status)
requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.public void setUsage(java.lang.String usage)
Use on_session if you intend to only reuse the payment method when the customer is
in your checkout flow. Use off_session if your customer may or may not be in your
checkout flow. If not provided, this value defaults to off_session.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata in interface MetadataStore<SetupIntent>