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, ApiResource.RequestType
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()
One of `automatic` (default) or `manual`.
|
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()
One of `automatic` (default) or `manual`.
|
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.String |
getCurrency()
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), 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)
One of `automatic` (default) or `manual`.
|
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)
One of `automatic` (default) or `manual`.
|
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setCurrency(java.lang.String currency)
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), 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, multipartRequest, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public java.lang.String getApplication()
public void setApplication(java.lang.String id)
public Application getApplicationObject()
public void setApplicationObject(Application expandableObject)
public java.lang.String getCustomer()
public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
public void setCustomerObject(Customer expandableObject)
public java.lang.String getInvoice()
public void setInvoice(java.lang.String id)
public Invoice getInvoiceObject()
public void setInvoiceObject(Invoice expandableObject)
public java.lang.String getOnBehalfOf()
public void setOnBehalfOf(java.lang.String id)
public Account getOnBehalfOfObject()
public void setOnBehalfOfObject(Account expandableObject)
public java.lang.String getPaymentMethod()
public void setPaymentMethod(java.lang.String id)
public PaymentMethod getPaymentMethodObject()
public void setPaymentMethodObject(PaymentMethod expandableObject)
public java.lang.String getReview()
public void setReview(java.lang.String id)
public Review getReviewObject()
public void setReviewObject(Review expandableObject)
public java.lang.String getSource()
public void setSource(java.lang.String id)
public PaymentSource getSourceObject()
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.
Read the expanded documentation to 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.
Read the expanded documentation to 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.
Read the expanded documentation to 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.
Read the expanded documentation to 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.
Read the expanded documentation to 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.
Read the expanded documentation to 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()
public java.lang.String getCancellationReason()
public java.lang.String getCaptureMethod()
When the capture method is `automatic`, Stripe automatically captures funds when the customer authorizes the payment.
Change `capture_method` to manual if you wish to [separate authorization and capture](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#separate-authorization-and-capture) for payment methods that support this.
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.
Please refer to our [quickstart guide](https://stripe.com/docs/payments/payment-intents/web) to learn about how `client_secret` should be handled.
public java.lang.String getConfirmationMethod()
When the confirmation method is `automatic`, a PaymentIntent can be confirmed using a publishable key. After `next_action`s are handled, no additional confirmation is required to complete the payment.
When the confirmation method is `manual`, all payment attempts must be made using a secret key. The PaymentIntent returns to the `requires_confirmation` state after handling `next_action`s, and requires your server to initiate each payment attempt with an explicit confirmation.
Learn more about the different [confirmation flows](https://stripe.com/docs/payments/payment-intents/use-cases#one-time-payments).
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.String getDescription()
public StripeError getLastPaymentError()
public java.lang.Boolean getLivemode()
public PaymentIntent.NextAction getNextAction()
public java.lang.String getObject()
public PaymentIntent.PaymentMethodOptions getPaymentMethodOptions()
public java.util.List<java.lang.String> getPaymentMethodTypes()
public java.lang.String getReceiptEmail()
public java.lang.String getSetupFutureUsage()
If present, the payment method used with this PaymentIntent can be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer, even after the transaction completes.
Use `on_session` if you intend to only reuse the payment method when your customer is present in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. See [Saving card details after a payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.
Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
public ShippingDetails getShipping()
public java.lang.String getStatementDescriptor()
public java.lang.String getStatementDescriptorSuffix()
public java.lang.String getStatus()
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)
public void setCancellationReason(java.lang.String cancellationReason)
public void setCaptureMethod(java.lang.String captureMethod)
When the capture method is `automatic`, Stripe automatically captures funds when the customer authorizes the payment.
Change `capture_method` to manual if you wish to [separate authorization and capture](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#separate-authorization-and-capture) for payment methods that support this.
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.
Please refer to our [quickstart guide](https://stripe.com/docs/payments/payment-intents/web) to learn about how `client_secret` should be handled.
public void setConfirmationMethod(java.lang.String confirmationMethod)
When the confirmation method is `automatic`, a PaymentIntent can be confirmed using a publishable key. After `next_action`s are handled, no additional confirmation is required to complete the payment.
When the confirmation method is `manual`, all payment attempts must be made using a secret key. The PaymentIntent returns to the `requires_confirmation` state after handling `next_action`s, and requires your server to initiate each payment attempt with an explicit confirmation.
Learn more about the different [confirmation flows](https://stripe.com/docs/payments/payment-intents/use-cases#one-time-payments).
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)
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)
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)
If present, the payment method used with this PaymentIntent can be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer, even after the transaction completes.
Use `on_session` if you intend to only reuse the payment method when your customer is present in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. See [Saving card details after a payment](https://stripe.com/docs/payments/cards/saving-cards-after-payment) to learn more.
Stripe uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by [SCA](https://stripe.com/docs/strong-customer-authentication), using `off_session` will ensure that they are authenticated while processing this PaymentIntent. You will then be able to collect [off-session payments](https://stripe.com/docs/payments/cards/charging-saved-cards#off-session-payments-with-saved-cards) for this customer.
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)
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>