public static class PaymentIntentCreateParams.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
PaymentIntentCreateParams.Builder |
addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list.
|
PaymentIntentCreateParams.Builder |
addAllPaymentMethodType(java.util.List<java.lang.String> elements)
Add all elements to `paymentMethodTypes` list.
|
PaymentIntentCreateParams.Builder |
addExpand(java.lang.String element)
Add an element to `expand` list.
|
PaymentIntentCreateParams.Builder |
addPaymentMethodType(java.lang.String element)
Add an element to `paymentMethodTypes` list.
|
PaymentIntentCreateParams |
build()
Finalize and obtain parameter instance from this builder.
|
PaymentIntentCreateParams.Builder |
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.
|
PaymentIntentCreateParams.Builder |
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.
|
PaymentIntentCreateParams.Builder |
putExtraParam(java.lang.String key,
java.lang.Object value)
Add a key/value pair to `extraParams` map.
|
PaymentIntentCreateParams.Builder |
putMetadata(java.lang.String key,
java.lang.String value)
Add a key/value pair to `metadata` map.
|
PaymentIntentCreateParams.Builder |
setAmount(java.lang.Long amount)
A positive integer representing how much to charge in the [smallest currency
unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or
100 to charge ¥100, a zero-decimal currency).
|
PaymentIntentCreateParams.Builder |
setApplicationFeeAmount(java.lang.Long applicationFeeAmount)
The amount of the application fee (if any) that will be applied to the payment and
transferred to the application owner's Stripe account.
|
PaymentIntentCreateParams.Builder |
setCaptureMethod(PaymentIntentCreateParams.CaptureMethod captureMethod)
One of `automatic` (default) or `manual`.
|
PaymentIntentCreateParams.Builder |
setConfirm(java.lang.Boolean confirm)
Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm)
this PaymentIntent immediately.
|
PaymentIntentCreateParams.Builder |
setConfirmationMethod(PaymentIntentCreateParams.ConfirmationMethod confirmationMethod)
One of `automatic` (default) or `manual`.
|
PaymentIntentCreateParams.Builder |
setCurrency(java.lang.String currency)
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in
lowercase.
|
PaymentIntentCreateParams.Builder |
setCustomer(java.lang.String customer)
ID of the Customer this PaymentIntent belongs to, if one exists.
|
PaymentIntentCreateParams.Builder |
setDescription(java.lang.String description)
An arbitrary string attached to the object.
|
PaymentIntentCreateParams.Builder |
setOffSession(java.lang.Boolean offSession)
Set to `true` to indicate that the customer is not in your checkout flow during this payment
attempt, and therefore is unable to authenticate.
|
PaymentIntentCreateParams.Builder |
setOffSession(PaymentIntentCreateParams.OffSession offSession)
Set to `true` to indicate that the customer is not in your checkout flow during this payment
attempt, and therefore is unable to authenticate.
|
PaymentIntentCreateParams.Builder |
setOnBehalfOf(java.lang.String onBehalfOf)
The Stripe account ID for which these funds are intended.
|
PaymentIntentCreateParams.Builder |
setPaymentMethod(java.lang.String paymentMethod)
ID of the payment method (a PaymentMethod, Card, BankAccount, or saved Source object) to
attach to this PaymentIntent.
|
PaymentIntentCreateParams.Builder |
setPaymentMethodOptions(PaymentIntentCreateParams.PaymentMethodOptions paymentMethodOptions)
Payment-method-specific configuration for this PaymentIntent.
|
PaymentIntentCreateParams.Builder |
setReceiptEmail(java.lang.String receiptEmail)
Email address that the receipt for the resulting payment will be sent to.
|
PaymentIntentCreateParams.Builder |
setReturnUrl(java.lang.String returnUrl)
The URL to redirect your customer back to after they authenticate or cancel their payment on
the payment method's app or site.
|
PaymentIntentCreateParams.Builder |
setSavePaymentMethod(java.lang.Boolean savePaymentMethod)
If the PaymentIntent has a `payment_method` and a `customer` or if you're attaching a payment
method to the PaymentIntent in this request, you can pass `save_payment_method=true` to save
the payment method to the customer.
|
PaymentIntentCreateParams.Builder |
setSetupFutureUsage(PaymentIntentCreateParams.SetupFutureUsage setupFutureUsage)
Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
PaymentIntentCreateParams.Builder |
setShipping(PaymentIntentCreateParams.Shipping shipping)
Shipping information for this PaymentIntent.
|
PaymentIntentCreateParams.Builder |
setSource(java.lang.String source)
This is a legacy field that will be removed in the future.
|
PaymentIntentCreateParams.Builder |
setStatementDescriptor(java.lang.String statementDescriptor)
For non-card charges, you can use this value as the complete description that appears on your
customers’ statements.
|
PaymentIntentCreateParams.Builder |
setStatementDescriptorSuffix(java.lang.String statementDescriptorSuffix)
Provides information about a card payment that customers see on their statements.
|
PaymentIntentCreateParams.Builder |
setTransferData(PaymentIntentCreateParams.TransferData transferData)
The parameters used to automatically create a Transfer when the payment succeeds.
|
PaymentIntentCreateParams.Builder |
setTransferGroup(java.lang.String transferGroup)
A string that identifies the resulting payment as part of a group.
|
public PaymentIntentCreateParams build()
public PaymentIntentCreateParams.Builder setAmount(java.lang.Long amount)
public PaymentIntentCreateParams.Builder setApplicationFeeAmount(java.lang.Long applicationFeeAmount)
public PaymentIntentCreateParams.Builder setCaptureMethod(PaymentIntentCreateParams.CaptureMethod 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 PaymentIntentCreateParams.Builder setConfirm(java.lang.Boolean confirm)
public PaymentIntentCreateParams.Builder setConfirmationMethod(PaymentIntentCreateParams.ConfirmationMethod 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 PaymentIntentCreateParams.Builder setCurrency(java.lang.String currency)
public PaymentIntentCreateParams.Builder setCustomer(java.lang.String customer)
If present, payment methods used with this PaymentIntent can only be attached to this Customer, and payment methods attached to other Customers cannot be used with this PaymentIntent.
public PaymentIntentCreateParams.Builder setDescription(java.lang.String description)
public PaymentIntentCreateParams.Builder addExpand(java.lang.String element)
PaymentIntentCreateParams.expand
for the field documentation.public PaymentIntentCreateParams.Builder addAllExpand(java.util.List<java.lang.String> elements)
PaymentIntentCreateParams.expand
for the field documentation.public PaymentIntentCreateParams.Builder putExtraParam(java.lang.String key, java.lang.Object value)
PaymentIntentCreateParams.extraParams
for the field documentation.public PaymentIntentCreateParams.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
PaymentIntentCreateParams.extraParams
for the field documentation.public PaymentIntentCreateParams.Builder putMetadata(java.lang.String key, java.lang.String value)
PaymentIntentCreateParams.metadata
for the field documentation.public PaymentIntentCreateParams.Builder putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
PaymentIntentCreateParams.metadata
for the field documentation.public PaymentIntentCreateParams.Builder setOffSession(java.lang.Boolean offSession)
public PaymentIntentCreateParams.Builder setOffSession(PaymentIntentCreateParams.OffSession offSession)
public PaymentIntentCreateParams.Builder setOnBehalfOf(java.lang.String onBehalfOf)
public PaymentIntentCreateParams.Builder setPaymentMethod(java.lang.String paymentMethod)
public PaymentIntentCreateParams.Builder setPaymentMethodOptions(PaymentIntentCreateParams.PaymentMethodOptions paymentMethodOptions)
public PaymentIntentCreateParams.Builder addPaymentMethodType(java.lang.String element)
PaymentIntentCreateParams.paymentMethodTypes
for the field documentation.public PaymentIntentCreateParams.Builder addAllPaymentMethodType(java.util.List<java.lang.String> elements)
PaymentIntentCreateParams.paymentMethodTypes
for the field documentation.public PaymentIntentCreateParams.Builder setReceiptEmail(java.lang.String receiptEmail)
public PaymentIntentCreateParams.Builder setReturnUrl(java.lang.String returnUrl)
public PaymentIntentCreateParams.Builder setSavePaymentMethod(java.lang.Boolean savePaymentMethod)
If the payment method is already saved to a customer, this does nothing. If this type of payment method cannot be saved to a customer, the request will error.
public PaymentIntentCreateParams.Builder setSetupFutureUsage(PaymentIntentCreateParams.SetupFutureUsage 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 PaymentIntentCreateParams.Builder setShipping(PaymentIntentCreateParams.Shipping shipping)
public PaymentIntentCreateParams.Builder setSource(java.lang.String source)
public PaymentIntentCreateParams.Builder setStatementDescriptor(java.lang.String statementDescriptor)
public PaymentIntentCreateParams.Builder setStatementDescriptorSuffix(java.lang.String statementDescriptorSuffix)
public PaymentIntentCreateParams.Builder setTransferData(PaymentIntentCreateParams.TransferData transferData)
public PaymentIntentCreateParams.Builder setTransferGroup(java.lang.String transferGroup)