Embed
Add an HTML button for products on your site and accept payments in seconds.
The embed is the fastest way to sell a Stakk product on any website. Load the script once, then put a button wherever you want checkout to open.
The embed checkout
Add the script to your page, then declare a product on a button. Clicking it opens Stakk checkout in a modal.
<script src="https://your-vinext-host/embed.js"></script>
<button type="button" data-vinext-product="PRODUCT_ID">
Buy now
</button>Replace PRODUCT_ID with the product ID from Dashboard → Products. The same script also accepts data-vinext-product and data-sellix-product so older snippets keep working.
Prefill fields from HTML
Anything you can type in checkout can be declared on the button. Stakk reads the attributes and applies them when the modal opens.
<button
type="button"
data-vinext-product="PRODUCT_ID"
data-vinext-coupon="SAVE10"
data-vinext-email="buyer@example.com"
data-vinext-quantity="2"
data-vinext-gateway="BITCOIN"
data-vinext-field-username="florian"
>
Buy with coupon
</button>data-vinext-couponauto-applies a coupondata-vinext-emailfills the delivery emaildata-vinext-quantitysets quantitydata-vinext-gatewaypre-selects a payment methoddata-vinext-field-{key}fills a product custom field by name
See the full attribute list.
Styling
The overlay, modal, and checkout chrome come from Stakk. Style your own button however you want — it is just HTML.
<button
class="your-buy-button"
data-vinext-product="PRODUCT_ID"
>
Get access
</button>JavaScript
Need a cart, a success callback, or a custom trigger? Use window.Stakk.
<script>
document.addEventListener("vinext:success", (event) => {
console.log("Paid", event.detail);
});
</script>