ShopPayButton
The ShopPayButton component renders a button that redirects to the Shop Pay checkout. It renders a <shop-pay-button> custom element, for which it will lazy-load the source code automatically.
Anchor to propsProps
ShopPayButtonStyleProps & ShopPayDomainProps & ShopPayChannelAttribution & (ShopPayVariantIds | ShopPayVariantAndQuantities)ShopPayButtonStyleProps & ShopPayDomainProps & ShopPayChannelAttribution & (ShopPayVariantIds | ShopPayVariantAndQuantities)- Anchor to classNameclassNameclassNamestringstring
A string of classes to apply to the
divthat wraps the Shop Pay button.- Anchor to widthwidthwidthstringstring
A string that's applied to the CSS custom property (variable)
--shop-pay-button-widthfor the Buy with Shop Pay component.
ShopPayChannelAttribution
- Anchor to channelchannelchannel'headless' | 'hydrogen''headless' | 'hydrogen'
A string that adds channel attribution to the order. Can be either
headlessorhydrogen
ShopPayDomainProps
- Anchor to storeDomainstoreDomainstoreDomainstringstring
The domain of your Shopify storefront URL (eg:
your-store.myshopify.com).
ShopPayVariantAndQuantities
- Anchor to variantIdsAndQuantitiesvariantIdsAndQuantitiesvariantIdsAndQuantitiesArray<{ id: string; quantity: number; }>Array<{ id: string; quantity: number; }>requiredrequired
An array of variant IDs and quantities to purchase with Shop Pay.
- Anchor to variantIdsvariantIdsvariantIdsnevernever
An array of IDs of the variants to purchase with Shop Pay. This will only ever have a quantity of 1 for each variant. If you want to use other quantities, then use
.
ShopPayVariantIds
- Anchor to variantIdsvariantIdsvariantIdsstring[]string[]requiredrequired
An array of IDs of the variants to purchase with Shop Pay. This will only ever have a quantity of 1 for each variant. If you want to use other quantities, then use
.- Anchor to variantIdsAndQuantitiesvariantIdsAndQuantitiesvariantIdsAndQuantitiesnevernever
An array of variant IDs and quantities to purchase with Shop Pay.
ShopPayButtonStyleProps
- className
A string of classes to apply to the `div` that wraps the Shop Pay button.
string - width
A string that's applied to the [CSS custom property (variable)](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) `--shop-pay-button-width` for the [Buy with Shop Pay component](https://shopify.dev/custom-storefronts/tools/web-components#buy-with-shop-pay-component).
string
ShopPayDomainProps
- storeDomain
The domain of your Shopify storefront URL (eg: `your-store.myshopify.com`).
string
ShopPayChannelAttribution
- channel
A string that adds channel attribution to the order. Can be either `headless` or `hydrogen`
'headless' | 'hydrogen'
ShopPayVariantIds
- variantIds
An array of IDs of the variants to purchase with Shop Pay. This will only ever have a quantity of 1 for each variant. If you want to use other quantities, then use `variantIdsAndQuantities`.
string[] - variantIdsAndQuantities
An array of variant IDs and quantities to purchase with Shop Pay.
never
ShopPayVariantAndQuantities
- variantIds
An array of IDs of the variants to purchase with Shop Pay. This will only ever have a quantity of 1 for each variant. If you want to use other quantities, then use `variantIdsAndQuantities`.
never - variantIdsAndQuantities
An array of variant IDs and quantities to purchase with Shop Pay.
Array<{ id: string; quantity: number; }>