> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gameball.co/llms.txt
> Use this file to discover all available pages before exploring further.

# How Do I Track Orders and Reward Cashback with the Web SDK (v4)?

> Track your customer's orders for cashback and achievements

Start tracking customer's orders on your platform upon order completion and successful payment. This enables rewarding the customer with cashback wallet points for paid amounts as per your cashback program configuration on Gameball.

## Order Tracking Overview

> [card] Server-Side Order API
>
> Tailored API to support e-commerce platforms for order tracking and cashback rewards

> [card] Cashback API
>
> Use for scenarios other than e-commerce order placement to reward customers with cashback wallet points

## When to Use Each API

### Order API

Use the [Order API](https://docs.gameball.co/api-reference/order/order.md) when you want to track e-commerce orders and automatically calculate cashback rewards based on your configured program settings.

### Cashback API

Use the [Cashback API](https://docs.gameball.co/api-reference/transactions/cashback-and-redemptions/cashback.md) for custom scenarios where you want to manually award cashback points outside of standard order processing.

## Implementation Flow

**1. Order Completion**

Customer completes an order and payment is successful

**2. Send Order Data**

Send order information to Gameball via Order API or Cashback API

**3. Calculate Rewards**

Gameball calculates cashback points based on your program configuration

**4. Award Points**

Cashback wallet points are automatically awarded to the customer

**5. Update Profile**

Customer's loyalty profile is updated with new points and achievements

## Order API Integration

The Order API is specifically designed for e-commerce platforms to track orders and automatically handle cashback rewards.

> [!NOTE]
>
> For detailed implementation examples, refer to the [Submitting Orders tutorial](https://docs.gameball.co/tutorials/experiences/order-handling/submit-order.md) and [Previewing Potential Points Before Purchase](https://docs.gameball.co/tutorials/experiences/order-handling/preview-points.md).

## Cashback API Integration

The Cashback API allows you to manually award cashback points for custom scenarios beyond standard order processing.

> [!NOTE]
>
> For detailed cashback implementation, refer to the [Transactions API Reference](https://docs.gameball.co/api-reference/transactions/cashback-and-redemptions/cashback.md).

## Best Practices

**1. Track After Payment**

Only track orders after successful payment to ensure accurate cashback rewards

**2. Include Complete Order Data**

Send comprehensive order information including items, amounts, and customer details

**3. Handle Errors Gracefully**

Implement proper error handling for failed API calls

**4. Test Cashback Calculations**

Verify that cashback calculations match your program configuration

## Related Resources

* [Order API Reference](https://docs.gameball.co/api-reference/order/order.md)
* [Order Tracking](https://docs.gameball.co/api-reference/order/order-tracking.md)
* [Calculate Order Cashback](https://docs.gameball.co/api-reference/order/calculate-order-cashback.md)
* [Cashback API Reference](https://docs.gameball.co/api-reference/transactions/cashback-and-redemptions/cashback.md)
* [Submitting Orders Tutorial](https://docs.gameball.co/tutorials/experiences/order-handling/submit-order.md)
* [Previewing Potential Points Before Purchase](https://docs.gameball.co/tutorials/experiences/order-handling/preview-points.md)

## Next Steps

* [Integrate Redemption](https://docs.gameball.co/installation-guides/v4/web/integrate-redemption.md)
* [Track Referrals](https://docs.gameball.co/installation-guides/v4/web/track-referrals.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.