Creating Shareable URL's

Hello,

I have an application where a user is able to create products that have a unique ID within Stripe. I would like the ability to “Copy to Clipboard” a custom url that can be shared over email, text, etc… where the end user clicks on it and is directed to a dedicated checkout page where the Stripe info is pre-populated.

I have figured out how to pull the required data from stripe, but im not sure how to create a URL that is able to store the unique ID from Xano, and reference that in my workflow when the page loads.

Thank you,
Chad

Could you tell us more about the “url from Xano”? What’s exactly the struggle you’re facing?

Sure! Here are steps:

  1. User creates a new product via the UI

  2. Step 1 results in a new Xano record (eg “1”) which stores information regarding price, images, title, description, etc… and other required information for Stripe to process payment

  3. After the record is created in Xano, the user should be able to click a “Share” button which will direct anyone they share the link with to the “Checkout” page (this is my first struggle, figuring out how to reference another WeWeb page in a manual URL)

  4. The end user will click on the link that was shared with them and will be directed to the checkout page. The URL should also contain the Xano ID from Step 2 in such a way that I can make an API call on page load to get required information for the Stripe plugin (this is my second struggle)

Does this help?

Okay, so for your first struggle, you can construct the url yourself, by concatenating your collection’s path and the whatever you use to identify your collection item.

Second struggle is fairly simple, use a query parameter, to identify the parameter you set in the step two and use it in a Trigger workflows on page load.

For query strings @Joyce has some tutorials I think. For the concatenation, you’d have to experiment a little :slight_smile:

What do you mean by Collection path?

Any chance you could mock it here? For example:

HTTPS://yourdomain.com/[something]

You could do it like this, if the checkout is same for all of them.

https://broberto.sk/checkout?product_id=1&second_step_id=3

This would be the simplest one. Then you can look at the page’s global variables. It should be a query object/array containing checkout and second step id
Which are the two variables I am passing in.

Hi @chadsmithclt :wave:

So if I understand correctly, you’re struggling to create a page in WeWeb that has a unique URL for each of your products that includes the unique ID from the product record in Xano?

If that’s the case, then I think this video on how to create a dynamic collection page should help out.

It presents two options:

  1. working with a query string variable, so the URL would be something like yourdomain.com is available for purchase - Sedo.com
  2. working with a dynamic slug, so the URL would be something like yourdomain.com is available for purchase - Sedo.com

Does that help or did I misunderstand the question? :sweat_smile:

Hey @Joyce

Thanks for the response. I was actually able to get it sorted last night from the other comments and the thread.

I definitely need some reinforcement learning, so thank you for the links

1 Like