CheckoutSession

protocol CheckoutSession

Checkout Session

  • Card issuers that are allowed

    Declaration

    Swift

    var allowedCardIssuers: [CardIssuer] { get }
  • Specific to MISB (Merchant Initiated Single Billing) Agreements. If the user has already completed a BA of this type with the merchant, this saves the last value of the “Always use balance first” switch.

    Declaration

    Swift

    var balancePreferenceOptedIn: Bool? { get }
  • Whether or not merchant allows shipping to non-domestic addresses.

    Declaration

    Swift

    var blockNonDomesticShipping: Bool { get }
  • Buyer

    Declaration

    Swift

    var buyer: User? { get }
  • Cart

    Declaration

    Swift

    var cart: Cart? { get }
  • Type of checkout session

    Declaration

    Swift

    var checkoutSessionType: CheckoutSessionType { get }
  • Credit offers

    Declaration

    Swift

    var creditOffers: [ProviderCreditOffer] { get }
  • Data Flags

    Declaration

    Swift

    var flags: CheckoutSessionFlags? { get }
  • Funding options

    Declaration

    Swift

    var fundingOptions: [FundingOption] { get }
  • Indicates whether the billing address of the payer can be shared or not

    Declaration

    Swift

    var isBillingAddressConsentRequired: Bool { get }
  • Whether is billing agreement

    Declaration

    Swift

    var isBillingAgreement: Bool { get }
  • Whether can change payment method

    Declaration

    Swift

    var isChangePaymentMethodAllowed: Bool { get }
  • Whether can change shipping address

    Declaration

    Swift

    var isChangeShippingAddressAllowed: Bool { get }
  • Whether or not sticky instrument is allowed for billing

    Declaration

    Swift

    var isSetStickyBillingAllowed: Bool { get }
  • Whether signup eligible

    Declaration

    Swift

    var isSignupEligible: Bool { get }
  • Merchant

    Declaration

    Swift

    var merchant: Merchant? { get }
  • Whether or not we need to do something like 3DS for payment

    Declaration

    Swift

    var paymentContingencies: PaymentContingencies? { get }
  • preferredFundingOption Default implementation

    Convenience property to find the preferred Funding Option

    Default Implementation

    Convenience property to find the preferred Funding Option

    Declaration

    Swift

    var preferredFundingOption: FundingOption? { get }
  • selectedAddress Default implementation

    Convenience property to find the selected address

    Default Implementation

    Convenience property to find the selected address. If none are marked as selected in the GQL response, use the user’s default address.

    Declaration

    Swift

    var selectedAddress: ShippingAddress? { get }
  • selectedPlan Default implementation

    Convenience property to find the selected plan

    Default Implementation

    Finds the plan in the funding options that is selected

    Declaration

    Swift

    var selectedPlan: Plan? { get }
  • Shipping addresses

    Declaration

    Swift

    var shippingAddresses: [ShippingAddress] { get }
  • Whether should hide cart details

    Declaration

    Swift

    var shouldHideCartDetails: Bool { get }
  • Whether should hide shipping

    Declaration

    Swift

    var shouldHideShipping: Bool { get }
  • Whether should show provider credit offer

    Declaration

    Swift

    var shouldShowProviderCreditOffer: Bool { get }
  • The state of the session

    Declaration

    Swift

    var state: CheckoutState? { get }
  • Pay mode used for a checkout session (Continue, Pay Now)

    Declaration

    Swift

    var userAction: UserAction? { get }
  • paymentContingenciesPresent Extension method

    Returns true if the payment contigencies are present, false otherwise.

    Note

    This checks specifically for SCA and ThreeDS contingency data that would prevent a successful checkout.

    Declaration

    Swift

    var paymentContingenciesPresent: Bool { get }
  • selectedShippingMethod Extension method

    Convenience property to find the selected shipping method

    Declaration

    Swift

    var selectedShippingMethod: ShippingMethod? { get }