Class PaymentIntent
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.PaymentIntent
-
- All Implemented Interfaces:
HasId
,MetadataStore<PaymentIntent>
,StripeObjectInterface
public class PaymentIntent extends ApiResource implements HasId, MetadataStore<PaymentIntent>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PaymentIntent.NextAction
static class
PaymentIntent.NextActionAlipayHandleRedirect
An universal link that redirect to Wechat Pay APP.static class
PaymentIntent.NextActionDisplayBoletoDetails
static class
PaymentIntent.NextActionOxxoDisplayDetails
static class
PaymentIntent.NextActionRedirectToUrl
static class
PaymentIntent.PaymentMethodOptions
static class
PaymentIntent.TransferData
The client type that the end customer will pay from-
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
Constructors Constructor Description PaymentIntent()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PaymentIntent
cancel()
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.PaymentIntent
cancel(RequestOptions options)
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.PaymentIntent
cancel(PaymentIntentCancelParams params)
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.PaymentIntent
cancel(PaymentIntentCancelParams params, RequestOptions options)
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.PaymentIntent
cancel(java.util.Map<java.lang.String,java.lang.Object> params)
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.PaymentIntent
cancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.protected boolean
canEqual(java.lang.Object other)
PaymentIntent
capture()
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.PaymentIntent
capture(RequestOptions options)
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.PaymentIntent
capture(PaymentIntentCaptureParams params)
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.PaymentIntent
capture(PaymentIntentCaptureParams params, RequestOptions options)
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.PaymentIntent
capture(java.util.Map<java.lang.String,java.lang.Object> params)
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.PaymentIntent
capture(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.PaymentIntent
confirm()
Confirm that your customer intends to pay with current or provided payment method.PaymentIntent
confirm(RequestOptions options)
Confirm that your customer intends to pay with current or provided payment method.PaymentIntent
confirm(PaymentIntentConfirmParams params)
Confirm that your customer intends to pay with current or provided payment method.PaymentIntent
confirm(PaymentIntentConfirmParams params, RequestOptions options)
Confirm that your customer intends to pay with current or provided payment method.PaymentIntent
confirm(java.util.Map<java.lang.String,java.lang.Object> params)
Confirm that your customer intends to pay with current or provided payment method.PaymentIntent
confirm(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Confirm that your customer intends to pay with current or provided payment method.static PaymentIntent
create(PaymentIntentCreateParams params)
Creates a PaymentIntent object.static PaymentIntent
create(PaymentIntentCreateParams params, RequestOptions options)
Creates a PaymentIntent object.static PaymentIntent
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a PaymentIntent object.static PaymentIntent
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Creates a PaymentIntent object.boolean
equals(java.lang.Object o)
java.lang.Long
getAmount()
Amount intended to be collected by this PaymentIntent.java.lang.Long
getAmountCapturable()
Amount that can be captured from this PaymentIntent.java.lang.Long
getAmountReceived()
Amount that was collected by this PaymentIntent.java.lang.String
getApplication()
Get ID of expandableapplication
object.java.lang.Long
getApplicationFeeAmount()
The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.Application
getApplicationObject()
Get expandedapplication
.java.lang.Long
getCanceledAt()
Populated whenstatus
iscanceled
, this is the time at which the PaymentIntent was canceled.java.lang.String
getCancellationReason()
Reason for cancellation of this PaymentIntent, either user-provided (duplicate
,fraudulent
,requested_by_customer
, orabandoned
) or generated by Stripe internally (failed_invoice
,void_invoice
, orautomatic
).java.lang.String
getCaptureMethod()
Controls when the funds will be captured from the customer's account.ChargeCollection
getCharges()
Charges that were created by this PaymentIntent, if any.java.lang.String
getClientSecret()
The client secret of this PaymentIntent.java.lang.String
getConfirmationMethod()
java.lang.Long
getCreated()
Time at which the object was created.java.lang.String
getCurrency()
Three-letter ISO currency code, in lowercase.java.lang.String
getCustomer()
Get ID of expandablecustomer
object.Customer
getCustomerObject()
Get expandedcustomer
.java.lang.String
getDescription()
An arbitrary string attached to the object.java.lang.String
getId()
Unique identifier for the object.java.lang.String
getInvoice()
Get ID of expandableinvoice
object.Invoice
getInvoiceObject()
Get expandedinvoice
.StripeError
getLastPaymentError()
The payment error encountered in the previous PaymentIntent confirmation.java.lang.Boolean
getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
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.PaymentIntent.NextAction
getNextAction()
If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.java.lang.String
getObject()
String representing the object's type.java.lang.String
getOnBehalfOf()
Get ID of expandableonBehalfOf
object.Account
getOnBehalfOfObject()
Get expandedonBehalfOf
.java.lang.String
getPaymentMethod()
Get ID of expandablepaymentMethod
object.PaymentMethod
getPaymentMethodObject()
Get expandedpaymentMethod
.PaymentIntent.PaymentMethodOptions
getPaymentMethodOptions()
Payment-method-specific configuration for this PaymentIntent.java.util.List<java.lang.String>
getPaymentMethodTypes()
The list of payment method types (e.g.java.lang.String
getReceiptEmail()
Email address that the receipt for the resulting payment will be sent to.java.lang.String
getReview()
Get ID of expandablereview
object.Review
getReviewObject()
Get expandedreview
.java.lang.String
getSetupFutureUsage()
Indicates that you intend to make future payments with this PaymentIntent's payment method.ShippingDetails
getShipping()
Shipping information for this PaymentIntent.java.lang.String
getSource()
Get ID of expandablesource
object.PaymentSource
getSourceObject()
Get expandedsource
.java.lang.String
getStatementDescriptor()
For non-card charges, you can use this value as the complete description that appears on your customers’ statements.java.lang.String
getStatementDescriptorSuffix()
Provides information about a card payment that customers see on their statements.java.lang.String
getStatus()
Status of this PaymentIntent, one ofrequires_payment_method
,requires_confirmation
,requires_action
,processing
,requires_capture
,canceled
, orsucceeded
.PaymentIntent.TransferData
getTransferData()
The data with which to automatically create a Transfer when the payment is finalized.java.lang.String
getTransferGroup()
A string that identifies the resulting payment as part of a group.int
hashCode()
static PaymentIntentCollection
list(PaymentIntentListParams params)
Returns a list of PaymentIntents.static PaymentIntentCollection
list(PaymentIntentListParams params, RequestOptions options)
Returns a list of PaymentIntents.static PaymentIntentCollection
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of PaymentIntents.static PaymentIntentCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Returns a list of PaymentIntents.static PaymentIntent
retrieve(java.lang.String intent)
Retrieves the details of a PaymentIntent that has previously been created.static PaymentIntent
retrieve(java.lang.String intent, RequestOptions options)
Retrieves the details of a PaymentIntent that has previously been created.static PaymentIntent
retrieve(java.lang.String intent, PaymentIntentRetrieveParams params, RequestOptions options)
Retrieves the details of a PaymentIntent that has previously been created.static PaymentIntent
retrieve(java.lang.String intent, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves the details of a PaymentIntent that has previously been created.void
setAmount(java.lang.Long amount)
Amount intended to be collected by this PaymentIntent.void
setAmountCapturable(java.lang.Long amountCapturable)
Amount that can be captured from this PaymentIntent.void
setAmountReceived(java.lang.Long amountReceived)
Amount that was collected by this PaymentIntent.void
setApplication(java.lang.String id)
void
setApplicationFeeAmount(java.lang.Long applicationFeeAmount)
The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.void
setApplicationObject(Application expandableObject)
void
setCanceledAt(java.lang.Long canceledAt)
Populated whenstatus
iscanceled
, this is the time at which the PaymentIntent was canceled.void
setCancellationReason(java.lang.String cancellationReason)
Reason for cancellation of this PaymentIntent, either user-provided (duplicate
,fraudulent
,requested_by_customer
, orabandoned
) or generated by Stripe internally (failed_invoice
,void_invoice
, orautomatic
).void
setCaptureMethod(java.lang.String captureMethod)
Controls when the funds will be captured from the customer's account.void
setCharges(ChargeCollection charges)
Charges that were created by this PaymentIntent, if any.void
setClientSecret(java.lang.String clientSecret)
The client secret of this PaymentIntent.void
setConfirmationMethod(java.lang.String confirmationMethod)
void
setCreated(java.lang.Long created)
Time at which the object was created.void
setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase.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
setInvoice(java.lang.String id)
void
setInvoiceObject(Invoice expandableObject)
void
setLastPaymentError(StripeError lastPaymentError)
The payment error encountered in the previous PaymentIntent confirmation.void
setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
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(PaymentIntent.NextAction nextAction)
If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.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(PaymentIntent.PaymentMethodOptions paymentMethodOptions)
Payment-method-specific configuration for this PaymentIntent.void
setPaymentMethodTypes(java.util.List<java.lang.String> paymentMethodTypes)
The list of payment method types (e.g.void
setReceiptEmail(java.lang.String receiptEmail)
Email address that the receipt for the resulting payment will be sent to.void
setReview(java.lang.String id)
void
setReviewObject(Review expandableObject)
void
setSetupFutureUsage(java.lang.String setupFutureUsage)
Indicates that you intend to make future payments with this PaymentIntent's payment method.void
setShipping(ShippingDetails shipping)
Shipping information for this PaymentIntent.void
setSource(java.lang.String id)
void
setSourceObject(PaymentSource expandableObject)
void
setStatementDescriptor(java.lang.String statementDescriptor)
For non-card charges, you can use this value as the complete description that appears on your customers’ statements.void
setStatementDescriptorSuffix(java.lang.String statementDescriptorSuffix)
Provides information about a card payment that customers see on their statements.void
setStatus(java.lang.String status)
Status of this PaymentIntent, one ofrequires_payment_method
,requires_confirmation
,requires_action
,processing
,requires_capture
,canceled
, orsucceeded
.void
setTransferData(PaymentIntent.TransferData transferData)
The data with which to automatically create a Transfer when the payment is finalized.void
setTransferGroup(java.lang.String transferGroup)
A string that identifies the resulting payment as part of a group.PaymentIntent
update(PaymentIntentUpdateParams params)
Updates properties on a PaymentIntent object without confirming.PaymentIntent
update(PaymentIntentUpdateParams params, RequestOptions options)
Updates properties on a PaymentIntent object without confirming.PaymentIntent
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates properties on a PaymentIntent object without confirming.PaymentIntent
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Updates properties on a PaymentIntent object without confirming.-
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
-
-
-
-
Method Detail
-
getApplication
public java.lang.String getApplication()
Get ID of expandableapplication
object.
-
setApplication
public void setApplication(java.lang.String id)
-
getApplicationObject
public Application getApplicationObject()
Get expandedapplication
.
-
setApplicationObject
public void setApplicationObject(Application expandableObject)
-
getCustomer
public java.lang.String getCustomer()
Get ID of expandablecustomer
object.
-
setCustomer
public void setCustomer(java.lang.String id)
-
getCustomerObject
public Customer getCustomerObject()
Get expandedcustomer
.
-
setCustomerObject
public void setCustomerObject(Customer expandableObject)
-
getInvoice
public java.lang.String getInvoice()
Get ID of expandableinvoice
object.
-
setInvoice
public void setInvoice(java.lang.String id)
-
getInvoiceObject
public Invoice getInvoiceObject()
Get expandedinvoice
.
-
setInvoiceObject
public void setInvoiceObject(Invoice expandableObject)
-
getOnBehalfOf
public java.lang.String getOnBehalfOf()
Get ID of expandableonBehalfOf
object.
-
setOnBehalfOf
public void setOnBehalfOf(java.lang.String id)
-
getOnBehalfOfObject
public Account getOnBehalfOfObject()
Get expandedonBehalfOf
.
-
setOnBehalfOfObject
public void setOnBehalfOfObject(Account expandableObject)
-
getPaymentMethod
public java.lang.String getPaymentMethod()
Get ID of expandablepaymentMethod
object.
-
setPaymentMethod
public void setPaymentMethod(java.lang.String id)
-
getPaymentMethodObject
public PaymentMethod getPaymentMethodObject()
Get expandedpaymentMethod
.
-
setPaymentMethodObject
public void setPaymentMethodObject(PaymentMethod expandableObject)
-
getReview
public java.lang.String getReview()
Get ID of expandablereview
object.
-
setReview
public void setReview(java.lang.String id)
-
getReviewObject
public Review getReviewObject()
Get expandedreview
.
-
setReviewObject
public void setReviewObject(Review expandableObject)
-
getSource
public java.lang.String getSource()
Get ID of expandablesource
object.
-
setSource
public void setSource(java.lang.String id)
-
getSourceObject
public PaymentSource getSourceObject()
Get expandedsource
.
-
setSourceObject
public void setSourceObject(PaymentSource expandableObject)
-
create
public static PaymentIntent create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Creates a PaymentIntent object.After the PaymentIntent is created, attach a payment method and confirm to continue the payment. You can read more about the different payment flows available via the Payment Intents API here.
When
confirm=true
is used during creation, it is equivalent to creating and confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API whenconfirm=true
is supplied.- Throws:
StripeException
-
create
public static PaymentIntent create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Creates a PaymentIntent object.After the PaymentIntent is created, attach a payment method and confirm to continue the payment. You can read more about the different payment flows available via the Payment Intents API here.
When
confirm=true
is used during creation, it is equivalent to creating and confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API whenconfirm=true
is supplied.- Throws:
StripeException
-
create
public static PaymentIntent create(PaymentIntentCreateParams params) throws StripeException
Creates a PaymentIntent object.After the PaymentIntent is created, attach a payment method and confirm to continue the payment. You can read more about the different payment flows available via the Payment Intents API here.
When
confirm=true
is used during creation, it is equivalent to creating and confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API whenconfirm=true
is supplied.- Throws:
StripeException
-
create
public static PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options) throws StripeException
Creates a PaymentIntent object.After the PaymentIntent is created, attach a payment method and confirm to continue the payment. You can read more about the different payment flows available via the Payment Intents API here.
When
confirm=true
is used during creation, it is equivalent to creating and confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API whenconfirm=true
is supplied.- Throws:
StripeException
-
list
public static PaymentIntentCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Returns a list of PaymentIntents.- Throws:
StripeException
-
list
public static PaymentIntentCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Returns a list of PaymentIntents.- Throws:
StripeException
-
list
public static PaymentIntentCollection list(PaymentIntentListParams params) throws StripeException
Returns a list of PaymentIntents.- Throws:
StripeException
-
list
public static PaymentIntentCollection list(PaymentIntentListParams params, RequestOptions options) throws StripeException
Returns a list of PaymentIntents.- Throws:
StripeException
-
retrieve
public static PaymentIntent retrieve(java.lang.String intent) throws StripeException
Retrieves the details of a PaymentIntent that has previously been created.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 payment intent object reference for more details.
- Throws:
StripeException
-
retrieve
public static PaymentIntent retrieve(java.lang.String intent, RequestOptions options) throws StripeException
Retrieves the details of a PaymentIntent that has previously been created.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 payment intent object reference for more details.
- Throws:
StripeException
-
retrieve
public static PaymentIntent retrieve(java.lang.String intent, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieves the details of a PaymentIntent that has previously been created.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 payment intent object reference for more details.
- Throws:
StripeException
-
retrieve
public static PaymentIntent retrieve(java.lang.String intent, PaymentIntentRetrieveParams params, RequestOptions options) throws StripeException
Retrieves the details of a PaymentIntent that has previously been created.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 payment intent object reference for more details.
- Throws:
StripeException
-
update
public PaymentIntent update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates properties on a PaymentIntent object without confirming.Depending on which properties you update, you may need to confirm the PaymentIntent again. For example, updating the
payment_method
will always require you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties via the confirm API instead.- Specified by:
update
in interfaceMetadataStore<PaymentIntent>
- Throws:
StripeException
-
update
public PaymentIntent update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Updates properties on a PaymentIntent object without confirming.Depending on which properties you update, you may need to confirm the PaymentIntent again. For example, updating the
payment_method
will always require you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties via the confirm API instead.- Specified by:
update
in interfaceMetadataStore<PaymentIntent>
- Throws:
StripeException
-
update
public PaymentIntent update(PaymentIntentUpdateParams params) throws StripeException
Updates properties on a PaymentIntent object without confirming.Depending on which properties you update, you may need to confirm the PaymentIntent again. For example, updating the
payment_method
will always require you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties via the confirm API instead.- Throws:
StripeException
-
update
public PaymentIntent update(PaymentIntentUpdateParams params, RequestOptions options) throws StripeException
Updates properties on a PaymentIntent object without confirming.Depending on which properties you update, you may need to confirm the PaymentIntent again. For example, updating the
payment_method
will always require you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties via the confirm API instead.- Throws:
StripeException
-
confirm
public PaymentIntent confirm() throws StripeException
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the
requires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent will transition to therequires_payment_method
status. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
).If the
confirmation_method
isautomatic
, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. Afternext_action
s are handled by the client, no additional confirmation is required to complete the payment.If the
confirmation_method
ismanual
, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to therequires_confirmation
state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. Read the expanded documentation to learn more about manual confirmation.- Throws:
StripeException
-
confirm
public PaymentIntent confirm(RequestOptions options) throws StripeException
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the
requires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent will transition to therequires_payment_method
status. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
).If the
confirmation_method
isautomatic
, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. Afternext_action
s are handled by the client, no additional confirmation is required to complete the payment.If the
confirmation_method
ismanual
, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to therequires_confirmation
state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. Read the expanded documentation to learn more about manual confirmation.- Throws:
StripeException
-
confirm
public PaymentIntent confirm(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the
requires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent will transition to therequires_payment_method
status. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
).If the
confirmation_method
isautomatic
, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. Afternext_action
s are handled by the client, no additional confirmation is required to complete the payment.If the
confirmation_method
ismanual
, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to therequires_confirmation
state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. Read the expanded documentation to learn more about manual confirmation.- Throws:
StripeException
-
confirm
public PaymentIntent confirm(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the
requires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent will transition to therequires_payment_method
status. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
).If the
confirmation_method
isautomatic
, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. Afternext_action
s are handled by the client, no additional confirmation is required to complete the payment.If the
confirmation_method
ismanual
, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to therequires_confirmation
state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. Read the expanded documentation to learn more about manual confirmation.- Throws:
StripeException
-
confirm
public PaymentIntent confirm(PaymentIntentConfirmParams params) throws StripeException
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the
requires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent will transition to therequires_payment_method
status. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
).If the
confirmation_method
isautomatic
, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. Afternext_action
s are handled by the client, no additional confirmation is required to complete the payment.If the
confirmation_method
ismanual
, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to therequires_confirmation
state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. Read the expanded documentation to learn more about manual confirmation.- Throws:
StripeException
-
confirm
public PaymentIntent confirm(PaymentIntentConfirmParams params, RequestOptions options) throws StripeException
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the
requires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent will transition to therequires_payment_method
status. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
).If the
confirmation_method
isautomatic
, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. Afternext_action
s are handled by the client, no additional confirmation is required to complete the payment.If the
confirmation_method
ismanual
, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to therequires_confirmation
state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. Read the expanded documentation to learn more about manual confirmation.- Throws:
StripeException
-
cancel
public PaymentIntent cancel() throws StripeException
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with
status=’requires_capture’
, the remainingamount_capturable
will automatically be refunded.- Throws:
StripeException
-
cancel
public PaymentIntent cancel(RequestOptions options) throws StripeException
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with
status=’requires_capture’
, the remainingamount_capturable
will automatically be refunded.- Throws:
StripeException
-
cancel
public PaymentIntent cancel(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with
status=’requires_capture’
, the remainingamount_capturable
will automatically be refunded.- Throws:
StripeException
-
cancel
public PaymentIntent cancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with
status=’requires_capture’
, the remainingamount_capturable
will automatically be refunded.- Throws:
StripeException
-
cancel
public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeException
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with
status=’requires_capture’
, the remainingamount_capturable
will automatically be refunded.- Throws:
StripeException
-
cancel
public PaymentIntent cancel(PaymentIntentCancelParams params, RequestOptions options) throws StripeException
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
, orrequires_action
.Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with
status=’requires_capture’
, the remainingamount_capturable
will automatically be refunded.- Throws:
StripeException
-
capture
public PaymentIntent capture() throws StripeException
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
public PaymentIntent capture(RequestOptions options) throws StripeException
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
public PaymentIntent capture(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
public PaymentIntent capture(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
public PaymentIntent capture(PaymentIntentCaptureParams params) throws StripeException
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
public PaymentIntent capture(PaymentIntentCaptureParams params, RequestOptions options) throws StripeException
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
- Throws:
StripeException
-
getAmount
public java.lang.Long getAmount()
Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
-
getAmountCapturable
public java.lang.Long getAmountCapturable()
Amount that can be captured from this PaymentIntent.
-
getAmountReceived
public java.lang.Long getAmountReceived()
Amount that was collected by this PaymentIntent.
-
getApplicationFeeAmount
public java.lang.Long getApplicationFeeAmount()
The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts.
-
getCanceledAt
public java.lang.Long getCanceledAt()
Populated whenstatus
iscanceled
, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
-
getCancellationReason
public java.lang.String getCancellationReason()
Reason for cancellation of this PaymentIntent, either user-provided (duplicate
,fraudulent
,requested_by_customer
, orabandoned
) or generated by Stripe internally (failed_invoice
,void_invoice
, orautomatic
).One of
abandoned
,automatic
,duplicate
,failed_invoice
,fraudulent
,requested_by_customer
, orvoid_invoice
.
-
getCaptureMethod
public java.lang.String getCaptureMethod()
Controls when the funds will be captured from the customer's account.One of
automatic
, ormanual
.
-
getCharges
public ChargeCollection getCharges()
Charges that were created by this PaymentIntent, if any.
-
getClientSecret
public java.lang.String getClientSecret()
The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.The client secret can be used to complete a payment 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.
Refer to our docs to accept a payment and learn about how
client_secret
should be handled.
-
getConfirmationMethod
public java.lang.String getConfirmationMethod()
-
getCreated
public java.lang.Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getCurrency
public java.lang.String getCurrency()
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
getDescription
public java.lang.String getDescription()
An arbitrary string attached to the object. Often useful for displaying to users.
-
getLastPaymentError
public StripeError getLastPaymentError()
The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
-
getLivemode
public java.lang.Boolean getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.
-
getNextAction
public PaymentIntent.NextAction getNextAction()
If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
payment_intent
.
-
getPaymentMethodOptions
public PaymentIntent.PaymentMethodOptions getPaymentMethodOptions()
Payment-method-specific configuration for this PaymentIntent.
-
getPaymentMethodTypes
public java.util.List<java.lang.String> getPaymentMethodTypes()
The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
-
getReceiptEmail
public java.lang.String getReceiptEmail()
Email address that the receipt for the resulting payment will be sent to. Ifreceipt_email
is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
-
getSetupFutureUsage
public java.lang.String getSetupFutureUsage()
Indicates that you intend to make future payments with this PaymentIntent's payment method.Providing this parameter 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. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.
When processing card payments, Stripe also uses
setup_future_usage
to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.One of
off_session
, oron_session
.
-
getShipping
public ShippingDetails getShipping()
Shipping information for this PaymentIntent.
-
getStatementDescriptor
public java.lang.String getStatementDescriptor()
For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.
-
getStatementDescriptorSuffix
public java.lang.String getStatementDescriptorSuffix()
Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
-
getStatus
public java.lang.String getStatus()
Status of this PaymentIntent, one ofrequires_payment_method
,requires_confirmation
,requires_action
,processing
,requires_capture
,canceled
, orsucceeded
. Read more about each PaymentIntent status.
-
getTransferData
public PaymentIntent.TransferData getTransferData()
The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents use case for connected accounts for details.
-
getTransferGroup
public java.lang.String getTransferGroup()
A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts for details.
-
setAmount
public void setAmount(java.lang.Long amount)
Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
-
setAmountCapturable
public void setAmountCapturable(java.lang.Long amountCapturable)
Amount that can be captured from this PaymentIntent.
-
setAmountReceived
public void setAmountReceived(java.lang.Long amountReceived)
Amount that was collected by this PaymentIntent.
-
setApplicationFeeAmount
public void setApplicationFeeAmount(java.lang.Long applicationFeeAmount)
The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts.
-
setCanceledAt
public void setCanceledAt(java.lang.Long canceledAt)
Populated whenstatus
iscanceled
, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
-
setCancellationReason
public void setCancellationReason(java.lang.String cancellationReason)
Reason for cancellation of this PaymentIntent, either user-provided (duplicate
,fraudulent
,requested_by_customer
, orabandoned
) or generated by Stripe internally (failed_invoice
,void_invoice
, orautomatic
).One of
abandoned
,automatic
,duplicate
,failed_invoice
,fraudulent
,requested_by_customer
, orvoid_invoice
.
-
setCaptureMethod
public void setCaptureMethod(java.lang.String captureMethod)
Controls when the funds will be captured from the customer's account.One of
automatic
, ormanual
.
-
setCharges
public void setCharges(ChargeCollection charges)
Charges that were created by this PaymentIntent, if any.
-
setClientSecret
public void setClientSecret(java.lang.String clientSecret)
The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.The client secret can be used to complete a payment 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.
Refer to our docs to accept a payment and learn about how
client_secret
should be handled.
-
setConfirmationMethod
public void setConfirmationMethod(java.lang.String confirmationMethod)
-
setCreated
public void setCreated(java.lang.Long created)
Time at which the object was created. Measured in seconds since the Unix epoch.
-
setCurrency
public void setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
setDescription
public void setDescription(java.lang.String description)
An arbitrary string attached to the object. Often useful for displaying to users.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setLastPaymentError
public void setLastPaymentError(StripeError lastPaymentError)
The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.
-
setMetadata
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the documentation.
-
setNextAction
public void setNextAction(PaymentIntent.NextAction nextAction)
If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
-
setObject
public void setObject(java.lang.String object)
String representing the object's type. Objects of the same type share the same value.Equal to
payment_intent
.
-
setPaymentMethodOptions
public void setPaymentMethodOptions(PaymentIntent.PaymentMethodOptions paymentMethodOptions)
Payment-method-specific configuration for this PaymentIntent.
-
setPaymentMethodTypes
public void setPaymentMethodTypes(java.util.List<java.lang.String> paymentMethodTypes)
The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
-
setReceiptEmail
public void setReceiptEmail(java.lang.String receiptEmail)
Email address that the receipt for the resulting payment will be sent to. Ifreceipt_email
is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
-
setSetupFutureUsage
public void setSetupFutureUsage(java.lang.String setupFutureUsage)
Indicates that you intend to make future payments with this PaymentIntent's payment method.Providing this parameter 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. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.
When processing card payments, Stripe also uses
setup_future_usage
to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.One of
off_session
, oron_session
.
-
setShipping
public void setShipping(ShippingDetails shipping)
Shipping information for this PaymentIntent.
-
setStatementDescriptor
public void setStatementDescriptor(java.lang.String statementDescriptor)
For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.
-
setStatementDescriptorSuffix
public void setStatementDescriptorSuffix(java.lang.String statementDescriptorSuffix)
Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
-
setStatus
public void setStatus(java.lang.String status)
Status of this PaymentIntent, one ofrequires_payment_method
,requires_confirmation
,requires_action
,processing
,requires_capture
,canceled
, orsucceeded
. Read more about each PaymentIntent status.
-
setTransferData
public void setTransferData(PaymentIntent.TransferData transferData)
The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents use case for connected accounts for details.
-
setTransferGroup
public void setTransferGroup(java.lang.String transferGroup)
A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts for details.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getId
public java.lang.String getId()
Unique identifier for the object.
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the documentation.- Specified by:
getMetadata
in interfaceMetadataStore<PaymentIntent>
-
-