--- title: "One-click checkout / Buy now" slug: "one-click-checkout-buy-now" updated: 2026-02-06T20:30:32Z published: 2026-02-06T20:30:32Z canonical: "help.skio.com/one-click-checkout-buy-now" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.skio.com/llms.txt > Use this file to discover all available pages before exploring further. # One-click checkout / Buy now You can create a one-click checkout link for customers which brings them straight to the checkout populated with the product variant and selling plan provided. In your Skio dashboard: 1. Click **Products** and select **Selling Plans**. Click into the Selling Plan that contains the product. 2. Scroll down to the 1 Click Checkout section and expand it using the arrow on the right. 3. Find the product you want to link to and copy the 1 Click Checkout link ![Screenshot 2024-02-08 at 2.43.56 PM.png](https://cdn.us.document360.io/a953bba6-c70d-43ce-bc77-d7f32a8fc514/Images/Documentation/22774967038363.png?sv=2026-02-06&spr=https&st=2026-10-13T09%3A06%3A33Z&se=2026-10-13T10%3A06%3A33Z&sr=c&sp=r&sig=zMJcnWxIoSyKINqnlx1AlMsUVbOpRb4YFS7mO2%2FpIaU%3D) ## Buy Now Button The below functionality can be used to generate one-click checkout links dynamically, i.e. without copy and pasting the link: ```plaintext function skioMagicLinkGenerator(productVariantId, sellingPlanId) {  const magic = {    products: [      {        sellingPlanPlatformId: sellingPlanId,        productVariantPlatformId: productVariantId      }    ]  }  const stringifiedMagic = btoa(JSON.stringify(magic))  return `/a/account/groups/join?magic=${stringifiedMagic}` } ``` Here is an example of using this with a button element. The variant id and selling plan id are pulled from the add to cart form when the button is clicked so the magic link is dynamically based on the most most recently selected values. **button.liquid** ```plaintext ``` **buy-now.js** ```plaintext const buttonEl = document.querySelector('[skio-buy-now]') buttonEl.addEventListener('click', (e) => {  e.preventDefault()  const formAttr = buttonEl.getAttribute('form')  const form = document.getElementById(formAttr)  const formData = new FormData(form)  let variantId, sellingPlanId  for ([key, value] of formData.entries()) {    switch (key) {      case 'id':        variantId = value        break      case 'selling_plan':        sellingPlanId = value        break    }  }  if (variantId && sellingPlanId) {    window.location.href = skioMagicLinkGenerator(variantId, sellingPlanId)  } }) ```