Skip to main content
Version: 5.11.6

How to Use a Web Coupon

How to create a webpage for users

For information on how you can create a webpage where users can use the issued coupon codes, please refer to the Console Guide - Web Coupon Settings page.

How to issue a UID

The UID used on the web coupon page is the UID value a user receives through the client after logging in.
It can be checked with the following logic.

Logic for issuing a UID

// Log in to BACKND
var bro = Backend.BMember.CustomLogin("backendUser", "backendUser");

// The UID value is issued only after a successful login/sign-up.
if(bro.IsSuccess()) {
Debug.Log("Login successful : " + bro);
Debug.Log("User UID(for coupon) : " + Backend.UID);
}
else {
Debug.LogError("An error occurred while logging in.");
// Values are not assigned to Backend.UserNickname, Backend.UserInDate, and Backend.UID.
}

After using the web coupon

Use the coupon on the web coupon page using the user's ID and the provided coupon code.
If you have used the coupon successfully, the item registered to the coupon will be available in the coupon mail.

Load coupon mail list

If you have used the coupon successfully, the coupon is sent through mail.
Functions to load, claim, and claim all coupon mail are the same as those for admin and ranking mail.
For information on coupon mail, please refer to the Mail Function - Load Coupon Mail documentation.

Add function to enter uid automatically when using web coupon URL

Adding the uid parameter &uid={UID number} to the web coupon URL will register the uid automatically when redirected to the page.
Click the Apply button in Web Coupon Management if the uid is not being reflected.

Sample code

string webCouponUrl = "https://storage.thebackend.io/1ea3f14d34e89...omitted...e821ce49c7845/coupon.html?lng=ko";
string uidParameterUrl = $"&uid={Backend.UID}";
// example : "&uid=736274625"
Application.OpenURL(webCouponUrl + uidParameterUrl);

Result