Skip to content

Award stamps

awardStamps(customerId, stamps, comment, internalComment)

Section titled “awardStamps(customerId, stamps, comment, internalComment)”

Adds stamps to a customer’s balance and records a loyalty activity. Use this for positive awards (e.g. a bonus). To deduct or make arbitrary corrections, use adjustStamps instead.

NameTypeRequiredDescription
customerIdID!YesThe Shopify customer ID.
stampsInt!YesNumber of stamps to award (must be ≥ 1).
commentStringNoCustomer-visible note shown on the activity. Defaults to the store’s branded manual adjustment label.
internalCommentStringNoStaff-only note, not shown to the customer. Defaults to “API adjustment”.

Returns a non-null StampResult describing the applied change and the resulting balance.

FieldTypeDescription
customerIdID!The affected customer’s ID.
stampChangeInt!The stamp change applied.
stampBalanceInt!Resulting stamp balance.
mutation {
awardStamps(customerId: "6677889900", stamps: 5, comment: "Birthday bonus", internalComment: "Awarded via API") {
customerId
stampChange
stampBalance
}
}
{
"data": {
"awardStamps": {
"customerId": "6677889900",
"stampChange": 5,
"stampBalance": 40
}
}
}