v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
Loyalty

AdjustLoyaltyPoints

Adds points to or subtracts points from a buyer's account.

Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call AccumulateLoyaltyPoints to add points when a buyer pays for the purchase.

post/v2/loyalty/accounts/{account_id}/adjust

Path parameters

account_idstring required

The ID of the target loyalty account.

Request body

idempotency_keystring required

A unique string that identifies this AdjustLoyaltyPoints request. Keys can be any valid string, but must be unique for every request.

allow_negative_balanceboolean nullable

Indicates whether to allow a negative adjustment to result in a negative balance. If true, a negative balance is allowed when subtracting points. If false, Square returns a BAD_REQUEST error when subtracting the specified number of points would result in a negative balance. The default value is false.

Example request

{
  "adjust_points": {
    "points": 10,
    "reason": "Complimentary points"
  },
  "idempotency_key": "bc29a517-3dc9-450e-aa76-fae39ee849d1"
}

Response

Success

Example response

{
  "event": {
    "adjust_points": {
      "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd",
      "points": 10,
      "reason": "Complimentary points"
    },
    "created_at": "2020-05-08T21:42:32Z",
    "id": "613a6fca-8d67-39d0-bad2-3b4bc45c8637",
    "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd",
    "source": "LOYALTY_API",
    "type": "ADJUST_POINTS"
  }
}