How to build a unique page url for digital purchases?

Hi,

How can I make a URL unique or an URL that Expires after closing the window?

I’m building an app where users buy the same digital item multiple times around the year.

And I just realized that my current set up, allows the user to copy and paste the link of digital product and get the item for free.

How can I avoid this issue?

Thank you

Set the page type as the digital product’s type.
Whenever you navigate a user to this page, make sure to send the corresponding product as page data.

When you do this, the page url will be something like mydomain.com/product/PRODUCT’S_UNIQUE_ID

If you delete the product from your database, this url will become invalid or expired.

1 Like

Then adding to what @atomicfusion said, if you set the slug (Set Slug action) of your Product that will show up in the URL instead so it looks friendly to someone

2 Likes

Step 1 - Add two data types in your DB - (1) is_visited_by_user? (yes/no), (2) list_of_visited_users (List of Users)
Step 2 - Set state of list_of_visited_users (User List) - When redirecting the user to product page and when Page is Loaded
Step 3 - Redirect the user to product page, only when list_of_visited_users does not contain current user.
Step 4 - If Step 3 is empty then, update the list_of_visited_users by adding current user.
Step 5 - Update list_of_visited_users state
Step 6 - Add an alert message when list_of_visited_users is not empty - “This page is expired”

When user closes the page without purchasing or doing any activity and tries to reopen the same URL alert message should come based on the state.

I have tried my best to answer your question. Please respond if my understanding is incorrect.

1 Like

Thank you very much for the detailed respond. This works when the digital product is purchased once per user.

How can I do this approach for one digital product that is purchased

Thank you for the reply but I’m trying to do avoid the following:

Process:
1-.User goes to product page
2-.User purchases the digital product
3-. User gets send to a page were the digital product is
4-.User creates his Digital Product
6-. Digital Product gets added to user acccount
Issue:
My issue is with the link on the step 3. Since this is a product that the user will be purchasing frequently. How can I avoid that the user saves the link so he can have his product again for free, since that link comes after the purchase is made

Create a purchases data type with the digital product as a digital product and run conditionals off whether or not the item is in his purchases

This topic was automatically closed after 70 days. New replies are no longer allowed.