public class PaymentIntent extends ApiResource implements HasId, MetadataStore<PaymentIntent>
Modifier and Type | Class and Description |
---|---|
static class |
PaymentIntent.NextAction |
static class |
PaymentIntent.NextActionRedirectToUrl |
static class |
PaymentIntent.PaymentMethodOptions |
static class |
PaymentIntent.TransferData
Type of installment plan, one of
fixed_count . |
ApiResource.RequestMethod
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
PaymentIntent() |
Modifier and Type | Method and Description |
---|---|
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 . |
PaymentIntent |
cancel(java.util.Map<java.lang.String,java.lang.Object> params)
A PaymentIntent object can be canceled when it is in one of these statuses:
requires_payment_method , requires_capture , requires_confirmation
, requires_action . |
PaymentIntent |
cancel(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
A PaymentIntent object can be canceled when it is in one of these statuses:
requires_payment_method , requires_capture , requires_confirmation
, requires_action . |
PaymentIntent |
cancel(PaymentIntentCancelParams params)
A PaymentIntent object can be canceled when it is in one of these statuses:
requires_payment_method , requires_capture , requires_confirmation
, requires_action . |
PaymentIntent |
cancel(PaymentIntentCancelParams params,
RequestOptions options)
A PaymentIntent object can be canceled when it is in one of these statuses:
requires_payment_method , requires_capture , requires_confirmation
, requires_action . |
PaymentIntent |
cancel(RequestOptions options)
A PaymentIntent object can be canceled when it is in one of these statuses:
requires_payment_method , requires_capture , requires_confirmation
, requires_action . |
protected boolean |
canEqual(java.lang.Object other) |
PaymentIntent |
capture()
Capture the funds of an existing uncaptured PaymentIntent when its status is
requires_capture . |
PaymentIntent |
capture(java.util.Map<java.lang.String,java.lang.Object> params)
Capture the funds of an existing uncaptured PaymentIntent when its status is
requires_capture . |
PaymentIntent |
capture(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Capture the funds of an existing uncaptured PaymentIntent when its status is
requires_capture . |
PaymentIntent |
capture(PaymentIntentCaptureParams params)
Capture the funds of an existing uncaptured PaymentIntent when its status is
requires_capture . |
PaymentIntent |
capture(PaymentIntentCaptureParams params,
RequestOptions options)
Capture the funds of an existing uncaptured PaymentIntent when its status is
requires_capture . |
PaymentIntent |
capture(RequestOptions options)
Capture the funds of an existing uncaptured PaymentIntent when its status is
requires_capture . |
PaymentIntent |
confirm()
Confirm that your customer intends to pay with current or provided payment method.
|
PaymentIntent |
confirm(java.util.Map<java.lang.String,java.lang.Object> params)
Confirm that your customer intends to pay with current or provided payment method.
|
PaymentIntent |
confirm(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Confirm that your customer intends to pay with current or provided payment method.
|
PaymentIntent |
confirm(PaymentIntentConfirmParams params)
Confirm that your customer intends to pay with current or provided payment method.
|
PaymentIntent |
confirm(PaymentIntentConfirmParams params,
RequestOptions options)
Confirm that your customer intends to pay with current or provided payment method.
|
PaymentIntent |
confirm(RequestOptions options)
Confirm that your customer intends to pay with current or provided payment method.
|
static PaymentIntent |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a PaymentIntent object.
|
static PaymentIntent |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Creates a PaymentIntent object.
|
static PaymentIntent |
create(PaymentIntentCreateParams params)
Creates a PaymentIntent object.
|
static PaymentIntent |
create(PaymentIntentCreateParams params,
RequestOptions options)
Creates a PaymentIntent object.
|
boolean |
equals(java.lang.Object o) |
java.lang.Long |
getAmount()
Amount intended to be collected by this PaymentIntent.
|
java.lang.Long |
getAmountCapturable()
Amount that can be captured from this PaymentIntent.
|
java.lang.Long |
getAmountReceived()
Amount that was collected by this PaymentIntent.
|
java.lang.String |
getApplication()
Get ID of expandable
application object. |
java.lang.Long |
getApplicationFeeAmount()
The amount of the application fee (if any) for the resulting payment.
|
Application |
getApplicationObject()
Get expanded
application . |
java.lang.Long |
getCanceledAt()
Populated when
status is canceled , this is the time at which the PaymentIntent
was canceled. |
java.lang.String |
getCancellationReason()
Reason for cancellation of this PaymentIntent, either user-provided (
duplicate , fraudulent , requested_by_customer , or abandoned ) or generated by Stripe
internally (failed_invoice , void_invoice , or automatic ). |
java.lang.String |
getCaptureMethod()
Controls when the funds will be captured from the customer's account.
|
ChargeCollection |
getCharges()
Charges that were created by this PaymentIntent, if any.
|
java.lang.String |
getClientSecret()
The client secret of this PaymentIntent.
|
java.lang.String |
getConfirmationMethod() |
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.String |
getCurrency()
Three-letter ISO currency code,
in lowercase.
|
java.lang.String |
getCustomer()
Get ID of expandable
customer object. |
Customer |
getCustomerObject()
Get expanded
customer . |
java.lang.String |
getDescription()
An arbitrary string attached to the object.
|
java.lang.String |
getId()
Unique identifier for the object.
|
java.lang.String |
getInvoice()
Get ID of expandable
invoice object. |
Invoice |
getInvoiceObject()
Get expanded
invoice . |
StripeError |
getLastPaymentError()
The payment error encountered in the previous PaymentIntent confirmation.
|
java.lang.Boolean |
getLivemode()
Has the value
true if the object exists in live mode or the value false if the
object exists in test mode. |
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Set of key-value pairs that you can attach to an object.
|
PaymentIntent.NextAction |
getNextAction()
If present, this property tells you what actions you need to take in order for your customer to
fulfill a payment using the provided source.
|
java.lang.String |
getObject()
String representing the object's type.
|
java.lang.String |
getOnBehalfOf()
Get ID of expandable
onBehalfOf object. |
Account |
getOnBehalfOfObject()
Get expanded
onBehalfOf . |
java.lang.String |
getPaymentMethod()
Get ID of expandable
paymentMethod object. |
PaymentMethod |
getPaymentMethodObject()
Get expanded
paymentMethod . |
PaymentIntent.PaymentMethodOptions |
getPaymentMethodOptions()
Payment-method-specific configuration for this PaymentIntent.
|
java.util.List<java.lang.String> |
getPaymentMethodTypes()
The list of payment method types (e.g.
|
java.lang.String |
getReceiptEmail()
Email address that the receipt for the resulting payment will be sent to.
|
java.lang.String |
getReview()
Get ID of expandable
review object. |
Review |
getReviewObject()
Get expanded
review . |
java.lang.String |
getSetupFutureUsage()
Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
ShippingDetails |
getShipping()
Shipping information for this PaymentIntent.
|
java.lang.String |
getSource()
Get ID of expandable
source object. |
PaymentSource |
getSourceObject()
Get expanded
source . |
java.lang.String |
getStatementDescriptor()
For non-card charges, you can use this value as the complete description that appears on your
customers’ statements.
|
java.lang.String |
getStatementDescriptorSuffix()
Provides information about a card payment that customers see on their statements.
|
java.lang.String |
getStatus()
Status of this PaymentIntent, one of
requires_payment_method , requires_confirmation , requires_action , processing , requires_capture ,
canceled , or succeeded . |
PaymentIntent.TransferData |
getTransferData()
The data with which to automatically create a Transfer when the payment is finalized.
|
java.lang.String |
getTransferGroup()
A string that identifies the resulting payment as part of a group.
|
int |
hashCode() |
static PaymentIntentCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of PaymentIntents.
|
static PaymentIntentCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of PaymentIntents.
|
static PaymentIntentCollection |
list(PaymentIntentListParams params)
Returns a list of PaymentIntents.
|
static PaymentIntentCollection |
list(PaymentIntentListParams params,
RequestOptions options)
Returns a list of PaymentIntents.
|
static PaymentIntent |
retrieve(java.lang.String intent)
Retrieves the details of a PaymentIntent that has previously been created.
|
static PaymentIntent |
retrieve(java.lang.String intent,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the details of a PaymentIntent that has previously been created.
|
static PaymentIntent |
retrieve(java.lang.String intent,
PaymentIntentRetrieveParams params,
RequestOptions options)
Retrieves the details of a PaymentIntent that has previously been created.
|
static PaymentIntent |
retrieve(java.lang.String intent,
RequestOptions options)
Retrieves the details of a PaymentIntent that has previously been created.
|
void |
setAmount(java.lang.Long amount)
Amount intended to be collected by this PaymentIntent.
|
void |
setAmountCapturable(java.lang.Long amountCapturable)
Amount that can be captured from this PaymentIntent.
|
void |
setAmountReceived(java.lang.Long amountReceived)
Amount that was collected by this PaymentIntent.
|
void |
setApplication(java.lang.String id) |
void |
setApplicationFeeAmount(java.lang.Long applicationFeeAmount)
The amount of the application fee (if any) for the resulting payment.
|
void |
setApplicationObject(Application expandableObject) |
void |
setCanceledAt(java.lang.Long canceledAt)
Populated when
status is canceled , this is the time at which the PaymentIntent
was canceled. |
void |
setCancellationReason(java.lang.String cancellationReason)
Reason for cancellation of this PaymentIntent, either user-provided (
duplicate , fraudulent , requested_by_customer , or abandoned ) or generated by Stripe
internally (failed_invoice , void_invoice , or automatic ). |
void |
setCaptureMethod(java.lang.String captureMethod)
Controls when the funds will be captured from the customer's account.
|
void |
setCharges(ChargeCollection charges)
Charges that were created by this PaymentIntent, if any.
|
void |
setClientSecret(java.lang.String clientSecret)
The client secret of this PaymentIntent.
|
void |
setConfirmationMethod(java.lang.String confirmationMethod) |
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setCurrency(java.lang.String currency)
Three-letter ISO currency code,
in lowercase.
|
void |
setCustomer(java.lang.String id) |
void |
setCustomerObject(Customer expandableObject) |
void |
setDescription(java.lang.String description)
An arbitrary string attached to the object.
|
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setInvoice(java.lang.String id) |
void |
setInvoiceObject(Invoice expandableObject) |
void |
setLastPaymentError(StripeError lastPaymentError)
The payment error encountered in the previous PaymentIntent confirmation.
|
void |
setLivemode(java.lang.Boolean livemode)
Has the value
true if the object exists in live mode or the value false if the
object exists in test mode. |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.
|
void |
setNextAction(PaymentIntent.NextAction nextAction)
If present, this property tells you what actions you need to take in order for your customer to
fulfill a payment using the provided source.
|
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setOnBehalfOf(java.lang.String id) |
void |
setOnBehalfOfObject(Account expandableObject) |
void |
setPaymentMethod(java.lang.String id) |
void |
setPaymentMethodObject(PaymentMethod expandableObject) |
void |
setPaymentMethodOptions(PaymentIntent.PaymentMethodOptions paymentMethodOptions)
Payment-method-specific configuration for this PaymentIntent.
|
void |
setPaymentMethodTypes(java.util.List<java.lang.String> paymentMethodTypes)
The list of payment method types (e.g.
|
void |
setReceiptEmail(java.lang.String receiptEmail)
Email address that the receipt for the resulting payment will be sent to.
|
void |
setReview(java.lang.String id) |
void |
setReviewObject(Review expandableObject) |
void |
setSetupFutureUsage(java.lang.String setupFutureUsage)
Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
void |
setShipping(ShippingDetails shipping)
Shipping information for this PaymentIntent.
|
void |
setSource(java.lang.String id) |
void |
setSourceObject(PaymentSource expandableObject) |
void |
setStatementDescriptor(java.lang.String statementDescriptor)
For non-card charges, you can use this value as the complete description that appears on your
customers’ statements.
|
void |
setStatementDescriptorSuffix(java.lang.String statementDescriptorSuffix)
Provides information about a card payment that customers see on their statements.
|
void |
setStatus(java.lang.String status)
Status of this PaymentIntent, one of
requires_payment_method , requires_confirmation , requires_action , processing , requires_capture ,
canceled , or succeeded . |
void |
setTransferData(PaymentIntent.TransferData transferData)
The data with which to automatically create a Transfer when the payment is finalized.
|
void |
setTransferGroup(java.lang.String transferGroup)
A string that identifies the resulting payment as part of a group.
|
PaymentIntent |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates properties on a PaymentIntent object without confirming.
|
PaymentIntent |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates properties on a PaymentIntent object without confirming.
|
PaymentIntent |
update(PaymentIntentUpdateParams params)
Updates properties on a PaymentIntent object without confirming.
|
PaymentIntent |
update(PaymentIntentUpdateParams params,
RequestOptions options)
Updates properties on a PaymentIntent object without confirming.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public java.lang.String getApplication()
application
object.public void setApplication(java.lang.String id)
public Application getApplicationObject()
application
.public void setApplicationObject(Application expandableObject)
public java.lang.String getCustomer()
customer
object.public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
customer
.public void setCustomerObject(Customer expandableObject)
public java.lang.String getInvoice()
invoice
object.public void setInvoice(java.lang.String id)
public Invoice getInvoiceObject()
invoice
.public void setInvoiceObject(Invoice expandableObject)
public java.lang.String getOnBehalfOf()
onBehalfOf
object.public void setOnBehalfOf(java.lang.String id)
public Account getOnBehalfOfObject()
onBehalfOf
.public void setOnBehalfOfObject(Account expandableObject)
public java.lang.String getPaymentMethod()
paymentMethod
object.public void setPaymentMethod(java.lang.String id)
public PaymentMethod getPaymentMethodObject()
paymentMethod
.public void setPaymentMethodObject(PaymentMethod expandableObject)
public java.lang.String getReview()
review
object.public void setReview(java.lang.String id)
public Review getReviewObject()
review
.public void setReviewObject(Review expandableObject)
public java.lang.String getSource()
source
object.public void setSource(java.lang.String id)
public PaymentSource getSourceObject()
source
.public void setSourceObject(PaymentSource expandableObject)
public static PaymentIntent create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
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 when
confirm=true
is supplied.
StripeException
public static PaymentIntent create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
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 when
confirm=true
is supplied.
StripeException
public static PaymentIntent create(PaymentIntentCreateParams params) throws StripeException
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 when
confirm=true
is supplied.
StripeException
public static PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options) throws StripeException
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 when
confirm=true
is supplied.
StripeException
public static PaymentIntentCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static PaymentIntentCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static PaymentIntentCollection list(PaymentIntentListParams params) throws StripeException
StripeException
public static PaymentIntentCollection list(PaymentIntentListParams params, RequestOptions options) throws StripeException
StripeException
public static PaymentIntent retrieve(java.lang.String intent) throws StripeException
Client-side retrieval using a publishable key is allowed when the client_secret
is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.
StripeException
public static PaymentIntent retrieve(java.lang.String intent, RequestOptions options) throws StripeException
Client-side retrieval using a publishable key is allowed when the client_secret
is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.
StripeException
public static PaymentIntent retrieve(java.lang.String intent, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Client-side retrieval using a publishable key is allowed when the client_secret
is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.
StripeException
public static PaymentIntent retrieve(java.lang.String intent, PaymentIntentRetrieveParams params, RequestOptions options) throws StripeException
Client-side retrieval using a publishable key is allowed when the client_secret
is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.
StripeException
public PaymentIntent update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
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.
update
in interface MetadataStore<PaymentIntent>
StripeException
public PaymentIntent update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
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.
update
in interface MetadataStore<PaymentIntent>
StripeException
public PaymentIntent update(PaymentIntentUpdateParams params) throws StripeException
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.
StripeException
public PaymentIntent update(PaymentIntentUpdateParams params, RequestOptions options) throws StripeException
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.
StripeException
public PaymentIntent confirm() throws StripeException
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 will transition to the
requires_payment_method
status. 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_action
s 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. Read the expanded documentation
to learn more about manual confirmation.
StripeException
public PaymentIntent confirm(RequestOptions options) throws StripeException
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 will transition to the
requires_payment_method
status. 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_action
s 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. Read the expanded documentation
to learn more about manual confirmation.
StripeException
public PaymentIntent confirm(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
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 will transition to the
requires_payment_method
status. 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_action
s 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. Read the expanded documentation
to learn more about manual confirmation.
StripeException
public PaymentIntent confirm(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
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 will transition to the
requires_payment_method
status. 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_action
s 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. Read the expanded documentation
to learn more about manual confirmation.
StripeException
public PaymentIntent confirm(PaymentIntentConfirmParams params) throws StripeException
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 will transition to the
requires_payment_method
status. 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_action
s 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. Read the expanded documentation
to learn more about manual confirmation.
StripeException
public PaymentIntent confirm(PaymentIntentConfirmParams params, RequestOptions options) throws StripeException
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 will transition to the
requires_payment_method
status. 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_action
s 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. Read the expanded documentation
to learn more about manual confirmation.
StripeException
public PaymentIntent cancel() throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, no additional charges will be made by the PaymentIntent and any operations on
the PaymentIntent will fail with an error. For PaymentIntents with
status='requires_capture'
, the remaining amount_capturable
will
automatically be refunded.
StripeException
public PaymentIntent cancel(RequestOptions options) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, no additional charges will be made by the PaymentIntent and any operations on
the PaymentIntent will fail with an error. For PaymentIntents with
status='requires_capture'
, the remaining amount_capturable
will
automatically be refunded.
StripeException
public PaymentIntent cancel(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, no additional charges will be made by the PaymentIntent and any operations on
the PaymentIntent will fail with an error. For PaymentIntents with
status='requires_capture'
, the remaining amount_capturable
will
automatically be refunded.
StripeException
public PaymentIntent cancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, 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 remaining amount_capturable
will
automatically be refunded.
StripeException
public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, no additional charges will be made by the PaymentIntent and any operations on
the PaymentIntent will fail with an error. For PaymentIntents with
status='requires_capture'
, the remaining amount_capturable
will
automatically be refunded.
StripeException
public PaymentIntent cancel(PaymentIntentCancelParams params, RequestOptions options) throws StripeException
requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
.
Once canceled, no additional charges will be made by the PaymentIntent and any operations on
the PaymentIntent will fail with an error. For PaymentIntents with
status='requires_capture'
, the remaining amount_capturable
will
automatically be refunded.
StripeException
public PaymentIntent capture() throws StripeException
requires_capture
.
Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
StripeException
public PaymentIntent capture(RequestOptions options) throws StripeException
requires_capture
.
Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
StripeException
public PaymentIntent capture(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
requires_capture
.
Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
StripeException
public PaymentIntent capture(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
requires_capture
.
Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
StripeException
public PaymentIntent capture(PaymentIntentCaptureParams params) throws StripeException
requires_capture
.
Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
StripeException
public PaymentIntent capture(PaymentIntentCaptureParams params, RequestOptions options) throws StripeException
requires_capture
.
Uncaptured PaymentIntents will be canceled exactly seven days after they are created.
Learn more about separate authorization and capture.
StripeException
public java.lang.Long getAmount()
public java.lang.Long getAmountCapturable()
public java.lang.Long getAmountReceived()
public java.lang.Long getApplicationFeeAmount()
public java.lang.Long getCanceledAt()
status
is canceled
, this is the time at which the PaymentIntent
was canceled. Measured in seconds since the Unix epoch.public java.lang.String getCancellationReason()
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
.
public java.lang.String getCaptureMethod()
One of automatic
, or manual
.
public ChargeCollection getCharges()
public java.lang.String getClientSecret()
The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs to accept a
payment and learn about how client_secret
should be handled.
public java.lang.String getConfirmationMethod()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.String getDescription()
public StripeError getLastPaymentError()
public java.lang.Boolean getLivemode()
true
if the object exists in live mode or the value false
if the
object exists in test mode.public PaymentIntent.NextAction getNextAction()
public java.lang.String getObject()
Equal to payment_intent
.
public PaymentIntent.PaymentMethodOptions getPaymentMethodOptions()
public java.util.List<java.lang.String> getPaymentMethodTypes()
public java.lang.String getReceiptEmail()
public java.lang.String getSetupFutureUsage()
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
, or on_session
.
public ShippingDetails getShipping()
public java.lang.String getStatementDescriptor()
public java.lang.String getStatementDescriptorSuffix()
public java.lang.String getStatus()
requires_payment_method
, requires_confirmation
, requires_action
, processing
, requires_capture
,
canceled
, or succeeded
. Read more about each PaymentIntent status.public PaymentIntent.TransferData getTransferData()
public java.lang.String getTransferGroup()
public void setAmount(java.lang.Long amount)
public void setAmountCapturable(java.lang.Long amountCapturable)
public void setAmountReceived(java.lang.Long amountReceived)
public void setApplicationFeeAmount(java.lang.Long applicationFeeAmount)
public void setCanceledAt(java.lang.Long canceledAt)
status
is canceled
, this is the time at which the PaymentIntent
was canceled. Measured in seconds since the Unix epoch.public void setCancellationReason(java.lang.String cancellationReason)
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
.
public void setCaptureMethod(java.lang.String captureMethod)
One of automatic
, or manual
.
public void setCharges(ChargeCollection charges)
public void setClientSecret(java.lang.String clientSecret)
The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs to accept a
payment and learn about how client_secret
should be handled.
public void setConfirmationMethod(java.lang.String confirmationMethod)
public void setCreated(java.lang.Long created)
public void setCurrency(java.lang.String currency)
public void setDescription(java.lang.String description)
public void setId(java.lang.String id)
public void setLastPaymentError(StripeError lastPaymentError)
public void setLivemode(java.lang.Boolean livemode)
true
if the object exists in live mode or the value false
if the
object exists in test mode.public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setNextAction(PaymentIntent.NextAction nextAction)
public void setObject(java.lang.String object)
Equal to payment_intent
.
public void setPaymentMethodOptions(PaymentIntent.PaymentMethodOptions paymentMethodOptions)
public void setPaymentMethodTypes(java.util.List<java.lang.String> paymentMethodTypes)
public void setReceiptEmail(java.lang.String receiptEmail)
public void setSetupFutureUsage(java.lang.String setupFutureUsage)
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
, or on_session
.
public void setShipping(ShippingDetails shipping)
public void setStatementDescriptor(java.lang.String statementDescriptor)
public void setStatementDescriptorSuffix(java.lang.String statementDescriptorSuffix)
public void setStatus(java.lang.String status)
requires_payment_method
, requires_confirmation
, requires_action
, processing
, requires_capture
,
canceled
, or succeeded
. Read more about each PaymentIntent status.public void setTransferData(PaymentIntent.TransferData transferData)
public void setTransferGroup(java.lang.String transferGroup)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface MetadataStore<PaymentIntent>