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
  • POST - OTP
  • Request
  1. REST API
  2. API Reference

OTP

This Endpoint is specific for accounts which requires OTP to proceed with some specific operations (i.e. Redeem Transaction Endpoint)

To use this endpoint, you need to make sure that your account has OTP configuration enabled. In addition to the OTP configuration, you need to make sure that your SMS configurations are set and enabled.

Upon enabling this endpoint, some endpoints may require additional parameter (otp) in order to validate the payload sent.

mobile or email should be sent along with the playerUniqueId in case (only if) your account supports channel merging.

POST - OTP

https://api.gameball.co/api/v3.0/integrations/otp

Request

Header

Attribute
Type
Required
Description

APIKey

string

Yes

Client API key

secretKey

string

Yes

Client Secret key

Body

Attribute
Type
Required
Description

playerUniqueId

string

Yes

Unique identifier for the customer in your database.

mobile

string

No

Customer's unique mobile number. (Sent in case your account supports channel merging)

email

string

No

Customer's unique email. (Sent in case your account supports channel merging)

amount

number

No

Monetary value in your system currency to be redeemed.

Note: - Amount must be positive. - If this field is set, then the the other fields value should be null. Also, all fields couldn't be null.

points

number

No

Points to be held from the customer points balance on Gameball.

Note: - Points must be positive. - If this field is set, then the the other fields value should be null. Also, all fields couldn't be null.

ruleId

number

No

Redemption rule to be held from the customer points balance on Gameball.

Note: - If this field is set, then the the other fields value should be null. Also, all fields couldn't be null.

Sample Request Body (With amount)

{
   "playerUniqueId":"player456",
   "amount": 20,
}

Sample Request Body (With points)

{
   "playerUniqueId":"player456",
   "points": 20,
}

Sample Request Body (With ruleId)

{
   "playerUniqueId":"player456",
   "ruleId": 123,
}

Sample Response

{
    "code": 1,
    "message": "Process Completed Successfully"
}

Usage Example

The example shown is a request sent to Gameball to generate an OTP to your customer as per your SMS configurations.

curl -X POST -H 'apiKey: 807b041b7d35425988e354e1f6bce186' \
-H 'secretKey: klmb041b7d354259l3u4ft35e1q2r3703' -d 
 '{
   "playerUniqueId":"player456",
   "amount": 20
  }' -v -i 
'https://api.gameball.co/api/v3.0/integrations/otp'
curl -X POST -H 'apiKey: 807b041b7d35425988e354e1f6bce186' \
-H 'secretKey: klmb041b7d354259l3u4ft35e1q2r3703' -d 
 '{
   "playerUniqueId":"player456",
   "points": 20
  }' -v -i 
'https://api.gameball.co/api/v3.0/integrations/otp'
curl -X POST -H 'apiKey: 807b041b7d35425988e354e1f6bce186' \
-H 'secretKey: klmb041b7d354259l3u4ft35e1q2r3703' -d 
 '{
   "playerUniqueId":"player456",
   "ruleId": 123
  }' -v -i 
'https://api.gameball.co/api/v3.0/integrations/otp'
PreviousBatch Operations DataNextPartner 🤝

Last updated 8 months ago