Add Manual Transaction
Add manual point adjustments to customer accounts.
Add Manual Transaction
This API allows for the manual addition or deduction of points for a customer in Gameball. It provides flexibility in managing loyalty points, enabling adjustments based on specific needs or circumstances. This endpoint is also available onv4.1.
apikey and secretkey headers.Custom Points Expiry
UseexpiryAfter to set a custom expiry period for points added through a manual transaction. The value is the number of days after which the added points expire, counted from the time the points are credited. For example, 30 means the awarded points expire 30 days from the time of the addition.
When expiryAfter is omitted, sent as null, or sent as 0, the points follow the client’s default points-expiry setting configured in the dashboard. This matches the custom expiry option available when manually adding points from the Gameball dashboard.
Validation
| Condition | Result |
|---|---|
expiryAfter is negative | 400 - Expiry cannot be negative |
expiryAfter is provided on a deduction, such as negative points or amount | 400 - Deduction cannot have expiry |
Both points and amount are provided | 400 - Only one rewarding method may be specified |
Neither points nor amount is provided | 400 - A rewarding criteria is required |
Example: Add Points With Custom Expiry
500 points that expire 30 days from the time of the addition.
Example: Use the Client Default Expiry
expiryAfter is omitted, so the credited points follow the client’s default points-expiry configuration.Body
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.
"cust_abc12345xyz67890"
A unique identifier for a transaction in your system (e.g., order number or invoice number). This ID can be used to reverse, cancel, or refund any reward or redemption transactions in Gameball.
"txn543211"
The username of the admin performing the manual transaction.
"admin_user"
Reason for manually rewarding or deducting points (e.g., 'Referral bonus').
"Referral bonus"
Customer's email address. This is required if your account uses email-based channel merging.
"john.doe@example.com"
Customer's mobile number. This is required if your account uses mobile-based channel merging.
"+1234567890"
The time of the transaction in your system (e.g., order datetime, invoice datetime). Defaults to the current time in UTC when omitted.
"2024-10-11T15:54:10.944Z"
The number of points to be rewarded or deducted. Provide either points or amount. Positive values add points, and negative values deduct points.
50
The monetary value, in system currency, associated with the transaction. Provide either points or amount. Positive values add points, and negative values deduct points.
0
The number of days after which the points added in this transaction will expire, counted from the time of the addition. For example, 30 means the awarded points expire 30 days from now. When omitted, null, or 0, the points follow the client's default points-expiry setting configured in the dashboard. This replicates the custom-expiry option available when manually adding points from the Gameball dashboard. expiryAfter applies only to point additions; it cannot be used when deducting points.
x >= 030
Response
Manual transaction added successfully
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.
"cust_abc12345xyz67890"
The unique identifier for the transaction within Gameball.
11035201
A unique identifier for a transaction in your system (e.g., order number or invoice number). This ID can be used to reverse, cancel, or refund any reward or redemption transactions in Gameball.
"txn54321221"
The number of points rewarded or deducted in the transaction.
50
The monetary value processed in the transaction.
5