Shop Pay Buttoncomponent
The 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)
A string of classes to apply to the div
that wraps the Shop Pay button.
A string that's applied to the CSS custom property (variable) --shop-pay-button-width
for the Buy with Shop Pay component.
ShopPayChannelAttribution
A string that adds channel attribution to the order. Can be either headless
or hydrogen
ShopPayDomainProps
The domain of your Shopify storefront URL (eg: your-store.myshopify.com
).
ShopPayVariantAndQuantities
An array of variant IDs and quantities to purchase with Shop Pay.
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
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 .
An array of variant IDs and quantities to purchase with Shop Pay.
<ShopPayButton> without <ShopifyProvider>
Anchor to examplesExamples
If context provider is used in your app, you can use the
without supplying a
prop