Send Order Data & Trigger Cashback
Use the iOS SDK to send paid order information to Gameball.This enables automatic cashback rewards, order-based earning rules, and post-purchase loyalty actions. Gameball supports both:
- Track Order API (for products & carts)
- Track Payment API (for service-based businesses without line items)
The iOS SDK internally wraps the Track Order API and sends validated order payloads to Gameball.
Basic Usage
Send order details usingOrderRequest and sendOrder.
Order Parameters
Unique identifier for the order.
The identifier of the customer placing the order.
Total order value after discounts and before loyalty redemption.
Currency code (e.g.,
"USD", "EUR", "SAR").Order status:
"paid", "pending", "cancelled", "refunded".Optional list of products in the order.
Required for businesses using collection-based earning rules.
Required for businesses using collection-based earning rules.
Optional override session token for this request.
Order with Line Items
Use line items when you want:- Product-based earning rules
- Category conditions
- Collection-based cashback
- Better reporting visibility
Cashback Rewards
Gameball will automatically calculate cashback based on the cashback rules configured in your dashboard.Earn Cashback
Customers earn cashback based on your reward program and order amount.
Automatic Posting
Cashback is applied to the customer’s wallet immediately once the order is tracked.
For advanced use cases, server-side integrations, or POS systems, you can use the
Track Order API and Track Payment API.The iOS SDK’s
Track Order API and Track Payment API.The iOS SDK’s
sendOrder() method directly wraps the Track Order API.Best Practices
1
Send Only Paid Orders
Ensure payment is confirmed before sending orders to prevent incorrect cashback.
2
Use Line Items When Possible
This enables category-based earning rules, product-level reporting, and richer customer insights.
3
Include Accurate Currency Codes
Loyalty calculations depend on the correct currency context.
4
Track Refunds Through Refund APIs
Cashback reversals must use the official refund endpoints, not order tracking.