How to integrate discount codes from a website into a mobile game?

harrisarshad76
Visitor
1 0 0

Hi 

We are making a mobile game and on level completion in game, we want to show a discount code to user. that discount code will come from our shopify store we can create bulk shopify coupn codes in our website but how we can integrate it with game? 

I have seen the discount api's doc which is showing end points only. Is there any detailed documentation or is there any process?

I would require 2 api's
1- GET-- to get list of the tokens like 10 tokens of 5% discount, 10 tokens of 10% discount etc
2- POST-- once I will assign token to any user I will send token id that its consumed.

I am new in it so your help with me is appreciated! 🙂

 

Thankyou

Reply 1 (1)

Jonh_8952
Visitor
1 0 0

Integrating Shopify discount codes into your mobile game is a great way to reward players. Here’s a brief guide:

  1. Generate Discount Codes:

    • Create bulk discount codes on your Shopify store.
  2. Set Up Your Server:

    • Use a server to manage communication between your game and Shopify’s API.
  3. Shopify API Endpoints:

    • GET: Fetch available discount codes.
    • POST: Mark a discount code as consumed.
  4. Integration in Game:

    • On level completion, call fetchDiscountCodes() to get a discount code.
    • When a code is used, call consumeDiscountCode() to mark it as used.

      Refer to Shopify's API documentation for more details.