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.RequestMethod, ApiResource.RequestType
CHARSET, GSON
PRETTY_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_capture , requires_confirmation
, 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_capture , requires_confirmation
, 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_capture , requires_confirmation
, requires_action . |
SetupIntent |
cancel(RequestOptions options)
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method , requires_capture , requires_confirmation
, requires_action . |
SetupIntent |
cancel(SetupIntentCancelParams params)
A SetupIntent object can be canceled when it is in one of these statuses:
requires_payment_method , requires_capture , requires_confirmation
, 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_capture , requires_confirmation
, 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.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 |
getStatus()
[Status](https://stripe.com/docs/payments/intents#intent-statuses) 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 |
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 |
setStatus(java.lang.String status)
[Status](https://stripe.com/docs/payments/intents#intent-statuses) 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, multipartRequest, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public java.lang.String getApplication()
public void setApplication(java.lang.String id)
public Application getApplicationObject()
public void setApplicationObject(Application expandableObject)
public java.lang.String getCustomer()
public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
public void setCustomerObject(Customer expandableObject)
public java.lang.String getOnBehalfOf()
public void setOnBehalfOf(java.lang.String id)
public Account getOnBehalfOfObject()
public void setOnBehalfOfObject(Account expandableObject)
public java.lang.String getPaymentMethod()
public void setPaymentMethod(java.lang.String id)
public PaymentMethod getPaymentMethodObject()
public void setPaymentMethodObject(PaymentMethod 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public static SetupIntentCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static SetupIntentCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static SetupIntentCollection list(SetupIntentListParams params) throws StripeException
StripeException
public static SetupIntentCollection list(SetupIntentListParams params, RequestOptions options) throws StripeException
StripeException
public 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public SetupIntent update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update
in interface MetadataStore<SetupIntent>
StripeException
public SetupIntent update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update
in interface MetadataStore<SetupIntent>
StripeException
public SetupIntent update(SetupIntentUpdateParams params) throws StripeException
StripeException
public SetupIntent update(SetupIntentUpdateParams params, RequestOptions options) throws StripeException
StripeException
public 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public SetupIntent cancel() throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeException
public SetupIntent cancel(RequestOptions options) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeException
public SetupIntent cancel(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeException
public SetupIntent cancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeException
public SetupIntent cancel(SetupIntentCancelParams params) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeException
public SetupIntent cancel(SetupIntentCancelParams params, RequestOptions options) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.
StripeException
public java.lang.String getCancellationReason()
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()
public SetupIntent.NextAction getNextAction()
public java.lang.String getObject()
public SetupIntent.PaymentMethodOptions getPaymentMethodOptions()
public java.util.List<java.lang.String> getPaymentMethodTypes()
public java.lang.String getStatus()
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)
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)
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)
public void setPaymentMethodOptions(SetupIntent.PaymentMethodOptions paymentMethodOptions)
public void setPaymentMethodTypes(java.util.List<java.lang.String> paymentMethodTypes)
public void setStatus(java.lang.String status)
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.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface MetadataStore<SetupIntent>