PaymentMethod

data class PaymentMethod @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) constructor(val id: String?, val created: Long?, val liveMode: Boolean, code: PaymentMethodCode?, val type: PaymentMethod.Type?, val billingDetails: PaymentMethod.BillingDetails? = null, val customerId: String? = null, val card: PaymentMethod.Card? = null, val cardPresent: PaymentMethod.CardPresent? = null, val fpx: PaymentMethod.Fpx? = null, val ideal: PaymentMethod.Ideal? = null, val sepaDebit: PaymentMethod.SepaDebit? = null, val auBecsDebit: PaymentMethod.AuBecsDebit? = null, val bacsDebit: PaymentMethod.BacsDebit? = null, val sofort: PaymentMethod.Sofort? = null, val upi: PaymentMethod.Upi? = null, val netbanking: PaymentMethod.Netbanking? = null, val usBankAccount: PaymentMethod.USBankAccount? = null) : 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
constructor(id: String?, created: Long?, liveMode: Boolean, code: PaymentMethodCode?, 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, usBankAccount: PaymentMethod.USBankAccount? = null)

Types

Link copied to clipboard
data class AuBecsDebit @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) constructor(val bsbNumber: String?, val fingerprint: String?, val last4: String?) : PaymentMethod.TypeData
Link copied to clipboard
Link copied to clipboard
data class BillingDetails @JvmOverloads constructor(val address: Address? = null, val email: String? = null, val name: String? = null, val phone: String? = null) : 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
Link copied to clipboard
data class Card @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) constructor(val brand: CardBrand = CardBrand.Unknown, val checks: PaymentMethod.Card.Checks? = null, val country: String? = null, val expiryMonth: Int? = null, val expiryYear: Int? = null, val fingerprint: String? = null, val funding: String? = null, val last4: String? = null, val threeDSecureUsage: PaymentMethod.Card.ThreeDSecureUsage? = null, val wallet: Wallet? = null, val networks: PaymentMethod.Card.Networks? = null, val displayBrand: String? = null) : PaymentMethod.TypeData

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

Link copied to clipboard

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

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

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed class TypeData : StripeModel
Link copied to clipboard
Link copied to clipboard
data class USBankAccount @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) constructor(val accountHolderType: PaymentMethod.USBankAccount.USBankAccountHolderType, val accountType: PaymentMethod.USBankAccount.USBankAccountType, val bankName: String?, val fingerprint: String?, val last4: String?, val financialConnectionsAccount: String?, val networks: PaymentMethod.USBankAccount.USBankNetworks?, val routingNumber: String?) : PaymentMethod.TypeData

Properties

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

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

Link copied to clipboard

Unique identifier for the object.

Link copied to clipboard

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

Link copied to clipboard

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
Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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
Link copied to clipboard

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

Functions

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