v4.0 (Beta)

Hold Management

Control points with hold actions, letting you place, view, or release held points before redemption. Useful for reserving points until a transaction is confirmed.

Available APIs


POST - Hold Points

https://api.gameball.co/api/v4/integrations/transactions/hold

This API holds loyalty points for a specified duration, reserving them until a redemption request is made through Order or Redeem. If no redemption occurs within the hold period, the points are released. The default hold time is 10 minutes, adjustable in the Gameball dashboard, with a maximum of 15 days and a minimum of 1 minute.

Security: Requires apikey and secretkey headers.

Channel Merging Available If your system uses different customer IDs across multiple channels (e.g., online and offline), Gameball's channel merging feature helps unify customer profiles. By including the customer’s mobile number or email (based on your merging configuration) with each request, Gameball will combine activities into a single profile.For more information, head to the Channel Merging Guide.

Request

Body

application/json

customerId string Required Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.


email string Optional Customer's email address .

Note: This is required if your account uses email-based channel merging.


mobile string Optional Customer's mobile number.

Note: This is required if your account uses mobile-based channel merging.


transactionTime string Required The time of the transaction in your system (e.g., order datetime, invoice datetime).


otp string Optional A one-time password (OTP) sent to the customer for authentication purposes. This is used only if your account has OTP configuration enabled.

For more details on how the OTP is generated and validated, refer to the OTP Generation and Validation section.


ignoreOTP boolean Optional

This attribute allows you to skip OTP verification when set to true. If not provided or set to false, OTP verification will be required for accounts configured to use OTP.


amountToHold float Optional The monetary value (in the system's currency) that will be held from the customer’s points balance. This allows you to reserve a specific monetary amount using the customer's points.

Note: Only one of ruleId, amountToHold, or pointsToHold must be provided for the hold request to proceed.


pointsToHold integer Optional The number of points to be held from the customer’s points balance. This allows you to reserve a certain number of points for later use.

Note: Only one of ruleId, amountToHold, or pointsToHold must be provided for the hold request to proceed.


ruleId string Optional The ID of a redemption rule configured within Gameball’s system. Clients can create custom redemption rules through the Gameball dashboard to specify different redemption options. For example, a redemption rule may allow points to be redeemed for a free product, free shipping, percentage-based discounts, or fixed-amount discounts.

You can retrieve your configured redemption rules and their associated IDs by using the Redemption Configuration API.

Note: Only one of ruleId, amountToHold, or pointsToHold must be provided for the hold request to proceed.


hash string Optional A unique, rotating number generated for each customer, used as an additional layer of verification during redemptions. This number changes with each transaction to ensure secure validation.For more details on how the hash is generated and validated, refer to the Customer's Hash section.


Sample Request

{
  "customerId": "cust_abc12345xyz67890",              
  "transactionTime": "2024-10-11T16:15:15.071Z", 
  "otp": "654321",                          
  "amountToHold": null,                     
  "pointsToHold": 50,                       
  "ruleId": null,                          
  "hash": "7a8b9c10-11d3-4f8e-a423-768ee4e9f789"
}

Response

application/json

customerId string Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.


holdAmount number

The monetary value that has been held from the customer’s points balance. This value represents the amount reserved based on the customer’s available points.


holdEquivalentPoints number

The number of points that have been held from the customer’s points balance. These points are reserved for future use or specific transactions.


holdReference string

A unique identifier for the hold transaction. This reference is used to track and manage the held points for future actions, such as redeeming the held points or canceling the hold.


Sample Response

{
    "customerId": "cust_abc12345xyz67890",
    "holdAmount": "5",
    "holdEquivalentPoints": 50,
    "holdReference": "a2a199ad-86f3-45c4-8253-7aaee50e4798"
}

GET - Hold Details

https://api.gameball.co/api/v4/integrations/transactions/hold/{holdReferenceId}

This API retrieves the details of a specific hold in Gameball using holdReferenceId. It returns information on the amount of loyalty points held, their monetary value, the hold’s status (active, used, or expired), and the time remaining until expiration, supporting effective management and tracking of held points.

Security: Requires apikey and secretkey headers.

Request

Path Parameters

holdReferenceId string Required Unique identifier for the hold transaction, used to retrieve the details of the specific hold.


Response

application/json

customerId string Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.


holdAmount number The monetary value held from the customer’s points balance in this specific hold transaction. This is the amount that has been reserved and is associated with the holdReference provided.

Example: If a customer has reserved $50 worth of points, the holdAmount in the response would be 50, representing the monetary value currently held under the specified hold reference.


holdEquivalentPoints number The number of points held from the customer’s points balance for this specific hold transaction. This represents the exact quantity of points currently locked under the holdReference provided. Example: If the system has held 200 points from the customer’s balance, the holdEquivalentPoints in the response would be 200, indicating the points associated with the provided hold reference that are currently unavailable for redemption until further action is taken (e.g., redemption or expiration).


state string The current status of the hold:

  • Active : The hold is currently in effect and the points or amount are locked.

  • Expired : The hold has expired and the points or amount have been released.

  • Used : The hold has been used, meaning the points or amount have been redeemed.


dateToExpire datetime The date and time when the hold will expire. After this time, the hold reference will no longer be valid for usage.


Sample Response

{
    "customerId": "cust_abc12345xyz67890",
    "holdAmount": "2",
    "holdEquivalentPoints": 20,
    "state": "active",
    "dateToExpire": "2024-10-16T08:11:24.675401"
}

DELETE - Release Hold

https://api.gameball.co/api/v4/integrations/transactions/hold/{holdReferenceId}

This API cancels a specific hold on loyalty points in Gameball using the provided holdReferenceId. It releases the held points back into the customer’s account, enabling flexibility in point management.

Security: Requires apikey and secretkey headers.

Request

Path Parameters

holdReferenceId string Required Unique identifier for the hold transaction, used to release the held points or amount.


Last updated