---
title: "Order Points Breakdown"
method: GET
path: "/api/v4.0/integrations/orders/{orderId}/points-breakdown"
tags: ["Orders"]
---

# Order Points Breakdown

`GET /api/v4.0/integrations/orders/{orderId}/points-breakdown`

## Request

- Base URL: `https://api.gameball.co`
- URL: `https://api.gameball.co/api/v4.0/integrations/orders/{orderId}/points-breakdown`
- Auth: API key in header `apikey` and API key in header `secretkey`

Returns a line-by-line explanation of how a customer earned their points on a specific order: which items were eligible, the earning rate applied to each one, any campaign multiplier that boosted it, and how the per-item points add up to the total recorded on the order's earning transaction.

Use it to answer "why did I get these points?" in a receipt or order-details screen, and to reconcile a customer's balance against a specific purchase.

The breakdown is built from the order's **earning** transaction (`PaymentReward`). An order that never earned points — dropped, fully excluded, or not yet processed — returns `404`.

This endpoint is available on `v4.0` and `v4.1`.

**Security:** Requires both `apikey` and `secretkey` headers. The secret key is required on both versions, whether or not High Security Mode is enabled on the account.

**Localization:** Send the optional `lang` header to localize `tierName` and `items[].campaignName`.

## Path parameters

- `orderId` string, required

## Headers

- `lang` string

## Response `200`

Points breakdown retrieved successfully

