Class PaymentIntentService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyCustomerBalance
(String intent) Manually reconcile the remaining amount for acustomer_balance
PaymentIntent.applyCustomerBalance
(String intent, RequestOptions options) Manually reconcile the remaining amount for acustomer_balance
PaymentIntent.applyCustomerBalance
(String intent, PaymentIntentApplyCustomerBalanceParams params) Manually reconcile the remaining amount for acustomer_balance
PaymentIntent.applyCustomerBalance
(String intent, PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) Manually reconcile the remaining amount for acustomer_balance
PaymentIntent.You can cancel a PaymentIntent object when it’s in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
or, in rare cases,processing
.cancel
(String intent, RequestOptions options) You can cancel a PaymentIntent object when it’s in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
or, in rare cases,processing
.cancel
(String intent, PaymentIntentCancelParams params) You can cancel a PaymentIntent object when it’s in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
or, in rare cases,processing
.cancel
(String intent, PaymentIntentCancelParams params, RequestOptions options) You can cancel a PaymentIntent object when it’s in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
or, in rare cases,processing
.Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.capture
(String intent, RequestOptions options) Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.capture
(String intent, PaymentIntentCaptureParams params) Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.capture
(String intent, PaymentIntentCaptureParams params, RequestOptions options) Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Confirm that your customer intends to pay with current or provided payment method.confirm
(String intent, RequestOptions options) Confirm that your customer intends to pay with current or provided payment method.confirm
(String intent, PaymentIntentConfirmParams params) Confirm that your customer intends to pay with current or provided payment method.confirm
(String intent, PaymentIntentConfirmParams params, RequestOptions options) Confirm that your customer intends to pay with current or provided payment method.create
(PaymentIntentCreateParams params) Creates a PaymentIntent object.create
(PaymentIntentCreateParams params, RequestOptions options) Creates a PaymentIntent object.incrementAuthorization
(String intent, PaymentIntentIncrementAuthorizationParams params) Perform an incremental authorization on an eligible PaymentIntent.incrementAuthorization
(String intent, PaymentIntentIncrementAuthorizationParams params, RequestOptions options) Perform an incremental authorization on an eligible PaymentIntent.list()
Returns a list of PaymentIntents.list
(RequestOptions options) Returns a list of PaymentIntents.list
(PaymentIntentListParams params) Returns a list of PaymentIntents.list
(PaymentIntentListParams params, RequestOptions options) Returns a list of PaymentIntents.Retrieves the details of a PaymentIntent that has previously been created.retrieve
(String intent, RequestOptions options) Retrieves the details of a PaymentIntent that has previously been created.retrieve
(String intent, PaymentIntentRetrieveParams params) Retrieves the details of a PaymentIntent that has previously been created.retrieve
(String intent, PaymentIntentRetrieveParams params, RequestOptions options) Retrieves the details of a PaymentIntent that has previously been created.search
(PaymentIntentSearchParams params) Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.search
(PaymentIntentSearchParams params, RequestOptions options) Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.Updates properties on a PaymentIntent object without confirming.update
(String intent, RequestOptions options) Updates properties on a PaymentIntent object without confirming.update
(String intent, PaymentIntentUpdateParams params) Updates properties on a PaymentIntent object without confirming.update
(String intent, PaymentIntentUpdateParams params, RequestOptions options) Updates properties on a PaymentIntent object without confirming.verifyMicrodeposits
(String intent) Verifies microdeposits on a PaymentIntent object.verifyMicrodeposits
(String intent, RequestOptions options) Verifies microdeposits on a PaymentIntent object.verifyMicrodeposits
(String intent, PaymentIntentVerifyMicrodepositsParams params) Verifies microdeposits on a PaymentIntent object.verifyMicrodeposits
(String intent, PaymentIntentVerifyMicrodepositsParams params, RequestOptions options) Verifies microdeposits on a PaymentIntent object.Methods inherited from class com.stripe.net.ApiService
getResponseGetter, request, requestStream
-
Constructor Details
-
PaymentIntentService
-
-
Method Details
-
list
Returns a list of PaymentIntents.- Throws:
StripeException
-
list
Returns a list of PaymentIntents.- Throws:
StripeException
-
list
Returns a list of PaymentIntents.- Throws:
StripeException
-
list
public StripeCollection<PaymentIntent> list(PaymentIntentListParams params, RequestOptions options) throws StripeException Returns a list of PaymentIntents.- Throws:
StripeException
-
create
Creates a PaymentIntent object.After the PaymentIntent is created, attach a payment method and confirm to continue the payment. Learn more about the available payment flows with the Payment Intents API.
When you use
confirm=true
during creation, it’s equivalent to creating and confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supplyconfirm=true
.- Throws:
StripeException
-
create
public 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. Learn more about the available payment flows with the Payment Intents API.
When you use
confirm=true
during creation, it’s equivalent to creating and confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supplyconfirm=true
.- Throws:
StripeException
-
retrieve
public PaymentIntent retrieve(String intent, PaymentIntentRetrieveParams params) throws StripeException Retrieves the details of a PaymentIntent that has previously been created.You can retrieve a PaymentIntent client-side using a publishable key when the
client_secret
is in the query string.If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the payment intent object reference for more details.
- Throws:
StripeException
-
retrieve
Retrieves the details of a PaymentIntent that has previously been created.You can retrieve a PaymentIntent client-side using a publishable key when the
client_secret
is in the query string.If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the payment intent object reference for more details.
- Throws:
StripeException
-
retrieve
Retrieves the details of a PaymentIntent that has previously been created.You can retrieve a PaymentIntent client-side using a publishable key when the
client_secret
is in the query string.If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the payment intent object reference for more details.
- Throws:
StripeException
-
retrieve
public PaymentIntent retrieve(String intent, PaymentIntentRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of a PaymentIntent that has previously been created.You can retrieve a PaymentIntent client-side using a publishable key when the
client_secret
is in the query string.If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. 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 might need to confirm the PaymentIntent again. For example, updating the
payment_method
always requires you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties through the confirm API instead.- Throws:
StripeException
-
update
Updates properties on a PaymentIntent object without confirming.Depending on which properties you update, you might need to confirm the PaymentIntent again. For example, updating the
payment_method
always requires you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties through the confirm API instead.- Throws:
StripeException
-
update
Updates properties on a PaymentIntent object without confirming.Depending on which properties you update, you might need to confirm the PaymentIntent again. For example, updating the
payment_method
always requires you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties through the confirm API instead.- Throws:
StripeException
-
update
public PaymentIntent update(String intent, PaymentIntentUpdateParams params, RequestOptions options) throws StripeException Updates properties on a PaymentIntent object without confirming.Depending on which properties you update, you might need to confirm the PaymentIntent again. For example, updating the
payment_method
always requires you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties through the confirm API instead.- Throws:
StripeException
-
search
public StripeSearchResult<PaymentIntent> 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 StripeSearchResult<PaymentIntent> 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
-
applyCustomerBalance
public PaymentIntent applyCustomerBalance(String intent, PaymentIntentApplyCustomerBalanceParams params) throws StripeException Manually reconcile the remaining amount for acustomer_balance
PaymentIntent.- Throws:
StripeException
-
applyCustomerBalance
public PaymentIntent applyCustomerBalance(String intent, RequestOptions options) throws StripeException Manually reconcile the remaining amount for acustomer_balance
PaymentIntent.- Throws:
StripeException
-
applyCustomerBalance
Manually reconcile the remaining amount for acustomer_balance
PaymentIntent.- Throws:
StripeException
-
applyCustomerBalance
public PaymentIntent applyCustomerBalance(String intent, PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) throws StripeException Manually reconcile the remaining amount for acustomer_balance
PaymentIntent.- Throws:
StripeException
-
cancel
You can cancel a PaymentIntent object when it’s in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
or, in rare cases,processing
.After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a
status
ofrequires_capture
, the remainingamount_capturable
is automatically refunded.You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.
- Throws:
StripeException
-
cancel
You can cancel a PaymentIntent object when it’s in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
or, in rare cases,processing
.After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a
status
ofrequires_capture
, the remainingamount_capturable
is automatically refunded.You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.
- Throws:
StripeException
-
cancel
You can cancel a PaymentIntent object when it’s in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
or, in rare cases,processing
.After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a
status
ofrequires_capture
, the remainingamount_capturable
is automatically refunded.You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.
- Throws:
StripeException
-
cancel
public PaymentIntent cancel(String intent, PaymentIntentCancelParams params, RequestOptions options) throws StripeException You can cancel a PaymentIntent object when it’s in one of these statuses:requires_payment_method
,requires_capture
,requires_confirmation
,requires_action
or, in rare cases,processing
.After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a
status
ofrequires_capture
, the remainingamount_capturable
is automatically refunded.You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.
- Throws:
StripeException
-
capture
public PaymentIntent capture(String intent, PaymentIntentCaptureParams params) throws StripeException Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
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 are cancelled a set number of days (7 by default) after their creation.
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 are cancelled a set number of days (7 by default) after their creation.
Learn more about separate authorization and capture.
- Throws:
StripeException
-
capture
public PaymentIntent capture(String intent, PaymentIntentCaptureParams params, RequestOptions options) throws StripeException Capture the funds of an existing uncaptured PaymentIntent when its status isrequires_capture
.Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
Learn more about separate authorization and capture.
- Throws:
StripeException
-
confirm
public PaymentIntent confirm(String intent, 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 therequires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent transitions to therequires_payment_method
status or thecanceled
status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
). If theconfirmation_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 theconfirmation_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.- 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 therequires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent transitions to therequires_payment_method
status or thecanceled
status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
). If theconfirmation_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 theconfirmation_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.- 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 therequires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent transitions to therequires_payment_method
status or thecanceled
status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
). If theconfirmation_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 theconfirmation_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.- Throws:
StripeException
-
confirm
public PaymentIntent confirm(String intent, 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 therequires_action
status and suggest additional actions vianext_action
. If payment fails, the PaymentIntent transitions to therequires_payment_method
status or thecanceled
status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to thesucceeded
status (orrequires_capture
, ifcapture_method
is set tomanual
). If theconfirmation_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 theconfirmation_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.- Throws:
StripeException
-
incrementAuthorization
public PaymentIntent incrementAuthorization(String intent, 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. Similar to the initial authorization, incremental authorizations can 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 returns with the updated amount. If the incremental authorization fails, a card_declined error returns, and no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains capturable for the previously authorized amount.
Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. After it’s captured, a PaymentIntent can no longer be incremented.
Learn more about incremental authorizations.
- Throws:
StripeException
-
incrementAuthorization
public PaymentIntent incrementAuthorization(String intent, 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. Similar to the initial authorization, incremental authorizations can 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 returns with the updated amount. If the incremental authorization fails, a card_declined error returns, and no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains capturable for the previously authorized amount.
Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. After it’s captured, a PaymentIntent can no longer be incremented.
Learn more about incremental authorizations.
- Throws:
StripeException
-
verifyMicrodeposits
public PaymentIntent verifyMicrodeposits(String intent, PaymentIntentVerifyMicrodepositsParams params) throws StripeException Verifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-
verifyMicrodeposits
public PaymentIntent verifyMicrodeposits(String intent, RequestOptions options) throws StripeException Verifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-
verifyMicrodeposits
Verifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-
verifyMicrodeposits
public PaymentIntent verifyMicrodeposits(String intent, PaymentIntentVerifyMicrodepositsParams params, RequestOptions options) throws StripeException Verifies microdeposits on a PaymentIntent object.- Throws:
StripeException
-