PaymentMethod

data class PaymentMethod constructor(id: String?, created: Long?, liveMode: Boolean, type: PaymentMethod.Type?, billingDetails: PaymentMethod.BillingDetails?, customerId: String?, card: PaymentMethod.Card?, cardPresent: PaymentMethod.CardPresent?, fpx: PaymentMethod.Fpx?, ideal: PaymentMethod.Ideal?, sepaDebit: PaymentMethod.SepaDebit?, auBecsDebit: PaymentMethod.AuBecsDebit?, bacsDebit: PaymentMethod.BacsDebit?, sofort: PaymentMethod.Sofort?, upi: PaymentMethod.Upi?, netbanking: PaymentMethod.Netbanking?) : StripeModel

PaymentMethod objects represent your customer's payment instruments. They can be used with PaymentIntents to collect payments or saved to Customer objects to store instrument details for future payments.

Related guides: Payment Methods and More Payment Scenarios.

See PaymentMethodCreateParams for PaymentMethod creation

Constructors

Link copied to clipboard
fun PaymentMethod(id: String?, created: Long?, liveMode: Boolean, type: PaymentMethod.Type?, billingDetails: PaymentMethod.BillingDetails? = null, customerId: String? = null, card: PaymentMethod.Card? = null, cardPresent: PaymentMethod.CardPresent? = null, fpx: PaymentMethod.Fpx? = null, ideal: PaymentMethod.Ideal? = null, sepaDebit: PaymentMethod.SepaDebit? = null, auBecsDebit: PaymentMethod.AuBecsDebit? = null, bacsDebit: PaymentMethod.BacsDebit? = null, sofort: PaymentMethod.Sofort? = null, upi: PaymentMethod.Upi? = null, netbanking: PaymentMethod.Netbanking? = null)

Types

Link copied to clipboard
data class AuBecsDebit constructor(bsbNumber: String?, fingerprint: String?, last4: String?) : PaymentMethod.TypeData
Link copied to clipboard
data class BacsDebit : PaymentMethod.TypeData
Link copied to clipboard
data class BillingDetails @JvmOverloads constructor(address: Address?, email: String?, name: String?, phone: String?) : StripeModel, StripeParamsModel

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

Link copied to clipboard
class Builder : ObjectBuilder<PaymentMethod>
Link copied to clipboard
data class Card constructor(brand: CardBrand, checks: PaymentMethod.Card.Checks?, country: String?, expiryMonth: Int?, expiryYear: Int?, fingerprint: String?, funding: String?, last4: String?, threeDSecureUsage: PaymentMethod.Card.ThreeDSecureUsage?, wallet: Wallet?, networks: PaymentMethod.Card.Networks?) : PaymentMethod.TypeData

If this is a card PaymentMethod, this hash contains details about the card.

Link copied to clipboard
data class CardPresent : PaymentMethod.TypeData

If this is a card_present PaymentMethod, this hash contains details about the Card Present payment method.

Link copied to clipboard
object Companion
Link copied to clipboard
data class Fpx : PaymentMethod.TypeData

Requires the FPX payment method enabled on your account via https://dashboard.stripe.com/account/payments/settings.

Link copied to clipboard
data class Ideal : PaymentMethod.TypeData

If this is an ideal PaymentMethod, this hash contains details about the iDEAL payment method.

Link copied to clipboard
data class Netbanking : PaymentMethod.TypeData
Link copied to clipboard
data class SepaDebit : PaymentMethod.TypeData

If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA debit bank account.

Link copied to clipboard
data class Sofort : PaymentMethod.TypeData
Link copied to clipboard
enum Type : Enum<PaymentMethod.Type> , Parcelable
Link copied to clipboard
sealed class TypeData : StripeModel
Link copied to clipboard
data class Upi : PaymentMethod.TypeData

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
fun hasExpectedDetails(): Boolean
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
val auBecsDebit: PaymentMethod.AuBecsDebit? = null

If this is an au_becs_debit PaymentMethod, this hash contains details about the bank account.

Link copied to clipboard
val bacsDebit: PaymentMethod.BacsDebit? = null

If this is a bacs_debit PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.

Link copied to clipboard
val billingDetails: PaymentMethod.BillingDetails? = null

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

Link copied to clipboard
val card: PaymentMethod.Card? = null

If this is a card PaymentMethod, this hash contains details about the card.

Link copied to clipboard
val cardPresent: PaymentMethod.CardPresent? = null

If this is a card_present PaymentMethod, this hash contains details about the Card Present payment method.

Link copied to clipboard
val created: Long?

Time at which the object was created. Measured in seconds since the Unix epoch.

Link copied to clipboard
val customerId: String? = null

The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.

Link copied to clipboard
val fpx: PaymentMethod.Fpx? = null

If this is a fpx PaymentMethod, this hash contains details about the FPX payment method.

Link copied to clipboard
val id: String?

Unique identifier for the object.

Link copied to clipboard
val ideal: PaymentMethod.Ideal? = null

If this is an ideal PaymentMethod, this hash contains details about the iDEAL payment method.

Link copied to clipboard
val liveMode: Boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

Link copied to clipboard
val netbanking: PaymentMethod.Netbanking? = null
Link copied to clipboard
val sepaDebit: PaymentMethod.SepaDebit? = null

If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA debit bank account.

Link copied to clipboard
val sofort: PaymentMethod.Sofort? = null

If this is a sofort PaymentMethod, this hash contains details about the SOFORT payment method.

Link copied to clipboard
val type: PaymentMethod.Type?

The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.

Link copied to clipboard
val upi: PaymentMethod.Upi? = null