Class PaymentIntent

All Implemented Interfaces:
HasId, MetadataStore<PaymentIntent>, StripeActiveObject, StripeObjectInterface

public class PaymentIntent extends ApiResource implements HasId, MetadataStore<PaymentIntent>
A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.

A PaymentIntent transitions through multiple statuses throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge.

Related guide: Payment Intents API

  • Constructor Details

    • PaymentIntent

      public PaymentIntent()
  • Method Details

    • getApplication

      public String getApplication()
      Get ID of expandable application object.
    • setApplication

      public void setApplication(String id)
    • getApplicationObject

      public Application getApplicationObject()
      Get expanded application.
    • setApplicationObject

      public void setApplicationObject(Application expandableObject)
    • getCustomer

      public String getCustomer()
      Get ID of expandable customer object.
    • setCustomer

      public void setCustomer(String id)
    • getCustomerObject

      public Customer getCustomerObject()
      Get expanded customer.
    • setCustomerObject

      public void setCustomerObject(Customer expandableObject)
    • getInvoice

      public String getInvoice()
      Get ID of expandable invoice object.
    • setInvoice

      public void setInvoice(String id)
    • getInvoiceObject

      public Invoice getInvoiceObject()
      Get expanded invoice.
    • setInvoiceObject

      public void setInvoiceObject(Invoice expandableObject)
    • getLatestCharge

      public String getLatestCharge()
      Get ID of expandable latestCharge object.
    • setLatestCharge

      public void setLatestCharge(String id)
    • getLatestChargeObject

      public Charge getLatestChargeObject()
      Get expanded latestCharge.
    • setLatestChargeObject

      public void setLatestChargeObject(Charge expandableObject)
    • getOnBehalfOf

      public String getOnBehalfOf()
      Get ID of expandable onBehalfOf object.
    • setOnBehalfOf

      public void setOnBehalfOf(String id)
    • getOnBehalfOfObject

      public Account getOnBehalfOfObject()
      Get expanded onBehalfOf.
    • setOnBehalfOfObject

      public void setOnBehalfOfObject(Account expandableObject)
    • getPaymentMethod

      public String getPaymentMethod()
      Get ID of expandable paymentMethod object.
    • setPaymentMethod

      public void setPaymentMethod(String id)
    • getPaymentMethodObject

      public PaymentMethod getPaymentMethodObject()
      Get expanded paymentMethod.
    • setPaymentMethodObject

      public void setPaymentMethodObject(PaymentMethod expandableObject)
    • getReview

      public String getReview()
      Get ID of expandable review object.
    • setReview

      public void setReview(String id)
    • getReviewObject

      public Review getReviewObject()
      Get expanded review.
    • setReviewObject

      public void setReviewObject(Review expandableObject)
    • getSource

      public String getSource()
      Get ID of expandable source object.
    • setSource

      public void setSource(String id)
    • getSourceObject

      public PaymentSource getSourceObject()
      Get expanded source.
    • setSourceObject

      public void setSourceObject(PaymentSource expandableObject)
    • applyCustomerBalance

      public PaymentIntent applyCustomerBalance() throws StripeException
      Manually reconcile the remaining amount for a customer_balance PaymentIntent.
      Throws:
      StripeException
    • applyCustomerBalance

      public PaymentIntent applyCustomerBalance(RequestOptions options) throws StripeException
      Manually reconcile the remaining amount for a customer_balance PaymentIntent.
      Throws:
      StripeException
    • applyCustomerBalance

      public PaymentIntent applyCustomerBalance(Map<String,Object> params) throws StripeException
      Manually reconcile the remaining amount for a customer_balance PaymentIntent.
      Throws:
      StripeException
    • applyCustomerBalance

      public PaymentIntent applyCustomerBalance(Map<String,Object> params, RequestOptions options) throws StripeException
      Manually 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
    • cancel

      public PaymentIntent cancel() 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 of requires_capture, the remaining amount_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(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 of requires_capture, the remaining amount_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(Map<String,Object> params) 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 of requires_capture, the remaining amount_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(Map<String,Object> 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 of requires_capture, the remaining amount_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 of requires_capture, the remaining amount_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(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 of requires_capture, the remaining amount_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() throws StripeException
      Capture the funds of an existing uncaptured PaymentIntent when its status is requires_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(RequestOptions options) throws StripeException
      Capture the funds of an existing uncaptured PaymentIntent when its status is requires_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(Map<String,Object> params) throws StripeException
      Capture the funds of an existing uncaptured PaymentIntent when its status is requires_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(Map<String,Object> params, RequestOptions options) throws StripeException
      Capture the funds of an existing uncaptured PaymentIntent when its status is requires_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 is requires_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(PaymentIntentCaptureParams params, RequestOptions options) throws StripeException
      Capture the funds of an existing uncaptured PaymentIntent when its status is requires_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() 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 via next_action. If payment fails, the PaymentIntent transitions to the requires_payment_method status or the canceled status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to the succeeded status (or requires_capture, if capture_method is set to manual). If the confirmation_method is automatic, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. After next_actions are handled by the client, no additional confirmation is required to complete the payment. If the confirmation_method is manual, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the requires_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(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 via next_action. If payment fails, the PaymentIntent transitions to the requires_payment_method status or the canceled status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to the succeeded status (or requires_capture, if capture_method is set to manual). If the confirmation_method is automatic, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. After next_actions are handled by the client, no additional confirmation is required to complete the payment. If the confirmation_method is manual, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the requires_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(Map<String,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 via next_action. If payment fails, the PaymentIntent transitions to the requires_payment_method status or the canceled status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to the succeeded status (or requires_capture, if capture_method is set to manual). If the confirmation_method is automatic, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. After next_actions are handled by the client, no additional confirmation is required to complete the payment. If the confirmation_method is manual, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the requires_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(Map<String,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 via next_action. If payment fails, the PaymentIntent transitions to the requires_payment_method status or the canceled status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to the succeeded status (or requires_capture, if capture_method is set to manual). If the confirmation_method is automatic, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. After next_actions are handled by the client, no additional confirmation is required to complete the payment. If the confirmation_method is manual, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the requires_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 the requires_action status and suggest additional actions via next_action. If payment fails, the PaymentIntent transitions to the requires_payment_method status or the canceled status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to the succeeded status (or requires_capture, if capture_method is set to manual). If the confirmation_method is automatic, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. After next_actions are handled by the client, no additional confirmation is required to complete the payment. If the confirmation_method is manual, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the requires_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(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 via next_action. If payment fails, the PaymentIntent transitions to the requires_payment_method status or the canceled status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to the succeeded status (or requires_capture, if capture_method is set to manual). If the confirmation_method is automatic, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. After next_actions are handled by the client, no additional confirmation is required to complete the payment. If the confirmation_method is manual, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the requires_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
    • create

      public static PaymentIntent create(Map<String,Object> params) 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 supply confirm=true.

      Throws:
      StripeException
    • create

      public static PaymentIntent create(Map<String,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. 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 supply confirm=true.

      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. 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 supply confirm=true.

      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. 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 supply confirm=true.

      Throws:
      StripeException
    • incrementAuthorization

      public PaymentIntent incrementAuthorization(Map<String,Object> params) throws StripeException
      Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the PaymentIntent’s status must be requires_capture and incremental_authorization_supported must be true.

      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(Map<String,Object> params, RequestOptions options) throws StripeException
      Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the PaymentIntent’s status must be requires_capture and incremental_authorization_supported must be true.

      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(PaymentIntentIncrementAuthorizationParams params) throws StripeException
      Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the PaymentIntent’s status must be requires_capture and incremental_authorization_supported must be true.

      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(PaymentIntentIncrementAuthorizationParams params, RequestOptions options) throws StripeException
      Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the PaymentIntent’s status must be requires_capture and incremental_authorization_supported must be true.

      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
    • list

      public static PaymentIntentCollection list(Map<String,Object> params) throws StripeException
      Returns a list of PaymentIntents.
      Throws:
      StripeException
    • list

      public static PaymentIntentCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns 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

      public static PaymentIntent retrieve(String intent) 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

      public static PaymentIntent retrieve(String intent, 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
    • retrieve

      public static PaymentIntent retrieve(String intent, Map<String,Object> 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
    • retrieve

      public static 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
    • search

      public static PaymentIntentSearchResult search(Map<String,Object> 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(Map<String,Object> 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
    • 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

      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
    • update

      public PaymentIntent update(Map<String,Object> params) 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.

      Specified by:
      update in interface MetadataStore<PaymentIntent>
      Throws:
      StripeException
    • update

      public PaymentIntent update(Map<String,Object> 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.

      Specified by:
      update in interface MetadataStore<PaymentIntent>
      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(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
    • verifyMicrodeposits

      public PaymentIntent verifyMicrodeposits() throws StripeException
      Verifies microdeposits on a PaymentIntent object.
      Throws:
      StripeException
    • verifyMicrodeposits

      public PaymentIntent verifyMicrodeposits(RequestOptions options) throws StripeException
      Verifies microdeposits on a PaymentIntent object.
      Throws:
      StripeException
    • verifyMicrodeposits

      public PaymentIntent verifyMicrodeposits(Map<String,Object> params) throws StripeException
      Verifies microdeposits on a PaymentIntent object.
      Throws:
      StripeException
    • verifyMicrodeposits

      public PaymentIntent verifyMicrodeposits(Map<String,Object> params, RequestOptions options) throws StripeException
      Verifies 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
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getAmount

      public 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 Long getAmountCapturable()
      Amount that can be captured from this PaymentIntent.
    • getAmountDetails

      public PaymentIntent.AmountDetails getAmountDetails()
    • getAmountReceived

      public Long getAmountReceived()
      Amount that this PaymentIntent collects.
    • getApplicationFeeAmount

      public 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.
    • getAutomaticPaymentMethods

      public PaymentIntent.AutomaticPaymentMethods getAutomaticPaymentMethods()
      Settings to configure compatible payment methods from the Stripe Dashboard.
    • getCanceledAt

      public Long getCanceledAt()
      Populated when status is canceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
    • getCancellationReason

      public String getCancellationReason()
      Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by Stripe internally (failed_invoice, void_invoice, or automatic).

      One of abandoned, automatic, duplicate, failed_invoice, fraudulent, requested_by_customer, or void_invoice.

    • getCaptureMethod

      public String getCaptureMethod()
      Controls when the funds will be captured from the customer's account.

      One of automatic, automatic_async, or manual.

    • getClientSecret

      public 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, 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 String getConfirmationMethod()
      Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.

      One of automatic, or manual.

    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getDescription

      public 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 Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false 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 String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to payment_intent.

    • getPaymentMethodConfigurationDetails

      public PaymentIntent.PaymentMethodConfigurationDetails getPaymentMethodConfigurationDetails()
      Information about the payment method configuration used for this PaymentIntent.
    • getPaymentMethodOptions

      public PaymentIntent.PaymentMethodOptions getPaymentMethodOptions()
      Payment-method-specific configuration for this PaymentIntent.
    • getPaymentMethodTypes

      public List<String> getPaymentMethodTypes()
      The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
    • getProcessing

      public PaymentIntent.Processing getProcessing()
      If present, this property tells you about the processing state of the payment.
    • getReceiptEmail

      public String getReceiptEmail()
      Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
    • getSetupFutureUsage

      public String getSetupFutureUsage()
      Indicates that you intend to make future payments with this PaymentIntent's payment method.

      If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still attach the payment method to a Customer after the transaction completes.

      If the payment method is card_present and isn't a digital wallet, Stripe creates and attaches a generated_card payment method representing the card to the Customer instead.

      When processing card payments, Stripe uses setup_future_usage to help you comply with regional legislation and network rules, such as SCA.

      One of off_session, or on_session.

    • getShipping

      public ShippingDetails getShipping()
      Shipping information for this PaymentIntent.
    • getStatementDescriptor

      public String getStatementDescriptor()
      Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.

      Setting this value for a card charge returns an error. For card charges, set the statement_descriptor_suffix instead.

    • getStatementDescriptorSuffix

      public String getStatementDescriptorSuffix()
      Provides information about a card charge. Concatenated to the account's statement descriptor prefix to form the complete statement descriptor that appears on the customer's statement.
    • getStatus

      public String getStatus()
      Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status.
    • getTransferData

      public PaymentIntent.TransferData getTransferData()
      The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for connected accounts.
    • getTransferGroup

      public String getTransferGroup()
      A string that identifies the resulting payment as part of a group. Learn more about the use case for connected accounts.
    • setAmount

      public void setAmount(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(Long amountCapturable)
      Amount that can be captured from this PaymentIntent.
    • setAmountDetails

      public void setAmountDetails(PaymentIntent.AmountDetails amountDetails)
    • setAmountReceived

      public void setAmountReceived(Long amountReceived)
      Amount that this PaymentIntent collects.
    • setApplicationFeeAmount

      public 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. 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(PaymentIntent.AutomaticPaymentMethods automaticPaymentMethods)
      Settings to configure compatible payment methods from the Stripe Dashboard.
    • setCanceledAt

      public void setCanceledAt(Long canceledAt)
      Populated when status is canceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
    • setCancellationReason

      public void setCancellationReason(String cancellationReason)
      Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by Stripe internally (failed_invoice, void_invoice, or automatic).

      One of abandoned, automatic, duplicate, failed_invoice, fraudulent, requested_by_customer, or void_invoice.

    • setCaptureMethod

      public void setCaptureMethod(String captureMethod)
      Controls when the funds will be captured from the customer's account.

      One of automatic, automatic_async, or manual.

    • setClientSecret

      public void setClientSecret(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, 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(String confirmationMethod)
      Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.

      One of automatic, or manual.

    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setDescription

      public void setDescription(String description)
      An arbitrary string attached to the object. Often useful for displaying to users.
    • setId

      public void setId(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(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setMetadata

      public void setMetadata(Map<String,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. Learn more about storing information in metadata.
    • 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(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to payment_intent.

    • setPaymentMethodConfigurationDetails

      public void setPaymentMethodConfigurationDetails(PaymentIntent.PaymentMethodConfigurationDetails paymentMethodConfigurationDetails)
      Information about the payment method configuration used for this PaymentIntent.
    • setPaymentMethodOptions

      public void setPaymentMethodOptions(PaymentIntent.PaymentMethodOptions paymentMethodOptions)
      Payment-method-specific configuration for this PaymentIntent.
    • setPaymentMethodTypes

      public void setPaymentMethodTypes(List<String> paymentMethodTypes)
      The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
    • setProcessing

      public void setProcessing(PaymentIntent.Processing processing)
      If present, this property tells you about the processing state of the payment.
    • setReceiptEmail

      public void setReceiptEmail(String receiptEmail)
      Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
    • setSetupFutureUsage

      public void setSetupFutureUsage(String setupFutureUsage)
      Indicates that you intend to make future payments with this PaymentIntent's payment method.

      If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still attach the payment method to a Customer after the transaction completes.

      If the payment method is card_present and isn't a digital wallet, Stripe creates and attaches a generated_card payment method representing the card to the Customer instead.

      When processing card payments, Stripe uses setup_future_usage to help you comply with regional legislation and network rules, such as SCA.

      One of off_session, or on_session.

    • setShipping

      public void setShipping(ShippingDetails shipping)
      Shipping information for this PaymentIntent.
    • setStatementDescriptor

      public void setStatementDescriptor(String statementDescriptor)
      Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.

      Setting this value for a card charge returns an error. For card charges, set the statement_descriptor_suffix instead.

    • setStatementDescriptorSuffix

      public void setStatementDescriptorSuffix(String statementDescriptorSuffix)
      Provides information about a card charge. Concatenated to the account's statement descriptor prefix to form the complete statement descriptor that appears on the customer's statement.
    • setStatus

      public void setStatus(String status)
      Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status.
    • setTransferData

      public void setTransferData(PaymentIntent.TransferData transferData)
      The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for connected accounts.
    • setTransferGroup

      public void setTransferGroup(String transferGroup)
      A string that identifies the resulting payment as part of a group. Learn more about the use case for connected accounts.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId
    • getMetadata

      public Map<String,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. Learn more about storing information in metadata.
      Specified by:
      getMetadata in interface MetadataStore<PaymentIntent>