Represents an action performed on a gift card that affects its state or balance.
A gift card activity contains information about a specific activity type. For example, a REDEEM
activity
includes a redeem_activity_details
field that contains information about the redemption.
GiftCardActivity
Name | Type | Tags | Description |
---|---|---|---|
id |
string | undefined |
Optional | The Square-assigned ID of the gift card activity. |
type |
string |
Required | Indicates the type of gift card activity. |
locationId |
string |
Required | The ID of the business location where the activity occurred. |
createdAt |
string | undefined |
Optional | The timestamp when the gift card activity was created, in RFC 3339 format. |
giftCardId |
string | undefined |
Optional | The gift card ID. When creating a gift card activity, gift_card_id is not required ifgift_card_gan is specified. |
giftCardGan |
string | undefined |
Optional | The gift card account number (GAN). When creating a gift card activity, gift_card_gan is not required if gift_card_id is specified. |
giftCardBalanceMoney |
Money | undefined |
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. |
loadActivityDetails |
GiftCardActivityLoad | undefined |
Optional | Represents details about a LOAD gift card activity type. |
activateActivityDetails |
GiftCardActivityActivate | undefined |
Optional | Represents details about an ACTIVATE gift card activity type. |
redeemActivityDetails |
GiftCardActivityRedeem | undefined |
Optional | Represents details about a REDEEM gift card activity type. |
clearBalanceActivityDetails |
GiftCardActivityClearBalance | undefined |
Optional | Represents details about a CLEAR_BALANCE gift card activity type. |
deactivateActivityDetails |
GiftCardActivityDeactivate | undefined |
Optional | Represents details about a DEACTIVATE gift card activity type. |
adjustIncrementActivityDetails |
GiftCardActivityAdjustIncrement | undefined |
Optional | Represents details about an ADJUST_INCREMENT gift card activity type. |
adjustDecrementActivityDetails |
GiftCardActivityAdjustDecrement | undefined |
Optional | Represents details about an ADJUST_DECREMENT gift card activity type. |
refundActivityDetails |
GiftCardActivityRefund | undefined |
Optional | Represents details about a REFUND gift card activity type. |
unlinkedActivityRefundActivityDetails |
GiftCardActivityUnlinkedActivityRefund | undefined |
Optional | Represents details about an UNLINKED_ACTIVITY_REFUND gift card activity type. |
importActivityDetails |
GiftCardActivityImport | undefined |
Optional | Represents details about an IMPORT gift card activity type.This activity type is used when Square imports a third-party gift card, in which case the gan_source of the gift card is set to OTHER . |
blockActivityDetails |
GiftCardActivityBlock | undefined |
Optional | Represents details about a BLOCK gift card activity type. |
unblockActivityDetails |
GiftCardActivityUnblock | undefined |
Optional | Represents details about an UNBLOCK gift card activity type. |
importReversalActivityDetails |
GiftCardActivityImportReversal | undefined |
Optional | Represents details about an IMPORT_REVERSAL gift card activity type. |
{
"type": "ADJUST_INCREMENT",
"location_id": "location_id4",
"gift_card_id": null,
"gift_card_gan": null,
"gift_card_balance_money": null,
"load_activity_details": null,
"activate_activity_details": null,
"redeem_activity_details": null,
"clear_balance_activity_details": null,
"deactivate_activity_details": null,
"adjust_increment_activity_details": null,
"adjust_decrement_activity_details": null,
"refund_activity_details": null,
"unlinked_activity_refund_activity_details": null,
"import_activity_details": null,
"block_activity_details": null,
"unblock_activity_details": null,
"import_reversal_activity_details": null
}