# One-click Buy Now implementation for 1 Wix Store item

**URL:** <https://forum.wixstudio.com/t/one-click-buy-now-implementation-for-1-wix-store-item/78770>\
**Category:** Ask the community\
**Tags:** wix-stores-frontend, question, design, code, wix\
**Created:** [June 29, 2026, 10:59am UTC](https://forum.wixstudio.com/t/one-click-buy-now-implementation-for-1-wix-store-item/78770 "2026-06-29T10:59:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gideon\_Skarzgard](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/gideon_skarzgard/32/87597_2.png) [@Gideon\_Skarzgard](https://forum.wixstudio.com/u/Gideon_Skarzgard)\
**Post date:** [June 29, 2026, 10:59am UTC](https://forum.wixstudio.com/t/one-click-buy-now-implementation-for-1-wix-store-item/78770/1 "2026-06-29T10:59:12Z")

</div>

**Q:** How to make a ‘Buy Now’ button for 1 digital product instead of the “Add to Cart” btn?

**Goal:** On a custom page, I want customers to click “Buy Now” & directly go to checkout without going through the cart. For an instant purchase without extra steps.

**Attempts:** -The only available native buttons linked to Wix Stores are inside widgets, which can’t be accessed straightforwardly. Only add to cart buttons are available. I haven’t found a ‘Buy Now’ button

> [@Buy now button instead of add to cart](https://forum.wixstudio.com/t/buy-now-button-instead-of-add-to-cart/68547/2):
>
> You can achieve this by creating a custom “Buy Now” button that links directly to the checkout page for your eBook. Instead of using the default Wix Stores button, generate a direct checkout link using the product’s store URL and product ID, then set your button’s click action to redirect users to that link. This will bypass the cart and take them straight to checkout. You can also use Velo (Dev Mode) to create a dynamic button that fetches the product ID and redirects users accordingly. Let me …

This seems like a good approach for me. How do I implement this in Wix Editor? Is there a nocode/native solution? I tried different approaches using velo too, none has worked yet. I get different versions of failed checkout pages. Maybe the new Wix stores/wix ecom doesn’t the foll code? Or sdk is better? Hope it can be done with simple page code before trying with backend  
**Approach 1)**

```javascript
import wixLocation from 'wix-location';

$w.onReady(() => {
    const STORE_URL = "https://www.openrescue.com"; //I also tried the product pg
    const PRODUCT_ID = "1782649327875000"; //also tried inventory id

    $w("#buyNowButton").onClick(() => {
        const checkoutUrl =
            `${STORE_URL}/checkout?items=${PRODUCT_ID}:1`;

        wixLocation.to(checkoutUrl);
    });
});

```

**Approach 2)**

```javascript
import { cart } from 'wix-stores-frontend';
import wixLocation from 'wix-location';

$w.onReady(() => {
    $w("#buyNowButton").onClick(async () => {
          await cart.addProducts([
              {
                  productId: "1782649327875000",
                  quantity: 1
              }
          ]);
          wixLocation.to("/checkout");
    });
});

```

**Working in** Wix Editor  
**Related post** [Buy now button instead of add to cart](https://forum.wixstudio.com/t/buy-now-button-instead-of-add-to-cart/68547)

---

<div class="post-metadata">

**Author:** ![Dan\_Suhr](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/dan_suhr/32/94074_2.png) [@Dan\_Suhr](https://forum.wixstudio.com/u/Dan_Suhr)\
**Post date:** [June 29, 2026, 10:25pm UTC](https://forum.wixstudio.com/t/one-click-buy-now-implementation-for-1-wix-store-item/78770/2 "2026-06-29T22:25:42Z")

</div>

There isn’t really a clean no-code/native solution for placing a custom “Buy Now” button anywhere on a custom page. The native Buy Now button is available on the Wix Product Page, but a standalone custom button needs Velo.

The issue with your first approach is that Wix checkout does not reliably work from a manually built URL like /checkout?items=PRODUCT\_ID:1. Checkout needs to be created from an actual cart/checkout session.

Also, your second approach uses the older wix-stores-frontend cart API, which is now deprecated. I’d use the newer Wix eCom/currentCart flow instead: add the product to the visitor’s current cart, create a checkout from that cart, then navigate to that checkout.

something like this should work. Just make sure PRODUCT\_ID is the actual Wix Stores product ID, not the inventory ID.

```javascript
import { currentCart } from 'wix-ecom-backend';
import { navigateToCheckoutPage } from 'wix-ecom-frontend';

const WIX_STORES_APP_ID = '215238eb-22a5-4c36-9e7b-e7c08025e04e';
const PRODUCT_ID = '1782649327875000';

$w.onReady(function () {
    $w('#buyNowButton').onClick(async () => {
        try {
            $w('#buyNowButton').disable();

            await currentCart.addToCurrentCart({
                lineItems: [
                    {
                        quantity: 1,
                        catalogReference: {
                            appId: WIX_STORES_APP_ID,
                            catalogItemId: PRODUCT_ID
                        }
                    }
                ]
            });

            const checkoutId = await currentCart.createCheckoutFromCurrentCart({
                channelType: 'WEB'
            });

            await navigateToCheckoutPage(checkoutId);

        } catch (error) {
            console.error('Buy Now error:', error);
            $w('#buyNowButton').enable();
        }
    });
});

```

---

<div class="post-metadata">

**Author:** ![Gideon\_Skarzgard](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/gideon_skarzgard/32/87597_2.png) [@Gideon\_Skarzgard](https://forum.wixstudio.com/u/Gideon_Skarzgard)\
**Post date:** [June 30, 2026, 11:26am UTC](https://forum.wixstudio.com/t/one-click-buy-now-implementation-for-1-wix-store-item/78770/3 "2026-06-30T11:26:48Z")

</div>

Hey Dan, hope you’re well. Many thanks for that detailed response.  
The issues with the 2 approaches you pointed out were exactly in line gpt’s earlier diagnoses.

I tried your code & got 2 red underlines in it  
Under ‘channelType’: Type ‘“WEB”’ is not assignable to type ‘ChannelType$3’.  
Under ‘checkoutId’: Argument of type ‘CreateCheckoutResponse’ is not assignable to parameter of type ‘string’.

After a lot of back & forth with gpt from then, I got no where. Here are some further attempts;  
As it instructed, above errors were cleared with the following changes;  
1.

```javascript
import { currentCart, ChannelType } from 'wix-ecom-backend';

```

(but that created a red underline under the import line’s ChannelType  
2)

```javascript
const checkout = await currentCart.createCheckoutFromCurrentCart({
    channelType: ChannelType.WEB
});
await navigateToCheckoutPage(checkout.checkoutId);

```

It also said there may be an issue with the product id format? That it may need some GUID like this?1a2d7e83-4bef-31d5-09e1-3326ee271c09  
The ID I always used was the numericId . It’s right, right?

---

<div class="post-metadata">

**Author:** ![Gideon\_Skarzgard](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/gideon_skarzgard/32/87597_2.png) [@Gideon\_Skarzgard](https://forum.wixstudio.com/u/Gideon_Skarzgard)\
**Post date:** [July 1, 2026, 9:26am UTC](https://forum.wixstudio.com/t/one-click-buy-now-implementation-for-1-wix-store-item/78770/4 "2026-07-01T09:26:33Z")

</div>

A broader Q I’ve had for a while: I’ve used this GPT ([ChatGPT - W Epic Solutions](https://chatgpt.com/g/g-L4i6fhkOT-w-epic-solutions)) so far to aid me code. But I think it’s limited to Velo & older infrastructure.. How can update this/modify a gpt/other llm to respond more accurately from updated API refs & SDK?  
I’m not a dev, am a rookie coder building & coding myself & learn with tutorials & ai as much as I can before asking for people’s help. So I don’t wanna be take your time unless I’ve tried a lot/made sufficient findings to add value here.
