Class PaymentIntent
- All Implemented Interfaces:
HasId
,MetadataStore<PaymentIntent>
,StripeObjectInterface
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Portion of the amount that corresponds to a tip.static class
An universal link that redirect to WeChat Pay app.static class
static class
static class
The branch name of the account.static class
static class
The payment code.static class
static class
static class
Indicates that you intend to make future payments with this PaymentIntent's payment method.static class
If customer approval is required, they need to provide approval before this time.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 -
Method Summary
Modifier and TypeMethodDescriptionManually reconcile the remaining amount for a customer_balance PaymentIntent.applyCustomerBalance
(RequestOptions options) Manually reconcile the remaining amount for a customer_balance PaymentIntent.Manually reconcile the remaining amount for a customer_balance PaymentIntent.applyCustomerBalance
(PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) Manually reconcile the remaining amount for a customer_balance PaymentIntent.applyCustomerBalance
(Map<String, Object> params) Manually reconcile the remaining amount for a customer_balance PaymentIntent.applyCustomerBalance
(Map<String, Object> params, RequestOptions options) Manually reconcile the remaining amount for a customer_balance PaymentIntent.cancel()
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
, orprocessing
.cancel
(RequestOptions options) A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
, orprocessing
.cancel
(PaymentIntentCancelParams params) A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
, orprocessing
.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
,requires_action
, orprocessing
.A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
, orprocessing
.cancel
(Map<String, 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
,requires_action
, orprocessing
.protected boolean
capture()
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.capture
(RequestOptions options) Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.capture
(PaymentIntentCaptureParams params) Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.capture
(PaymentIntentCaptureParams params, RequestOptions options) Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.capture
(Map<String, Object> params, RequestOptions options) Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.confirm()
Confirm that your customer intends to pay with current or provided payment method.confirm
(RequestOptions options) Confirm that your customer intends to pay with current or provided payment method.confirm
(PaymentIntentConfirmParams params) Confirm that your customer intends to pay with current or provided payment method.confirm
(PaymentIntentConfirmParams params, RequestOptions options) Confirm that your customer intends to pay with current or provided payment method.Confirm that your customer intends to pay with current or provided payment method.confirm
(Map<String, 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
Creates a PaymentIntent object.static PaymentIntent
create
(Map<String, Object> params, RequestOptions options) Creates a PaymentIntent object.boolean
Amount intended to be collected by this PaymentIntent.Amount that can be captured from this PaymentIntent.Amount that was collected by this PaymentIntent.Get ID of expandableapplication
object.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.Get expandedapplication
.Settings to configure compatible payment methods from the Stripe Dashboard.Populated whenstatus
iscanceled
, this is the time at which the PaymentIntent was canceled.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
).Controls when the funds will be captured from the customer's account.Charges that were created by this PaymentIntent, if any.The client secret of this PaymentIntent.Time at which the object was created.Three-letter ISO currency code, in lowercase.Get ID of expandablecustomer
object.Get expandedcustomer
.An arbitrary string attached to the object.getId()
Unique identifier for the object.Get ID of expandableinvoice
object.Get expandedinvoice
.The payment error encountered in the previous PaymentIntent confirmation.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.Set of key-value pairs that you can attach to an object.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.String representing the object's type.Get ID of expandableonBehalfOf
object.Get expandedonBehalfOf
.Get ID of expandablepaymentMethod
object.Get expandedpaymentMethod
.Payment-method-specific configuration for this PaymentIntent.The list of payment method types (e.g.If present, this property tells you about the processing state of the payment.Email address that the receipt for the resulting payment will be sent to.Get ID of expandablereview
object.Get expandedreview
.Indicates that you intend to make future payments with this PaymentIntent's payment method.Shipping information for this PaymentIntent.Get ID of expandablesource
object.Get expandedsource
.For non-card charges, you can use this value as the complete description that appears on your customers’ statements.Provides information about a card payment that customers see on their statements.Status of this PaymentIntent, one ofrequires_payment_method
,requires_confirmation
,requires_action
,processing
,requires_capture
,canceled
, orsucceeded
.The data with which to automatically create a Transfer when the payment is finalized.A string that identifies the resulting payment as part of a group.int
hashCode()
Perform an incremental authorization on an eligible PaymentIntent.Perform an incremental authorization on an eligible PaymentIntent.incrementAuthorization
(Map<String, Object> params) Perform an incremental authorization on an eligible PaymentIntent.incrementAuthorization
(Map<String, Object> params, RequestOptions options) Perform an incremental authorization on an eligible PaymentIntent.static PaymentIntentCollection
list
(PaymentIntentListParams params) Returns a list of PaymentIntents.static PaymentIntentCollection
list
(PaymentIntentListParams params, RequestOptions options) Returns a list of PaymentIntents.static PaymentIntentCollection
Returns a list of PaymentIntents.static PaymentIntentCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of PaymentIntents.static PaymentIntent
Retrieves the details of a PaymentIntent that has previously been created.static PaymentIntent
retrieve
(String intent, RequestOptions options) Retrieves the details of a PaymentIntent that has previously been created.static PaymentIntent
retrieve
(String intent, PaymentIntentRetrieveParams params, RequestOptions options) Retrieves the details of a PaymentIntent that has previously been created.static PaymentIntent
Retrieves the details of a PaymentIntent that has previously been created.static PaymentIntentSearchResult
search
(PaymentIntentSearchParams params) Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.static PaymentIntentSearchResult
search
(PaymentIntentSearchParams params, RequestOptions options) Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.static PaymentIntentSearchResult
Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.static PaymentIntentSearchResult
search
(Map<String, Object> params, RequestOptions options) Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.void
Amount intended to be collected by this PaymentIntent.void
setAmountCapturable
(Long amountCapturable) Amount that can be captured from this PaymentIntent.void
setAmountDetails
(PaymentIntent.AmountDetails amountDetails) void
setAmountReceived
(Long amountReceived) Amount that was collected by this PaymentIntent.void
setApplication
(String id) void
setApplicationFeeAmount
(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
setAutomaticPaymentMethods
(AutomaticPaymentMethodsPaymentIntent automaticPaymentMethods) Settings to configure compatible payment methods from the Stripe Dashboard.void
setCanceledAt
(Long canceledAt) Populated whenstatus
iscanceled
, this is the time at which the PaymentIntent was canceled.void
setCancellationReason
(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
(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
(String clientSecret) The client secret of this PaymentIntent.void
setConfirmationMethod
(String confirmationMethod) void
setCreated
(Long created) Time at which the object was created.void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setCustomer
(String id) void
setCustomerObject
(Customer expandableObject) void
setDescription
(String description) An arbitrary string attached to the object.void
Unique identifier for the object.void
setInvoice
(String id) void
setInvoiceObject
(Invoice expandableObject) void
setLastPaymentError
(StripeError lastPaymentError) The payment error encountered in the previous PaymentIntent confirmation.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata
(Map<String, 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
String representing the object's type.void
setOnBehalfOf
(String id) void
setOnBehalfOfObject
(Account expandableObject) void
void
setPaymentMethodObject
(PaymentMethod expandableObject) void
setPaymentMethodOptions
(PaymentIntent.PaymentMethodOptions paymentMethodOptions) Payment-method-specific configuration for this PaymentIntent.void
setPaymentMethodTypes
(List<String> paymentMethodTypes) The list of payment method types (e.g.void
setProcessing
(PaymentIntent.Processing processing) If present, this property tells you about the processing state of the payment.void
setReceiptEmail
(String receiptEmail) Email address that the receipt for the resulting payment will be sent to.void
void
setReviewObject
(Review expandableObject) void
setSetupFutureUsage
(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
void
setSourceObject
(PaymentSource expandableObject) void
setStatementDescriptor
(String statementDescriptor) For non-card charges, you can use this value as the complete description that appears on your customers’ statements.void
setStatementDescriptorSuffix
(String statementDescriptorSuffix) Provides information about a card payment that customers see on their statements.void
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
(String transferGroup) A string that identifies the resulting payment as part of a group.update
(PaymentIntentUpdateParams params) Updates properties on a PaymentIntent object without confirming.update
(PaymentIntentUpdateParams params, RequestOptions options) Updates properties on a PaymentIntent object without confirming.Updates properties on a PaymentIntent object without confirming.update
(Map<String, Object> params, RequestOptions options) Updates properties on a PaymentIntent object without confirming.Verifies microdeposits on a PaymentIntent object.verifyMicrodeposits
(RequestOptions options) Verifies microdeposits on a PaymentIntent object.Verifies microdeposits on a PaymentIntent object.verifyMicrodeposits
(PaymentIntentVerifyMicrodepositsParams params, RequestOptions options) Verifies microdeposits on a PaymentIntent object.verifyMicrodeposits
(Map<String, Object> params) Verifies microdeposits on a PaymentIntent object.verifyMicrodeposits
(Map<String, Object> params, RequestOptions options) Verifies microdeposits on a PaymentIntent object.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
-
Constructor Details
-
PaymentIntent
public PaymentIntent()
-
-
Method Details
-
getApplication
Get ID of expandableapplication
object. -
setApplication
-
getApplicationObject
Get expandedapplication
. -
setApplicationObject
-
getCustomer
Get ID of expandablecustomer
object. -
setCustomer
-
getCustomerObject
Get expandedcustomer
. -
setCustomerObject
-
getInvoice
Get ID of expandableinvoice
object. -
setInvoice
-
getInvoiceObject
Get expandedinvoice
. -
setInvoiceObject
-
getOnBehalfOf
Get ID of expandableonBehalfOf
object. -
setOnBehalfOf
-
getOnBehalfOfObject
Get expandedonBehalfOf
. -
setOnBehalfOfObject
-
getPaymentMethod
Get ID of expandablepaymentMethod
object. -
setPaymentMethod
-
getPaymentMethodObject
Get expandedpaymentMethod
. -
setPaymentMethodObject
-
getReview
Get ID of expandablereview
object. -
setReview
-
getReviewObject
Get expandedreview
. -
setReviewObject
-
getSource
Get ID of expandablesource
object. -
setSource
-
getSourceObject
Get expandedsource
. -
setSourceObject
-
search
Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static PaymentIntentSearchResult search(Map<String, Object> params, RequestOptions options) throws StripeExceptionSearch for PaymentIntents you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static PaymentIntentSearchResult search(PaymentIntentSearchParams params) throws StripeException Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static PaymentIntentSearchResult search(PaymentIntentSearchParams params, RequestOptions options) throws StripeException Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
create
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(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates 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
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
Returns a list of PaymentIntents.- Throws:
StripeException
-
list
public static PaymentIntentCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of PaymentIntents.- Throws:
StripeException
-
list
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
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
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(String intent, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves 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(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
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(Map<String, Object> params, RequestOptions options) throws StripeExceptionUpdates 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
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
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
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
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(Map<String, Object> params, RequestOptions options) throws StripeExceptionConfirm 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
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
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
, orprocessing
.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.You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead
- Throws:
StripeException
-
cancel
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
, orprocessing
.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.You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead
- Throws:
StripeException
-
cancel
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
, orprocessing
.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.You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead
- Throws:
StripeException
-
cancel
public PaymentIntent cancel(Map<String, Object> params, RequestOptions options) throws StripeExceptionA PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
, orprocessing
.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.You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead
- Throws:
StripeException
-
cancel
A PaymentIntent object can be canceled when it is in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
, orprocessing
.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.You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead
- 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
,requires_action
, orprocessing
.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.You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead
- Throws:
StripeException
-
capture
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
public PaymentIntent capture(Map<String, Object> params, RequestOptions options) throws StripeExceptionCapture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).
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 a set number of days after they are created (7 by default).
Learn more about separate authorization and capture.
- Throws:
StripeException
-
incrementAuthorization
Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the PaymentIntent’s status must berequires_capture
and incremental_authorization_supported must betrue
.Incremental authorizations attempt to increase the authorized amount on your customer’s card to the new, higher
amount
provided. As with the initial authorization, incremental authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to further increase the authorized amount.If the incremental authorization succeeds, the PaymentIntent object is returned with the updated amount. If the incremental authorization fails, a card_declined error is returned, and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains capturable for the previously authorized amount.
Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. Once captured, a PaymentIntent can no longer be incremented.
Learn more about incremental authorizations.
- Throws:
StripeException
-
incrementAuthorization
public PaymentIntent incrementAuthorization(Map<String, Object> params, RequestOptions options) throws StripeExceptionPerform an incremental authorization on an eligible PaymentIntent. To be eligible, the PaymentIntent’s status must berequires_capture
and incremental_authorization_supported must betrue
.Incremental authorizations attempt to increase the authorized amount on your customer’s card to the new, higher
amount
provided. As with the initial authorization, incremental authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to further increase the authorized amount.If the incremental authorization succeeds, the PaymentIntent object is returned with the updated amount. If the incremental authorization fails, a card_declined error is returned, and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains capturable for the previously authorized amount.
Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. Once captured, a PaymentIntent can no longer be incremented.
Learn more about incremental authorizations.
- Throws:
StripeException
-
incrementAuthorization
public PaymentIntent incrementAuthorization(PaymentIntentIncrementAuthorizationParams params) throws StripeException Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the PaymentIntent’s status must berequires_capture
and incremental_authorization_supported must betrue
.Incremental authorizations attempt to increase the authorized amount on your customer’s card to the new, higher
amount
provided. As with the initial authorization, incremental authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to further increase the authorized amount.If the incremental authorization succeeds, the PaymentIntent object is returned with the updated amount. If the incremental authorization fails, a card_declined error is returned, and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains capturable for the previously authorized amount.
Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. Once captured, a PaymentIntent can no longer be incremented.
Learn more about incremental authorizations.
- Throws:
StripeException
-
incrementAuthorization
public PaymentIntent incrementAuthorization(PaymentIntentIncrementAuthorizationParams params, RequestOptions options) throws StripeException Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the PaymentIntent’s status must berequires_capture
and incremental_authorization_supported must betrue
.Incremental authorizations attempt to increase the authorized amount on your customer’s card to the new, higher
amount
provided. As with the initial authorization, incremental authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to further increase the authorized amount.If the incremental authorization succeeds, the PaymentIntent object is returned with the updated amount. If the incremental authorization fails, a card_declined error is returned, and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains capturable for the previously authorized amount.
Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. Once captured, a PaymentIntent can no longer be incremented.
Learn more about incremental authorizations.
- Throws:
StripeException
-
verifyMicrodeposits
Verifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-
verifyMicrodeposits
Verifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-
verifyMicrodeposits
Verifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-
verifyMicrodeposits
public PaymentIntent verifyMicrodeposits(Map<String, Object> params, RequestOptions options) throws StripeExceptionVerifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-
verifyMicrodeposits
public PaymentIntent verifyMicrodeposits(PaymentIntentVerifyMicrodepositsParams params) throws StripeException Verifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-
verifyMicrodeposits
public PaymentIntent verifyMicrodeposits(PaymentIntentVerifyMicrodepositsParams params, RequestOptions options) throws StripeException Verifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-
applyCustomerBalance
Manually reconcile the remaining amount for a customer_balance PaymentIntent.- Throws:
StripeException
-
applyCustomerBalance
Manually reconcile the remaining amount for a customer_balance PaymentIntent.- Throws:
StripeException
-
applyCustomerBalance
Manually reconcile the remaining amount for a customer_balance PaymentIntent.- Throws:
StripeException
-
applyCustomerBalance
public PaymentIntent applyCustomerBalance(Map<String, Object> params, RequestOptions options) throws StripeExceptionManually reconcile the remaining amount for a customer_balance PaymentIntent.- Throws:
StripeException
-
applyCustomerBalance
public PaymentIntent applyCustomerBalance(PaymentIntentApplyCustomerBalanceParams params) throws StripeException Manually reconcile the remaining amount for a customer_balance PaymentIntent.- Throws:
StripeException
-
applyCustomerBalance
public PaymentIntent applyCustomerBalance(PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) throws StripeException Manually reconcile the remaining amount for a customer_balance PaymentIntent.- Throws:
StripeException
-
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
Amount that can be captured from this PaymentIntent. -
getAmountDetails
-
getAmountReceived
Amount that was collected by this PaymentIntent. -
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. -
getAutomaticPaymentMethods
Settings to configure compatible payment methods from the Stripe Dashboard. -
getCanceledAt
Populated whenstatus
iscanceled
, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. -
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
Controls when the funds will be captured from the customer's account.One of
automatic
, ormanual
. -
getCharges
Charges that were created by this PaymentIntent, if any. -
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, 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
-
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
getLastPaymentError
The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
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
String representing the object's type. Objects of the same type share the same value.Equal to
payment_intent
. -
getPaymentMethodOptions
Payment-method-specific configuration for this PaymentIntent. -
getPaymentMethodTypes
The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. -
getProcessing
If present, this property tells you about the processing state of the payment. -
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
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
Shipping information for this PaymentIntent. -
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
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
Status of this PaymentIntent, one ofrequires_payment_method
,requires_confirmation
,requires_action
,processing
,requires_capture
,canceled
, orsucceeded
. Read more about each PaymentIntent status. -
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
A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts for details. -
setAmount
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
Amount that can be captured from this PaymentIntent. -
setAmountDetails
-
setAmountReceived
Amount that was collected by this PaymentIntent. -
setApplicationFeeAmount
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. -
setAutomaticPaymentMethods
public void setAutomaticPaymentMethods(AutomaticPaymentMethodsPaymentIntent automaticPaymentMethods) Settings to configure compatible payment methods from the Stripe Dashboard. -
setCanceledAt
Populated whenstatus
iscanceled
, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. -
setCancellationReason
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
Controls when the funds will be captured from the customer's account.One of
automatic
, ormanual
. -
setCharges
Charges that were created by this PaymentIntent, if any. -
setClientSecret
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, 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
-
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
setId
Unique identifier for the object. -
setLastPaymentError
The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setMetadata
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
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
String representing the object's type. Objects of the same type share the same value.Equal to
payment_intent
. -
setPaymentMethodOptions
Payment-method-specific configuration for this PaymentIntent. -
setPaymentMethodTypes
The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. -
setProcessing
If present, this property tells you about the processing state of the payment. -
setReceiptEmail
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
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
Shipping information for this PaymentIntent. -
setStatementDescriptor
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
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
Status of this PaymentIntent, one ofrequires_payment_method
,requires_confirmation
,requires_action
,processing
,requires_capture
,canceled
, orsucceeded
. Read more about each PaymentIntent status. -
setTransferData
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
A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts for details. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
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>
-