Adds points earned from a purchase to a loyalty account.
POST
/v2/loyalty/accounts/{account_id}/accumulate
Adds points earned from a purchase to a loyalty account.
If you are using the Orders API to manage orders, provide the order_id
. Square reads the order to compute the points earned from both the base loyalty program and an associated loyalty promotion. For purchases that qualify for multiple accrual rules, Square computes points based on the accrual rule that grants the most points. For purchases that qualify for multiple promotions, Square computes points based on the most recently created promotion. A purchase must first qualify for program points to be eligible for promotion points.
If you are not using the Orders API to manage orders, provide points
with the number of points to add. You must first perform a client-side computation of the points earned from the loyalty program and loyalty promotion. For spend-based and visit-based programs, you can call CalculateLoyaltyPoints to compute the points earned from the base loyalty program. For information about computing points earned from a loyalty promotion, see Calculating promotion points.
The ID of the target loyalty account.
The points to add to the account. If you are using the Orders API to manage orders, specify the order ID. Otherwise, specify the points to add.
A unique string that identifies the AccumulateLoyaltyPoints
request. Keys can be any valid string but must be unique for every request.
The location where the purchase was made.
The resulting loyalty event. Starting in Square version 2022-08-17, this field is no longer returned.