Builder

constructor(amount: Long, currency: String, captureMethod: CaptureMethod, allowedPaymentMethodTypes: List<PaymentMethodType> = listOf(PaymentMethodType.CARD_PRESENT))

Create a builder for creating a PaymentIntent.

Parameters

amount

Amount of the payment, provided in the currency's smallest unit.

currency

Three-letter ISO currency code, in lowercase. Must be a supported currency.

captureMethod

Controls when the funds will be captured from the customer’s account.

allowedPaymentMethodTypes

The list of payment method types that this PaymentIntent is allowed to use.


constructor(allowedPaymentMethodTypes: List<PaymentMethodType> = listOf(PaymentMethodType.CARD_PRESENT))

Create a simple builder for creating a PaymentIntent.

This will default to a Capture method of manual. Note: You will need to set the amount and currency fields when using this constructor.