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
  • use-case: redeem points directly at checkout
  • Important operations to consider
  • use-case: redeem points at a custom redemption page
  1. Tutorials
  2. Redemption Integration Options
  3. Redeem with direct debt

Redeem customer points

PreviousGet customers points balanceNextSegment Integration

Last updated 1 year ago

In this guide we will go through different customer redemption use-cases using direct redemption. In the previous , we learned use-cases of using customers' points balance which is retrieved by API. However, for customers to make use of these points, they should be able to redeem them and apply them during checkout.

There are various scenarios when redeeming your customers points, you may want your customers to apply points redemption during checkout or you may want them to apply it at different page and apply later on in checkout page.

use-case: redeem points directly at checkout

Redemption at checkout offers a seamless and easy experience for your customer to redeem his points directly during checkout without navigating across different pages to redeem his points and copying his discount code and paste it at checkout page.

//Order API body request
{
  "totalPaid": "90",
  "totalDiscount": "10",
  ...
  "redeemedAmount": 10,
}

It is your responsibility to calculate the redeemedAmount, totalPrice and totalDiscount attribute and pass it to Order API request body.

holding points till checkout completes successfully

Holding customer's points before redemption is a use-case some businesses might need, a real life for example for this is Credit Card Authorization Hold, it is a temporary hold placed on a credit or debit card to verify that there is enough available credit. Same goes for points holding, points are hold for a temporary time till you release them after checkout is completed.

Once the checkout is completed, you can release your hold customer points and they will be deducted from his points balance.

A famous example for holding points use-case is Airline businesses, they holds passenger's points after redeeming it instead of directly deducting them from passenger's points balance as a pre-cautionary measure till checkout is completely successfully, which guarantees they are not deducted from customer's pointsBalance.

For that case and other similar cases, it’s preferable to hold the needed points for redemption before proceeding to place the order.

The process starts when your customer tries to redeem his points, you will call Hold API instead of calling Order API to hold customer points and not directly deduct them from his pointsBalance.

  1. You should send with Hold API the following request body

{
   ....
   "amount":98.89,
   ....
}

Amount is the equivalent monetary value of the number of points your customer tried to redeem, so make sure you calculate the monetary value of the points before redeeming them.

Hold API will returns the following response :

{
   ....
   "holdReference":"ref_12343ds"
}

The holdReference is the reference ID that will be used when you want to release the hold on points and actually redeem them.

You should store holdReference as you will need it later to release the hold-on points and redeem them successfully.

  1. If your customer successfully completed the order and redeemedAmount is successfully deducted from totalPaid, then you will need to release the hold-on points by passing holdReference Id and call the Order API with passing the following request body :

{
  ...
  "redeemedAmount": null,
  "holdReference": "ref_12343ds",
  ...
}

After calling Hold API, the points will be hold for 10 minutes and if it was not released manually by you, the points will return to the customers points balance.

Important operations to consider

A. Reverse Transaction

Sometimes, you will need to cancel a cashback transaction, or to refund the redeemed points transaction, follow the below steps:

  1. While you are creating a payment reward or points redemption transaction, you will store the original transaction ID of your system on Gameball

B. Reverse Hold Transaction

You might need to reverse the held points during the 10 mins hold time. Follow the below steps:

  1. While holding points, a hold reference ID will be created for this hold transaction

use-case: redeem points at a custom redemption page

{
   .....
   "amount":100,
   .....
}

The Amount attribute is the monetary equivalent of your points in your system currency to be redeemed, so if .

Please note that you can use the same flow of holding points and redeeming them using Redeem API.

To apply points redemption on your order during checkout, we will use . Order API is a tailored API to support e-commerce, a precautionary step would be to validate the customer's balance as we covered in one of customers points balance .

For more information about redemption integration during checkout. Visit .

We will calculate the redeemedAmount, totalPrice and totalDiscount attributes after the customer redeem his point and pass it to the body request, if the user completed the purchase, the order API will be called with the updated attributes we mentioned.

You can reverse the cashback reward/points redemption transactions through

You can reverse the held points through

If you want to create a page on your online website/app and uses the Redeem instead of redeeming points directly at checkout page. You can use the to redeem points from the customer's wallet balance and create discount coupons on your system equivalent to the redeemed amount.

checkout Integration example
Order API
Reverse Hold Transaction API
tutorial
Order API
use-cases
Reverse Points Transactions API
Redeem API
Customer's points balance