Gameball Developers Guide
v3.0
v3.0
  • Introduction
  • What's New in V3.0
  • Installing Gameball
    • Web
      • Show Gameball Customer Widget
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Go-Live Checklist
    • iOS
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • Android
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • React Native
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
      • Migration from v1 to v2
    • Flutter
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Go-Live Checklist
    • Generic Mobile App
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
    • Retail & Modern POS
      • Initialize Gameball Customer Profile
      • Track Orders & Cashback Reward
      • Track Refunds
      • Enable Redemption
        • Prepare POS for Redemption
        • Using Virtual ID
          • Using Virtual Card
  • REST API
    • Overview
      • Server-Side SDKs
    • Authentication
    • API Reference
      • Customer
      • Event
      • Transactions
      • Order
      • Coupons
      • Leaderboard 👑
      • Notifications 👑
      • Configurations 👑
      • Batches 👑
        • Batch Operations Data
      • OTP
      • Partner 🤝
        • Client 🤝
        • Redemption Rule 🤝
        • Cashback Rule 🤝
    • Webhooks
      • Notifications Webhook
      • Customer Profile Webhook
    • Errors
    • Object Reference
  • Tutorials
    • Build Custom UI Elements 👑
      • Display Reward Campaign Progress
      • Show VIP Tiers
      • Show Customer Points Balance
      • Build Leaderboards
      • Show Notifications Inbox
      • Adapt UI to Configurations
      • Advanced UI Techniques
        • Increase Sales with Cashback UI Elements
        • Derive Engagement with Rewards Campaigns UI Elements
    • Tracking Customer Events
    • Build your Own Notification System
    • Checkout Integration Example
    • Redemption Integration Options
      • Redeem with coupon system
        • Integrate your coupon system
          • Example using e-commerce platform(WooCommerce)
          • Example using a custom coupon system
        • Build couponing experience
          • Using Gameball widget
          • Build custom experience
            • Showing customers available points
            • Allowing customers to create coupons
            • Apply the discount code to your cart
        • Coupon integration reference
      • Redeem with direct debt
        • Get customers points balance
        • Redeem customer points
  • Third Party Integrations
    • Segment Integration
Powered by GitBook
On this page
  1. Tutorials
  2. Redemption Integration Options
  3. Redeem with coupon system

Integrate your coupon system

PreviousRedeem with coupon systemNextExample using e-commerce platform(WooCommerce)

Last updated 1 year ago

Integrating Coupon system with Gameball

For Gameball to be able to communicate with your coupon system successfully, we need to know some information about your coupon system. Specifically, we require the endpoint responsible for creating coupons.

We refer to this information as configurations, which you can set up from your . In this guide, we will provide an in-depth explanation of these configurations and help you choose the configuration example that matches your case, so you can complete the necessary configuration.

Coupon system Configurations

We will start by defining the configurations needed to integrate your coupon system with Gameball. To start Integrating you have to define the following in your :

  • The URL/Endpoint in your coupon system responsible for creating coupons, for example in WooCommerce Integration the URL is .

  • The type of the HTTP method, usually it is of type POST

  • The authentication required to talk with this URL/endpoint, for example, endpoint Authentication method is OAuth1.0, so you have to define in the headers body in configuration the consumer key and consumer secret.

  • The query parameters need to passed to the URL.

  • The payload(data) sent in the request body, it contains data related to the coupon, for example, the code, expiryDate, etc..

To know more details about configuration visit this .

Now we will go deeper on the payload configuration, payload represents structure of the json body of the HTTP request which is going to be send to the endpoint responsible for creating coupons at your coupon system, since different coupon systems can have different payload structure and param names.

Each client can define his own payload using variables to be replaced by Gameball during request creation, for example, if your coupon system API requires the following attributes in the body of create coupon request :

  • code(required)

  • amount(required)

  • playerEmail(optional)

the payload configuration should looks like this

{
 "playerEmail": "{{playerUniqueId}}",
 "amount":"{{value}}"
 "code": "{{code}}",
}

The attribute names inside curly brackets represents coupon attributes in Gameball, these names are fixed, these name are mapped to their respective attributes in your coupon system, for example, if a customer in your system with email (test@gameball.co) wants to redeem a coupon with value of 50EGP and the code is 50EGP0FF, Gameball backend will replace the keys inside each curly brackets {{}} with actual values so the payload sent after replacing attribute values based each attribute name should looks like :

{
 "playerEmail": "test@gameball.co",
 "amount":"50"
 "code": "50EGP0FF",
}

If you changed the name of 'playerEmail' attribute to email, then the payload configuration should updated and look like this

{
 "email": "{{playerUniqueId}}",
 "amount":"{{value}}"
 "code": "{{code}}",
}

To view more attributes, you can look at the payload table above.

Payload attributes are optional, you should send attributes based on your preferences or in case of integrating an e-commerce CMS coupon system you will send attributes marked as required in the CMS coupon system documentation.

{
"code":"{{code}}"
}

If you want integrate with a CMS or web-builder coupon system and utilize their coupon API you should go through this guide :

If you want to create/use your own custom coupon API you should go through this guide :

Most of the payload attributes are optional, deciding whether to add an attribute or not depends on your coupon system itself, if you are using an existing coupon system like the example then you will find that code attribute is required so the body should at-least looks like this

dashboard
dashboard
example
https://example.com/wp-json/wc/v3/coupons
WooCommerce
index
WooCommerce
Example using e-commerce platform coupon system
Example using custom coupon system

Example using e-commerce platform coupon system

This guide will show you an example of integrating e-commerce platform API with Gameball.

Example using custom coupon system

This guide will show you an example of integrating a custom coupon API with Gameball.