- OrderPointsBreakdownResponse: Item-by-item explanation of the points earned on one order.
  - `transactionId` integer: Gameball's internal identifier for the earning transaction this breakdown explains.
  - `transactionType` string: Display name of the transaction type the breakdown was built from.
  - `isReversed` boolean: `true` when the transaction type is a deduction (a reversal) rather than an earning.
  - `earnedPoints` integer: The points actually recorded on the transaction. This is the authoritative total; `itemsExactTotal` explains it.
  - `pointsValue` number, nullable: Monetary value of the earned points, when the transaction recorded one.
  - `orderAmount` number, nullable: The order amount the reward was calculated on.
  - `currency` string, nullable: Currency of `orderAmount` and `pointsValue`.
  - `customerId` string: The customer's unique identifier in your system.
  - `tierName` string, nullable: The tier the customer was in when the order was rewarded, localized by the `lang` header when available.
  - `transactionTime` string, date-time: When the earning transaction was recorded.
  - `expiryDate` string, date-time, nullable: When these earned points expire, when points expiry is enabled.
  - `pointsBalanceBefore` integer: The customer's points balance immediately before this transaction.
  - `excludeTaxes` boolean: Whether taxes were excluded from the earning base for this order.
  - `excludeNonProductCosts` boolean: Whether shipping and other non-product costs were excluded from the earning base.
  - `usedCouponCodes` string[]: Coupon codes applied to the order.
  - `redeemedPoints` integer: Points the customer redeemed on this order. Redemption value is already folded into the line discounts, so it is reported at order level rather than attributed to any single line.
  - `redeemedAmount` number: Monetary value of the redeemed points.
  - `hasRedemption` boolean: `true` when the order included a redemption.
  - `items` object[]: Per-line breakdown. Empty when the order was recorded without line items.
    - `title` string: Product title as sent on the order line item.
    - `productId` string: Product identifier in your system, as sent on the order.
    - `sku` string, nullable: SKU taken from the stored order line item. `null` when the order did not carry a SKU for this product.
    - `quantity` number: Quantity purchased on this line. Defaults to `1` when the order did not specify one.
    - `eligible` boolean: Whether this line earned points. A line can be ineligible because it matched an exclusion rule or failed an inclusion rule.
    - `eligibilityMode` 'General' | 'Include' | 'Exclude' | 'Merchant' | 'Custom': Which earning-eligibility rule was evaluated for this line. **General** - no include/exclude list applies. **Include** - only listed products earn. **Exclude** - listed products are skipped. **Merchant** - merchant-scoped rule. **Custom** - a custom cashback rule.
    - `ineligibleReason` string, nullable: Human-readable reason the line earned nothing, built from the stored rule conditions. `null` when `eligible` is `true`.
    - `pricePerUnit` number: Unit price before the line discount (`lineSubtotal` divided by `quantity`).
    - `lineSubtotal` number: Line total before the discount was applied (`eligibleAmount` + `discount`).
    - `discount` number: Product discount applied to this line, which reduced the amount points were earned on.
    - `taxInDiscount` number: Portion of the discount attributable to tax.
    - `totalDiscount` number: `discount` + `taxInDiscount`.
    - `eligibleAmount` number: The money base points were actually calculated on for this line, after discounts and any tax or non-product exclusions.
    - `sourceKind` 'base' | 'level' | 'custom': Which earning rule supplied the base rate. **base** - the account's default earning rate. **level** - the customer's tier earning rate. **custom** - a custom cashback rule.
    - `sourceLabel` string: Display label for `sourceKind`, e.g. `Base rate`, `Gold earning rate`, `Custom rule`.
    - `ruleCondition` string, nullable: For a line that earned through a conditional custom rule, the condition it satisfied. `null` for plain base or tier rules, which apply to everything.
    - `rewardFactor` number: The points figure configured on the dashboard rule. In a rule reading "earn 5 points for every 10 spent", this is the 5.
    - `amountThreshold` number: The spend interval configured on the dashboard rule. In a rule reading "earn 5 points for every 10 spent", this is the 10. `baseRate` = `rewardFactor` / `amountThreshold`.
    - `baseRate` number: Points earned per single unit of currency spent, before any campaign multiplier. For "5 points per 10 spent" this is `0.5`.
    - `basePoints` number: `eligibleAmount` x `baseRate` - what the line would have earned with no campaign.
    - `hasCampaign` boolean: Whether a points-multiplier campaign boosted this line.
    - `campaignName` string, nullable: Name of the campaign that boosted the line, localized by the `lang` header when available. `null` when `hasCampaign` is `false`.
    - `campaignTierBand` string, nullable: The campaign tier the order fell into, rendered as a readable band (e.g. `100-500 SAR`, `201+ SAR`). `null` when the campaign has no tiers.
    - `campaignCondition` string, nullable: The campaign condition the order matched, so the multiplier is not unexplained. `null` when the campaign had no conditions.
    - `campaignMultiplier` number, nullable: The multiplier the campaign applied on top of `baseRate`. `null` when `hasCampaign` is `false`.
    - `effectiveRate` number: `baseRate` x `campaignMultiplier` - the rate actually used for this line.
    - `itemPoints` number: Points this line contributed. `0` for ineligible lines. Campaign lines are floored to whole points per line; non-campaign lines stay fractional and are floored once at the order level.
    - `roundedPerLine` boolean: `true` when this campaign line lost a fraction of a point to per-line flooring.
  - `itemsExactTotal` number: Exact, unrounded sum of `items[].itemPoints` for eligible lines. Compare against `earnedPoints` to see rounding.
  - `roundedDownAtOrderLevel` boolean: `true` when a non-campaign order lost a sub-point fraction to flooring at the order total.
  - `roundedDownAmount` number: The fraction of a point dropped by order-level flooring. `0` when nothing was dropped.
  - `reconciles` boolean: `true` when `itemsExactTotal` explains `earnedPoints` (within one point). `false` means the stored line items do not fully account for the recorded total.
  - `hasItemBreakdown` boolean: `false` when the order was recorded without line items, in which case `items` is empty and only the order-level figures are meaningful.

## Other responses

- `400`: The `orderId` path parameter is missing or empty.
- `401`: Missing or invalid API key or secret key.
- `404`: No points-earning transaction exists for this order id. The order was never tracked, was dropped, earned nothing, or has not finished processing yet.
- `500`: Internal server error.

## Changes

- **2026-09-08** `06c9e503f363`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gameballers/apis/gameball-api/changes/api/v4.0/integrations/orders/:orderId/points-breakdown/get.md)

---

[API](https://skmtc.dev/gameballers/apis/gameball-api.md) - [All operations](https://skmtc.dev/gameballers/apis/gameball-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gameballers/apis/gameball-api/revisions/2d0ad7b650ca?raw)
