Token Sites
Article Topics: Sites, One Click Systems, Members
What is a Token Site?
A token site is an alternative to a membership site in NATS which requires surfers to purchase tokens in order to gain access to member content instead of subscribing to a time-based membership.
In a token site surfers will be able to go back to the NATS join form and purchase additional tokens under their same username, as opposed to having to re-register when their membership expires. NATS will keep track of the total number of tokens that a member has purchased. In order to keep figures accurate, you can then post to NATS so it deducts the corresponding amount of tokens a member has used in your system.
Adding a Token Site to NATS
NATS offers compatibility for token sites, allowing you to set them up through the NATS Sites Admin. To set up a token site in NATS, navigate to the Sites Admin and click "Add a Site" located at the top of the page.
This will bring you to the "Add a Site" page, where you can configure basic information about your new site. Choose "Token" from the "Site Type" options-- this will designate your new site in NATS as a token site. When you are done with the basic configuration, click Save Changes.

Your new site will now appear in the sites list on the Sites Admin main page.
Select the "Join Options" tab then select the "Add Site Option" action icon to continue configuring it. On the Add New Option page, you will be able to set how much members will have to pay for a certain amount of tokens. Fill in the available fields with the information you wish, and fill in the Biller Codes for the billers you want to process transactions through. When you are done, click "Add Option."

Once you have completed the above steps, you can proceed with setting up your site the same way as any other site in NATS. To disable Token Plus for your members, simply uncheck the "Token Rebuy Allowed" checkbox for your join options.
For more information on setting up sites, please see "Creating a New Site in NATS."
Posting to Signup
NATS also offers the ability to send a surfer through the NATS pre-join form without the surfer needing to see that form. The only required data here would be the token option and cascade.
To do this, simply redirect the surfer to the join page with the following variables:
&signup[optionid]=<TOKENOPTION>&cascade=<CASCADEID>&nats=<NATSCODE>&step=signupIf you wish, you can also optionally add all of the other member information fields to be submitted, such as username, password, and e-mail address.
This option is very useful, as you can use it to send members that have already purchased tokens back to the join form, while still being able to use their same username.
When a member is created in NATS, they are assigned a token_hash that is passed in all of the postbacks created by NATS. The post to reuse an already registered username MUST contain the original username, as well as either the matching e-mail or matching token_hash. The following provides examples of both:
&signup[username]=<USERNAME>&signup[email]=<EMAIL>
or
&signup[username]=<USERNAME>&signup[token_hash]=<TOKENHASH>Deducting Tokens
In order to deduct tokens from a member's account the post must come from an IP listed in the SECURE IPS array; the currently configured secure IPs can be found in the Configuration Admin in the "Security Configuration" section. This post will be made to the update_token.php script to update member records.
Please keep in mind that you MUST post usernames or memberids, and you MUST also post the session or token_hash. When you have done this, include the token_change as the amount of tokens to add or remove.
For example, the following code will remove 5 tokens from the user "testtoken":
https://linkdomain/update_token.php?username=testtoken&token_hash=c83d33a154692abe82db18a851fb197c&token_change=-5Token Plus
NATS offers the Token Plus feature, which allows members of Token Sites to repurchase additional tokens for their account, without requiring them to re-input their payment information on the join form. This allows your existing members to complete additional token transactions quickly, eliminating additional steps in the process.
For more information on this feature, please see our Token Plus article.
Related Articles
Token PlusLast updated
Was this helpful?