Development
  • Guides
  • API Reference
  • API Explorer
  • SDKs
  • Sample apps
  • System status
Support
  • Developer forums
  • Developer blog
  • YouTube
  • X
More
  • Square Home
  • Square Developer
  • App Marketplace
  • Partner with Square
  • Solutions Partner Program
  • Pricing
  • Sales

© 2026 Square, Inc.

  • Developer terms of service
  • Developer Integration and Marketing Agreement
  • Privacy policy
  • Partnerships
  • Sign In
  • Sign In

    Loyalty

  • Create loyalty account

  • Search loyalty accounts

  • Retrieve loyalty account

  • Accumulate loyalty points

  • Adjust loyalty points

  • Search loyalty events

  • Retrieve loyalty program

  • Calculate loyalty points

  • List loyalty promotions

  • Create loyalty promotion

  • Retrieve loyalty promotion

  • Cancel loyalty promotion

  • Create loyalty reward

  • Search loyalty rewards

  • Delete loyalty reward

  • Retrieve loyalty reward

  • Redeem loyalty reward

  • Webhooks

  • loyalty.account.created

  • loyalty.account.deleted

  • loyalty.account.updated

  • loyalty.event.created

  • loyalty.program.created

  • loyalty.program.updated

  • loyalty.promotion.created

  • loyalty.promotion.updated

<- Loyalty API

Loyalty API

All versions ->

Calculate loyalty points

POST

 /v2/loyalty/programs/{program_id}/calculate

Calculates the number of points a buyer can earn from a purchase.

Applications might call this endpoint to display the points to the buyer.

  • If you are using the Orders API to manage orders, provide the order_id and (optional) loyalty_account_id. Square reads the order to compute the points earned from the base loyalty program and an associated loyalty promotion.

  • If you are not using the Orders API to manage orders, provide transaction_amount_money with the purchase amount. Square uses this amount to calculate the points earned from the base loyalty program, but not points earned from a loyalty promotion. For spend-based and visit-based programs, the tax_mode setting of the accrual rule indicates how taxes should be treated for loyalty points accrual. If the purchase qualifies for program points, call ListLoyaltyPromotions and perform a client-side computation to calculate whether the purchase also qualifies for promotion points. For more information, see Calculating promotion points.

Permissions:LOYALTY_READ

Guide

Calculate loyalty points

Try in API Explorer
Link to section

Path parameters

Example code

Link to section

program_id

string

Required

The ID of the loyalty program, which defines the rules for accruing points.

Link to section

Request body

Link to section

order_id

string

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.

Link to section

transaction_amount_money

The purchase amount for which to calculate the points. Specify this field if your application does not use the Orders API to process orders. Otherwise, specify the order_id.

Link to section

loyalty_account_id

string

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.

Min Length
1
Max Length
36
Link to section

Response fields

Link to section

errors

Any errors that occurred during the request.

Link to section

points

integer(32-bit)

The number of points that the buyer can earn from the base loyalty program.

Link to section

promotion_points

integer(32-bit)

The number of points that the buyer can earn from a loyalty promotion. To be eligible to earn promotion points, the purchase must first qualify for program points. When order_id is not provided in the request, this value is always 0.

Link to section

Examples

All versions ->

POST /v2/loyalty/programs/{program_id}/calculate
curl https://connect.squareup.com/v2/loyalty/programs/d619f755-2d17-41f3-990d-c04ecedd64dd/calculate \ -X POST \ -H 'Square-Version: 2026-11-18' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "order_id": "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY", "loyalty_account_id": "79b807d2-d786-46a9-933b-918028d7a8c5" }'

Response JSON

{ "points": 6, "promotion_points": 12 }