# Unfunctional Payment

**URL:** <https://forum.wixstudio.com/t/unfunctional-payment/75359>\
**Category:** Ask the community\
**Tags:** wix-payment, code, wix\
**Created:** [December 3, 2025, 7:17pm UTC](https://forum.wixstudio.com/t/unfunctional-payment/75359 "2025-12-03T19:17:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Ambroz](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/tomas_ambroz/32/113266_2.png) [@Tomas\_Ambroz](https://forum.wixstudio.com/u/Tomas_Ambroz)\
**Post date:** [December 3, 2025, 7:17pm UTC](https://forum.wixstudio.com/t/unfunctional-payment/75359/1 "2025-12-03T19:17:28Z")

</div>

**I’m having trouble with**  
I’m creating funnel pages in Wix - I have everything created but I can’t get past the payment. When selecting checkboxes (order form for online course), it nicely calculates the price of the selected items in the course, but when I click to pay (via the WixPay button), in the checkout it shows an item and price of 1 CZK (item values are from 990 CZK to 2499 CZK). I can’t get the value of the selected items there (the value of the entire order is simply the sum of items at different prices).

**Working in**  
Wix Editor, Dev Mode

**Site link**  
www.eat4life.cz/online - pass praha

**What I’m trying to do**  
I would need advice on how to set it up so that the total price (based on what’s selected) is displayed at the checkout and the payment process proceeds.

**Thanks**

---

<div class="post-metadata">

**Author:** ![Pratham](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/pratham/32/119586_2.png) [@Pratham](https://forum.wixstudio.com/u/Pratham)\
**Post date:** [December 4, 2025, 8:19am UTC](https://forum.wixstudio.com/t/unfunctional-payment/75359/2 "2025-12-04T08:19:23Z")

</div>

You have not mentioned ‘how’ you are calculating the total price and how you have set up your payment button. It was only when I dug in a little deeper did I find out that you have written Velo code to run the calculation logic (which btw has two **onReady()** functions - not recommended), and in the button’s **onClick()** event handler, this is the only line of code you’ve got:

```javascript
$w('#button59').onClick(() => {
  console.log("Počítaná suma (nedostane sa do platby):", total);
});

```

All you are doing is logging the calculated price to the console, you are not ‘passing’ the total to Wix Pay for it to appear in the checkout. It seems that you have just linked the button through the editor, and hence the output.

So here’s what you need to do:

- Remove any links to the button from the editor. This will need to handled completely using code.
- Study the **[wix-pay-backend](https://dev.wix.com/docs/velo/apis/wix-pay-backend)** and **frontend** API. Go through the examples provided for the **[createPayment()](https://dev.wix.com/docs/velo/apis/wix-pay-backend/create-payment)** function and then start the payment flow on button click.
- Watch this tutorial by @thewixwiz which will help you get a hang of it:

[![](https://us1.discourse-cdn.com/wix/original/3X/8/a/8a3e73e388e7a30cb2b918779e43a852fe32b354.jpeg "How to Accept Payments for ANYTHING with the Wix-Pay API") ](https://www.youtube.com/watch?v=l9oFvP897xs)
