payment_ button
form | payment_button
returns string
Generates an HTML container to host accelerated checkout buttons
for a product. The filter must be used on the form object within a product form.
{% form 'product', product %}
{{ form | payment_button }}
{% endform %}
Code
{% form 'product', product %}
{{ form | payment_button }}
{% endform %}Data
{
"product": {
"id": 6786188247105
}
}Output
<form method="post" action="/cart/add" id="product_form_6786188247105" accept-charset="UTF-8" class="shopify-product-form" enctype="multipart/form-data"><input type="hidden" name="form_type" value="product" /><input type="hidden" name="utf8" value="✓" />
<div data-shopify="payment-button" class="shopify-payment-button"> <shopify-accelerated-checkout recommended="null" fallback="{"supports_subs":true,"supports_def_opts":true,"name":"buy_it_now","wallet_params":{}}" access-token="7be588c245f69602e5db198d53fcfde5" buyer-country="CA" buyer-locale="en" buyer-currency="CAD" variant-params="[{"id":39897499729985,"requiresShipping":true},{"id":39897499762753,"requiresShipping":true},{"id":39897499795521,"requiresShipping":true},{"id":39897499828289,"requiresShipping":true},{"id":39897499861057,"requiresShipping":true},{"id":39897499893825,"requiresShipping":true},{"id":39897499926593,"requiresShipping":true},{"id":39897499959361,"requiresShipping":true},{"id":39897499992129,"requiresShipping":true}]" shop-id="56174706753" enabled-flags="["ae0f5bf6"]" > <div class="shopify-payment-button__button" role="button" disabled aria-hidden="true" style="background-color: transparent; border: none"> <div class="shopify-payment-button__skeleton"> </div> </div> </shopify-accelerated-checkout> <small id="shopify-buyer-consent" class="hidden" aria-hidden="true" data-consent-type="subscription"> This item is a recurring or deferred purchase. By continuing, I agree to the <span id="shopify-subscription-policy-button">cancellation policy</span> and authorize you to charge my payment method at the prices, frequency and dates listed on this page until my order is fulfilled or I cancel, if permitted. </small> </div>
<input type="hidden" name="product-id" value="6786188247105" /></form>
Output
<form method="post" action="/cart/add" id="product_form_6786188247105" accept-charset="UTF-8" class="shopify-product-form" enctype="multipart/form-data"><input type="hidden" name="form_type" value="product" /><input type="hidden" name="utf8" value="✓" />
<div data-shopify="payment-button" class="shopify-payment-button"> <shopify-accelerated-checkout recommended="null" fallback="{"supports_subs":true,"supports_def_opts":true,"name":"buy_it_now","wallet_params":{}}" access-token="7be588c245f69602e5db198d53fcfde5" buyer-country="CA" buyer-locale="en" buyer-currency="CAD" variant-params="[{"id":39897499729985,"requiresShipping":true},{"id":39897499762753,"requiresShipping":true},{"id":39897499795521,"requiresShipping":true},{"id":39897499828289,"requiresShipping":true},{"id":39897499861057,"requiresShipping":true},{"id":39897499893825,"requiresShipping":true},{"id":39897499926593,"requiresShipping":true},{"id":39897499959361,"requiresShipping":true},{"id":39897499992129,"requiresShipping":true}]" shop-id="56174706753" enabled-flags="["ae0f5bf6"]" > <div class="shopify-payment-button__button" role="button" disabled aria-hidden="true" style="background-color: transparent; border: none"> <div class="shopify-payment-button__skeleton"> </div> </div> </shopify-accelerated-checkout> <small id="shopify-buyer-consent" class="hidden" aria-hidden="true" data-consent-type="subscription"> This item is a recurring or deferred purchase. By continuing, I agree to the <span id="shopify-subscription-policy-button">cancellation policy</span> and authorize you to charge my payment method at the prices, frequency and dates listed on this page until my order is fulfilled or I cancel, if permitted. </small> </div>
<input type="hidden" name="product-id" value="6786188247105" /></form>Was this page helpful?