Bug - Order ID not showing on Thank you page

Question:
My customers are facing an issue in WIX checkout. I have setup the thank you page such that they see the order number on the thank you page. However, it is happening very frequently now that the customers who are checking out do not see an order number on thank you page. Sometimes it works and sometimes it doesnt. Its a bug in the system. I reported it earlier and WIX support said that it is happening because the thank you page is being generated before an order number is created. But they did not fix it. How do I tackle this? I need WIX to fix this bug as it is very troublesome for my business.

The website is made on WIX Editor

I have already rechecked that the Order ID is setup to be shown on thank you page. And it is fine. Its a bug.

Hi Digilyze_Marketing! How about setting the default thank you page to be hidden and displaying a custom thank you page instead?

/**************************
 * backend code - pay.web.js *
 **************************/

import { Permissions, webMethod } from "wix-web-module";
import wixPayBackend from "wix-pay-backend";

export const createMyPayment = webMethod(Permissions.Anyone, () => {
  return wixPayBackend.createPayment({
    items: [
      {
        name: "Product Name",
        price: 9.99,
      },
    ],
    amount: 9.99,
  });
});

/********************
 * client-side code *
 ********************/

import { createMyPayment } from "backend/pay.web";
import wixPayFrontend from "wix-pay-frontend";
import wixWindowFrontend from "wix-window-frontend";

export function myButton_click(event, $w) {
  createMyPayment().then((payment) => {
    wixPayFrontend
      .startPayment(payment.id, { showThankYouPage: false }) // here!!
      .then((result) => {
        if (result.status === "Successful") {
          wixWindowFrontend.openLightbox("Success Box");
        } else if (result.status === "Pending") {
          wixWindowFrontend.openLightbox("Pending Box");
        }
      });
  });
}
1 Like

Thank you for your reply. I am not a developer so I need step by step instructions on where and how to put this code. Can you help with that please? Thank you so much for your reply.

Hi, Digilyze_Marketing!!

If you are not a Velo developer, implementing Velo code can be quite risky. This forum is not designed to provide a step-by-step guide to implementing Velo code from scratch. Therefore, I recommend that you first check the following URL (Develop Custom Websites) and review the Frontend Code and Backend Code sections to get an overview of how Velo code works. Gaining a solid understanding of Velo code implementation will be invaluable for your future endeavors if you plan to manage sites with Wix!

1 Like