IPaymentMethod

Represents a payment method containing all information needed to submit a basket via Olo's Ordering API

Properties

Link copied to clipboard
abstract val billingAddress: Address

The billing address associated with the transaction. The country code and postal code will always be set. Other address fields will only be set if isGooglePay is true and will depend on GooglePayConfig.fullBillingAddressRequired

Link copied to clipboard
abstract val cardType: CardBrand

The issuer of the card (e.g. Visa, Mastercard, etc)

Link copied to clipboard
abstract val countryCode: String

Convenience property for accessing the country code, equivalent to billingAddress.countryCode

Link copied to clipboard
abstract val email: String

The email associated with the transaction. If isGooglePay is false or if Google Pay was not configured to require an email address, this will be an empty string

Link copied to clipboard

The environment used to create the payment method

Link copied to clipboard
abstract val expirationMonth: Int?

Two-digit number representing the card’s expiration month

Link copied to clipboard
abstract val expirationYear: Int?

Four-digit number representing the card’s expiration year

Link copied to clipboard
abstract val fullName: String

The name associated with the transaction. Will only be provided if isGooglePay and GooglePayConfig.fullNameRequired are true

Link copied to clipboard

User-facing description of the payment method as provided by Google. If isGooglePay is false, this will be an empty string

Link copied to clipboard
abstract val id: String

The payment method id. This should be set to the token field when submitting a basket

Link copied to clipboard
abstract val isGooglePay: Boolean

Whether or not this payment method was created via Google Pay

Link copied to clipboard
abstract val last4: String

The last four digits of the card

Link copied to clipboard
abstract val phoneNumber: String

The phone number associated with the transaction. Will only be provided if isGooglePay and GooglePayConfig.phoneNumberRequired are true

Link copied to clipboard
abstract val postalCode: String

Convenience property for accessing the Zip or postal code, equivalent to billingAddress.postalCode