Does anyone have experience of Twine and Wix Payments?

Hey all,

My Twine (Sugarcube) game is hosted on a Wix website, and at the end of the fist level there is an option to ‘Unlock next level.’
This takes the user to the Unlock next level item on our Wix website (so far so good…) but I am struggling to figure out what code I need add to my twine passage that tells me the user has made a purchase, and takes them to level 2 in the game.

Thanks in advance.

That’s going to be pretty difficult. While you can load the Twine file with an argument on the URL that indicates that something has been unlocked, or make a callback from the game to your website to confirm — there’s nothing at all in a Twine game that can’t just be edited by the user while playing.

So, if you come up with a mechanism to set a variable in your game to indicate that Chapter 2 is unlocked, the player can just set that variable themselves.

1 Like

You could issue them a passkey or password at the end of level 1 and then check the password on level 2 with an internal javascript function. That would hide it a little better but anyone who loads up level 2 in twine could still find the function checking for password equivalency.

This is a completely different strategy than what you’re planning, but one other option would be to use itch.io which is set up for secure donations and payments for games.

You could set up a main “demo” page where the first chapter is free to play in the browser, then include additional downloads for the rest of the game on the page the player must pay to access. They provide a really good interface for offering free-access keys to reviewers and other distribution functions, including keeping track of payments and issuing refunds if necessary.

While I’d suggest avoiding the “pay for every individual chapter” model in favor of demo + one payment to unlock the rest, I believe itch’s model is once you pay to unlock the downloads on a game page you have access to everything. If you want to make multiple chapters each with an individual price to purchase, you’d make a different game landing page for every chapter and link them together. You can employ the “secret URL” function itch has for individual chapters and leave them in Draft mode so people would be directed only to the main page first, then that page could have each chapter’s secret URL linked so players wouldn’t encounter them out of order and accidentally pay for chapter 5 before they buy chapter 1.

This unfortunately wouldn’t prevent a malicious user from sharing the code that they bought. But in general you can’t prevent hackers from hacking to get free stuff and hopefully the bulk of your purchases will be from people who like and want to support your game so you’ll write more.

2 Likes

Thanks all, I’ll have a think about all these.

Could I ask a favour and get your opinions on where I am with this game?
My game website is: https://www.themagnatorana.com/ then click Play Game

If you manage to reach the end of the first level, you will see the Unlock Next Level link is the bit I will need to add the code for.

Would be good to get your thoughts.

Thanks