ShopPayConfiguration

class ShopPayConfiguration(val shopId: String, val billingAddressRequired: Boolean = true, val emailRequired: Boolean = true, val shippingAddressRequired: Boolean, val allowedShippingCountries: List<String>, val lineItems: List<PaymentSheet.ShopPayConfiguration.LineItem>, val shippingRates: List<PaymentSheet.ShopPayConfiguration.ShippingRate>) : Parcelable

Configuration related to Shop Pay, which only applies when using wallet buttons.

Parameters

shopId

The corresponding store's shopId.

billingAddressRequired

Whether or not billing address is required. Defaults to true.

emailRequired

Whether or not email is required. Defaults to true.

shippingAddressRequired

Whether or not to collect the customer's shipping address.

lineItems

An array of LineItem objects. These are shown as line items in the payment interface, if line items are supported. You can represent discounts as negative amount LineItems.

shippingRates

A list of ShippingRate objects. The first shipping rate listed appears in the payment interface as the default option.

Constructors

Link copied to clipboard
constructor(shopId: String, billingAddressRequired: Boolean = true, emailRequired: Boolean = true, shippingAddressRequired: Boolean, allowedShippingCountries: List<String>, lineItems: List<PaymentSheet.ShopPayConfiguration.LineItem>, shippingRates: List<PaymentSheet.ShopPayConfiguration.ShippingRate>)

Types

Link copied to clipboard
sealed interface DeliveryEstimate : Parcelable

Type used to describe DeliveryEstimates for shipping. See https://docs.stripe.com/js/elements_object/create_express_checkout_element#express_checkout_element_create-options-shippingRates-deliveryEstimate

Link copied to clipboard
class LineItem(val name: String, val amount: Int) : Parcelable

A type used to describe a single item for in the Shop Pay wallet UI.

Link copied to clipboard
class ShippingRate(val id: String, val amount: Int, val displayName: String, val deliveryEstimate: PaymentSheet.ShopPayConfiguration.DeliveryEstimate?) : Parcelable

A shipping rate option.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

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