What should be surl and furl in my payu native cordova sdk
06:42 11 Dec 2025
export default function PayUMoneyPayment({ data }) {
  const handlePayuNativeCordovaMobilePay = async () => {
    const key = "xyz";
    const txnid = "txn_" + Math.random().toString(36).substr(2, 9);
    const amount = parseFloat(data.amount).toFixed(2);
    const productinfo = data.cartItems[0]?.product_name.replace(/[^a-zA-Z0-9 ]/g, "") + " and others";
    const firstname = data.fname;
    const email = data.email;
    const phone = data.phone;
    const udf5 = "ABC";
    const cartItems = data.cartItems;
    const type = data.type;
    const surl= config.CUSTOMER_URL + "/success-web.html?txn_id="+txnid+'&type='+type+'&ctype=web';
    const furl= config.CUSTOMER_URL + "/failure-web.html?txn_id="+txnid+'&type='+type+'&ctype=web';
    const res = await fetchApi({ amount: amount, txn_id:txnid, cart_items:cartItems, payment_gateway:'payumoney'}, '/create_payu_order');
    // πŸ‘‰ STEP 2: Prepare PayU params
    const payUPaymentParams = {
      key,
      transactionId: txnid,
      amount,
      productInfo: productinfo,
      firstName: firstname,
      email,
      phone,
      udf5,
      surl,
      furl,
    };

    const payUCheckoutProConfig = {
      showExitConfirmationOnCheckoutScreen: true,
      merchantName: "PKJShop",
      merchantLogo: "https://pkjshop.in/public/site_images/larges/logo.png",
    };

    const payUParams = {
      payUPaymentParams,
      payUCheckoutProConfig,
    };

    // πŸ‘‰ STEP 3: Open PayU Native Checkout Screen
    try {
      window.cordova.plugins.PayUCheckoutProCordova.openCheckoutScreen(
        payuResponseCallback,
        payUParams
      );
    } catch (err) {
      alert("PayU Error: " + err.message);
      console.error(err);
    }
  };
};

I am always getting "PayU Error: 'surl should be something like https://www.payu.in/txnstatus'" I tried it with many url format like "https://pkjshop.in/success-web.html?txn_id=abc" and "https://pkjshop.in/failure-web.html?txn_id=abc". Tried with pretty urls too. but always getting same error.

android reactjs cordova capacitor