WixPay How to collect shipping address information

Hello this is my first forum post, so let me know if I can do anything differently in the future!

I have a sock subscription website which sells socks every month. In order to customize the Wix PaidPlans landing page, I have to code the page using the WixPay API.

Everything works fine, even the payment goes through. The only problem is that the
wixPay.startPayment function does not prompt/return a shipping address. So I don’t know where to ship the goods. The frustrating part is that if you use the regular Wix Store, the checkout page requires both the billing and shipping addresses. As far as I can tell, there is no way to modify the lightbox that appears in order to collect more information.

Please let me know if there is indeed a way to import shipping info from the customers using WixPay.

A picture of the WixPay payment collection lightbox:

Here is the code I am using. Again, it works, but I just need to add the extra shipping address.

Page Code:

$w.onReady(function () {

 const currentPlanObject = $w("#dynamicDataset").getCurrentItem();
 const planId = currentPlanObject._id;
 const planPrice = currentPlanObject.price;

  $w('#button1').onClick((event) => {

 let user = wixUsers.currentUser;
 let isLoggedIn = user.loggedIn;
 if (!isLoggedIn) {
      wixUsers.promptLogin().then(() => {
        processPlan(planId, planPrice);
      })
    } else {
      processPlan(planId, planPrice);
    }
 });
});

function processPlan(myId) {

 
    wixPaidPlans.purchasePlan(myId).then(orderObject => {
      wixWindow.openLightbox("Contact", orderObject)
       .then((goForIt) => {
 if (goForIt) {
         wixPay.startPayment(orderObject.wixPayOrderId);
       }
      });
    })
 
}
 

Backend code:

 
import wixData from 'wix-data';

export function wixPaidPlans_onPlanPurchased(event) {

 // Insert a title reflecting the type of transaction, and
 // the event's order object (json) into 
 // the collection's data field.
 if (event.order.price.amount === 0) {
 let orderData = {
 "title": "Free plan purchased",
 "data": event.order
        };
        wixData.insert("planEvents", orderData);
    } else {
 let orderData = {
 "title": "Regular plan purchased",
 "data": event.order
        };
        wixData.insert("planEvents", orderData);
    }
}

Link to how it would look. This is a product page, not a subscription page, but the problem is the same:
https://reexlmain.wixsite.com/nysc/stores/products

You can create a required form before the lightbox pops up, and if the result.status is Successful, you can enter the data from the form to your database.
https://www.wix.com/corvid/reference/wix-pay.html#startPayment

Thank you for the reply! So you’re saying there is no way to modify the payment lightbox then?

Not currently. If that’s a must for you, then you should look into integrating Stripe or Braintree or something like it into your site.

@skmedia Alright, that’s what I’ll do then. Thank you so much for the help!

is there any way to trigger a custom form if I’m not using velo for the actual plan purchasing/ payment? Like, if I’m using the standard Plans and Pricing app, but just want to trigger an additional form for the delivery address with Velo before or after payment.
I tried looking into the onPlanPurchased() event in the wix-paid-plans API, but it appears to be for backend stuff only.