Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.93 KB

calculate-loyalty-points-request.md

File metadata and controls

30 lines (21 loc) · 1.93 KB

Calculate Loyalty Points Request

Represents a CalculateLoyaltyPoints request.

Structure

Calculate Loyalty Points Request

Fields

Name Type Tags Description
order_id str Optional The order ID for which to calculate the points.
Specify this field if your application uses the Orders API to process orders.
Otherwise, specify the transaction_amount_money.
transaction_amount_money Money Optional Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
loyalty_account_id str Optional The ID of the target loyalty account. Optionally specify this field
if your application uses the Orders API to process orders.

If specified, the promotion_points field in the response shows the number of points the buyer would
earn from the purchase. In this case, Square uses the account ID to determine whether the promotion's
trigger_limit (the maximum number of times that a buyer can trigger the promotion) has been reached.
If not specified, the promotion_points field shows the number of points the purchase qualifies
for regardless of the trigger limit.
Constraints: Minimum Length: 1, Maximum Length: 36

Example (as JSON)

{
  "loyalty_account_id": "79b807d2-d786-46a9-933b-918028d7a8c5",
  "order_id": "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY",
  "transaction_amount_money": {
    "amount": 64,
    "currency": "KWD"
  }
}