Builder

class Builder(allowedPaymentMethodTypes: List<PaymentMethodType>)

The PaymentIntentParameters.Builder class provides a convenient way to create a new PaymentIntentParameters instance without having to deal with parameters that aren't relevant to your integration.

Constructors

Builder
Link copied to clipboard
fun Builder(allowedPaymentMethodTypes: List<PaymentMethodType> = listOf(CARD_PRESENT))

Functions

build
Link copied to clipboard
fun build(): PaymentIntentParameters
Create a final instance of PaymentIntentParameters with the parameters that you've set.
setAmount
Link copied to clipboard
fun setAmount(amount: Long): PaymentIntentParameters.Builder
Set the amount of the payment, provided in the currency's smallest unit.
setApplicationFeeAmount
Link copied to clipboard
fun setApplicationFeeAmount(amount: Long): PaymentIntentParameters.Builder
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.
setCurrency
Link copied to clipboard
fun setCurrency(currency: String): PaymentIntentParameters.Builder
Set the three-letter ISO currency code, in lowercase.
setCustomer
Link copied to clipboard
fun setCustomer(customer: String): PaymentIntentParameters.Builder
Set the ID of the Customer this PaymentIntent is for, if one exists.
setDescription
Link copied to clipboard
fun setDescription(description: String): PaymentIntentParameters.Builder
Set the description - an arbitrary string attached to the object.
setMetadata
Link copied to clipboard
fun setMetadata(metadata: Map<String, String>): PaymentIntentParameters.Builder
Set the map of key-value pairs that you can attach to an object.
setOnBehalfOf
Link copied to clipboard
fun setOnBehalfOf(onBehalfOf: String): PaymentIntentParameters.Builder
Set the Stripe account ID for which these funds are intended.
setReceiptEmail
Link copied to clipboard
fun setReceiptEmail(receiptEmail: String): PaymentIntentParameters.Builder
Set the email address that the receipt for the resulting payment will be sent to.
setSetupFutureUsage
Link copied to clipboard
fun setSetupFutureUsage(setupFutureUsage: String): PaymentIntentParameters.Builder
Set a string (if any) that indicates the type of future usage (possible values: off_session, on_session)Setup Future Usage
setStatementDescriptor
Link copied to clipboard
fun setStatementDescriptor(statementDescriptor: String): PaymentIntentParameters.Builder
Set a string to be displayed on your customer's credit card statement.
setTransferDataDestination
Link copied to clipboard
fun setTransferDataDestination(transferDataDestination: String): PaymentIntentParameters.Builder
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.
setTransferGroup
Link copied to clipboard
fun setTransferGroup(transferGroup: String): PaymentIntentParameters.Builder
Set a string that identifies the resulting payment as part of a group.

Properties

allowedPaymentMethodTypes
Link copied to clipboard
val allowedPaymentMethodTypes: List<PaymentMethodType>