OrderDiscounts
Returns all discounts applied to a specific Square order, including fixed and percentage-based discounts, their scope, and related catalog details.
Table Specific Information
Select
The connector uses the Square API to process search criteria that refer to the OrderId and LocationId, while other filters are processed client side within the connector.
Retrieve all the OrderDiscounts found in every order of your Square account.
SELECT * FROM OrderDiscounts
You can retrieve all order OrderDiscounts from an order by specifying the OrderId.
SELECT * FROM OrderDiscounts WHERE OrderId = 'TzratjkPk9rhOuLYvSXeznmVvIx5PVlZpg72GfPQGBxckDeeWNBN8yqnf11qTrg3W3AelXC1kB'
You can also use the IN operator to specify multiple OrderIds in the WHERE clause.
SELECT * FROM OrderDiscounts WHERE OrderId IN ('XKKB7LD30TpfNyW3e843ziklKh4vWEvweQyL5l4ESJLH3N2XXNBN8yqnf11qTrg3W3AelXC1kB', 'pxICohrEXPDtoUitiZhG1um5uhp5WI7CRMHknbuKpaj53PXfWNBN8yqnf11qTrg3W3AelXC1kB', '6j8avtXB5fIaPZ9H12beiZP7sCSiqguGhHpwmECsEaENswJnWNBN8yqnf11qTrg3W3AelXC1kB')
Columns
| Name | Type | Description |
| Id | String | A unique Id that identifies the discount only within this order. |
| LocationId | String | Id of the seller location where the order was placed. |
| AppliedAmount | Integer | Actual monetary amount of the discount applied to the order or line item, expressed in the smallest currency unit (for example, cents). |
| AppliedCurrency | String | The type of currency, in ISO 4217 format. |
| AmountMoneyAmount | Integer | Declared fixed amount for the discount in the smallest currency unit. Not set for percentage-based discounts. |
| AmountMoneyCurrency | String | The type of currency, in ISO 4217 format. |
| Name | String | Display name of the discount, as shown in receipts, invoices, or customer‑facing order summaries. |
| Percentage | String | The percentage of the discount. |
| Scope | String | Indicates the level at which the discount applies.
The allowed values are OTHER_DISCOUNT_SCOPE, LINE_ITEM, ORDER. |
| Type | String | The type of discount.
The allowed values are UNKNOWN_DISCOUNT, FIXED_PERCENTAGE, FIXED_AMOUNT, VARIABLE_PERCENTAGE, VARIABLE_AMOUNT. |
| CatalogObjectId | String | Identifier of the catalog discount object associated with this discount, if applicable. |
| CatalogVersion | Int64 | The version of the catalog object that this discount references. |
| OrderId | String | Unique identifier of the order that the discount is associated with. |