Adding voucher (promo) codes for your mobile or web app
Table of Contents
Voucher codes (or promo codes) are a useful way of providing a single-use subscription-style service without needing to set up authentication APIs. The user receives the code from you and gains access to the content that you make available under that voucher code. If you want to give the user access to just one edition, you can. Equally, you could give them access to every edition - it's up to you. Users will remain signed in until any of; the code expires, they're using an incognito browser, or clearing their cookies after using the code.
Voucher codes are designed to live alongside any existing auth setup, whether 3rd party or in-app purchases, and are the only auth type that can do so. They appear in-app as an option on the settings page, separate from the aforementioned options.
Info for testers
If you redeem a promo code on a device, it will remember it until the app in uninstalled. When testing, it may appear that an invalid code is giving you access however this could be from a previously redeemed code. Always uninstall and re-install the app if you are testing.
Warning
Codes are meant to be non-personally identifiable information (PII). For example, do NOT use email addresses or real names of users in the codes. We are not allowed to store PII on our servers for your users.
Code creation
-
Go to your Pugpig Distribution Service site and sign in using your credentials.
- Contact support@pugpig.com if you require any assistance.
- Go to your Voucher Codes addon. This is located in the main left toolbar under "Third Party Subs"
-
Under "Offers", create an offer group by filling out the following:
- Code - The code you insert into this column is only used for your reference, it is not user facing, it is usually a lowercase, no space version of the name.
- Name - Once again, this is not user facing and is only for your reference.
-
Choose either:
- kill oldest - where if a code can be used e.g. 5 times, the 6th time will log out the person who redeems the code 1st.
- limit - where the code can only be used the prescribed number of times. Limit is based on devices (e.g. if someone is using an iPhone and iPad, they will be considered two users).
- Valid days - is the number of days the code is valid for after it has been redeemed (optional). If left empty it will not expire unless the user uninstalls the app.
-
Valid regex - insert the edition key that you want the code to be able to redeem here in brackets “(-)”. If more than one, separate with “|” (optional). If not set to a specific key(s), the code will work for all editions.
- To find the edition key you need to go to Content Sources > Main Content Feed, then click on the edition you want, and the key will display at the top of the page, after 'Edition:'.
- Active from / Active to - the dates the code is active for regardless of whether it is redeemed or not. If the code is not redeemed in this prescribed timeframe, then the user will lose access (optional).
- If the code is ready to go live right away, toggle the “active” slider to “on”. Note that you can deactivate a code the same way
- Click the green tick to save. Click the red cross to delete.
-
Click the link that is generated in the “code” column to generate the codes. You will be taken to a new window.
- Click “Add codes”.
- Offer code format - you can include any letters and numbers. Use question marks to denote the characters you want to be randomly generated. For example, “??????????” would generate a 10-character random code. You could do a mix, such as “OFFER-123-????”
- Number of unique codes - type the number of codes you want to be generated using the format specified in “Offer code format”. The limit is 10,000 codes per time. If you want to generate more than 10,000 codes, please contact a Pugpig representative who can provide assistance.
- Number of uses per code - if you want one code to be redeemable by multiple users or across multiple devices, then insert here the number of times you want the code to be redeemable.
- Option - You can choose how you'd like the randomly generated characters to appear.
- Click “Generate”
- Note: Codes need to be unique across all the offers you have. Once you've made a code, you cannot reuse/make new versions of the code. You can create multiple versions of the code when you first generate it.
- After that is complete and you’ve refreshed the page, the generated codes should be listed. When the codes are redeemed, it should list the details of the device that has redeemed the code in the code’s row. In the 'Codes Issued' column you can see how many have been redeemed - e.g. `2/500` means 500 codes were issued, and two have been used so far.
- When viewing the details of individual codes, you can also delete a code using the delete button on the right.
Testing
You can use the test form to test that the code works and provides the user with the right level of access. However, this will count as a code being redeemed, so do not use this for live codes.