public static class PaymentIntentParameters.Builder
The PaymentIntentParameters.Builder
class provides a convenient way to create a new
class PaymentIntentParameters
instance without having to deal with parameters that aren't
relevant to your integration.
class PaymentIntentParameters
Constructor and Description |
---|
Builder()
The
PaymentIntentParameters.Builder class provides a convenient way to create a new
class PaymentIntentParameters instance without having to deal with parameters that aren't
relevant to your integration. |
Modifier and Type | Method and Description |
---|---|
PaymentIntentParameters |
build()
Create a final instance of
class PaymentIntentParameters with the parameters that
you've set. |
PaymentIntentParameters.Builder |
setAmount(int amount)
Set the amount of the payment, provided in the currency's smallest unit.
|
PaymentIntentParameters.Builder |
setApplicationFeeAmount(int amount)
Set the amount of the application fee (if any) that will be applied to the
payment and transferred to the application owner’s Stripe account. To use an
application fee, the request must be made on behalf of another account,
using the
stripeAccount property or an OAuth key. |
PaymentIntentParameters.Builder |
setCurrency(java.lang.String currency)
Set the three-letter ISO currency code, in lowercase. Must be a supported currency.
|
PaymentIntentParameters.Builder |
setCustomer(java.lang.String customer)
Set the ID of the Customer this
class PaymentIntent is for, if one exists. |
PaymentIntentParameters.Builder |
setDescription(java.lang.String description)
Set the description - an arbitrary string attached to the object. If you send a receipt
email for this payment, the email will include the description.
|
PaymentIntentParameters.Builder |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set the map of key-value pairs that you can attach to an object. This can be useful for
storing additional information about the object in a structured format.
|
PaymentIntentParameters.Builder |
setOnBehalfOf(java.lang.String onBehalfOf)
Set the Stripe account ID for which these funds are intended.
|
PaymentIntentParameters.Builder |
setReceiptEmail(java.lang.String receiptEmail)
Set the email address that the receipt for the resulting payment will be sent to.
|
PaymentIntentParameters.Builder |
setStatementDescriptor(java.lang.String statementDescriptor)
Set a string to be displayed on your customer's credit card statement. This may be
up to 22 characters. The statement descriptor must contain at least one letter,
may not include <>"' characters, and will appear on your customer's statement
in capital letters. Non-ASCII characters are automatically stripped. While
most banks and card issuers display this information consistently, some may
display it incorrectly or not at all.
|
PaymentIntentParameters.Builder |
setTransferDataDestination(java.lang.String transferDataDestination)
Set the account (if any) the payment will be attributed to for tax reporting, and
where funds from the payment will be transferred to upon payment success.
|
PaymentIntentParameters.Builder |
setTransferGroup(java.lang.String transferGroup)
Set a string that identifies the resulting payment as part of a group.
|
public Builder()
The PaymentIntentParameters.Builder
class provides a convenient way to create a new
class PaymentIntentParameters
instance without having to deal with parameters that aren't
relevant to your integration.
class PaymentIntentParameters
@NotNull public PaymentIntentParameters.Builder setAmount(int amount)
Set the amount of the payment, provided in the currency's smallest unit.
@NotNull public PaymentIntentParameters.Builder setApplicationFeeAmount(int amount)
Set the amount of the application fee (if any) that will be applied to the
payment and transferred to the application owner’s Stripe account. To use an
application fee, the request must be made on behalf of another account,
using the stripeAccount
property or an OAuth key.
The amount must be provided as an int in the currency's smallest unit.
@NotNull public PaymentIntentParameters.Builder setCurrency(@NotNull java.lang.String currency)
Set the three-letter ISO currency code, in lowercase. Must be a supported currency.
@NotNull public PaymentIntentParameters.Builder setCustomer(@NotNull java.lang.String customer)
Set the ID of the Customer this class PaymentIntent
is for, if one exists.
class PaymentIntent
@NotNull public PaymentIntentParameters.Builder setDescription(@NotNull java.lang.String description)
Set the description - an arbitrary string attached to the object. If you send a receipt email for this payment, the email will include the description.
@NotNull public PaymentIntentParameters.Builder setMetadata(@NotNull java.util.Map<java.lang.String,java.lang.String> metadata)
Set the map of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
@NotNull public PaymentIntentParameters.Builder setOnBehalfOf(@NotNull java.lang.String onBehalfOf)
Set the Stripe account ID for which these funds are intended.
When transferDataDestination
is specified, onBehalfOf
must also be
specified and must match the destination of the transfer.
@NotNull public PaymentIntentParameters.Builder setReceiptEmail(@NotNull java.lang.String receiptEmail)
Set the email address that the receipt for the resulting payment will be sent to.
@NotNull public PaymentIntentParameters.Builder setStatementDescriptor(@NotNull java.lang.String statementDescriptor)
Set a string to be displayed on your customer's credit card statement. This may be up to 22 characters. The statement descriptor must contain at least one letter, may not include <>"' characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. While most banks and card issuers display this information consistently, some may display it incorrectly or not at all.
@NotNull public PaymentIntentParameters.Builder setTransferDataDestination(@NotNull java.lang.String transferDataDestination)
Set the account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to upon payment success.
At capture time, use transfer_dataamount to specify the amount that will be transferred automatically when a charge succeeds.
@NotNull public PaymentIntentParameters.Builder setTransferGroup(@NotNull java.lang.String transferGroup)
Set a string that identifies the resulting payment as part of a group.
@NotNull public PaymentIntentParameters build()
Create a final instance of class PaymentIntentParameters
with the parameters that
you've set.
class PaymentIntentParameters
class PaymentIntentParameters