action squareup_create_gift_card_activity { label: "CreateGiftCardActivity" description: "Creates a gift card activity. For more information, see \n[GiftCardActivity](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#giftcardactivity) and \n[Using activated gift cards](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#using-activated-gift-cards)." provider: squareup method: POST path: "/v2/gift-cards/activities" encoding: json input: { type: "object" description: "A request to create a gift card activity." required: ["gift_card_activity", "idempotency_key"] properties: { gift_card_activity: { type: "object" description: "Represents an action performed on a gift card that affects its state or balance." required: ["location_id", "type"] properties: { activate_activity_details: { type: "object" description: "Describes a gift card activity of the ACTIVATE type." properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } buyer_payment_instrument_ids: { type: "array" description: "Required if your application does not use the Square Orders API. \nThis is a list of client-provided payment instrument IDs. \nSquare uses this information to perform compliance checks.\nIf you use the Square Orders API, Square has the necessary instrument IDs to perform necessary \ncompliance checks." items: { type: "string" } } line_item_uid: { type: "string" description: "The `line_item_uid` of the gift card line item in an order. \nThis is required if your application uses the Square Orders API." } order_id: { type: "string" description: "The ID of the order associated with the activity. \nThis is required if your application uses the Square Orders API." } reference_id: { type: "string" description: "If your application does not use the Square Orders API, you can optionally use this field \nto associate the gift card activity with a client-side entity." } } } adjust_decrement_activity_details: { type: "object" description: "Describes a gift card activity of the ADJUST_DECREMENT type." required: ["amount_money", "reason"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } reason: { type: "object" } } } adjust_increment_activity_details: { type: "object" description: "Describes a gift card activity of the ADJUST_INCREMENT type." required: ["amount_money", "reason"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } reason: { type: "object" } } } block_activity_details: { type: "object" description: "Describes a gift card activity of the BLOCK type." required: ["reason"] properties: { reason: { type: "object" } } } clear_balance_activity_details: { type: "object" description: "Describes a gift card activity of the CLEAR_BALANCE type." required: ["reason"] properties: { reason: { type: "object" } } } created_at: { type: "string" description: "The timestamp when the gift card activity was created, in RFC 3339 format." } deactivate_activity_details: { type: "object" description: "Describes a gift card activity of the DEACTIVATE type." required: ["reason"] properties: { reason: { type: "object" } } } gift_card_balance_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } gift_card_gan: { type: "string" description: "The gift card GAN. The GAN is not required if `gift_card_id` is present." } gift_card_id: { type: "string" description: "The gift card ID. The ID is not required if a GAN is present." } id: { type: "string" description: "The unique ID of the gift card activity." } import_activity_details: { type: "object" description: "Describes a gift card activity of the IMPORT type and the `GiftCardGANSource` is OTHER \n(a third-party gift card)." required: ["amount_money"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } } } import_reversal_activity_details: { type: "object" description: "Present only when GiftCardActivityType is IMPORT_REVERSAL and GiftCardGANSource is OTHER" required: ["amount_money"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } } } load_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is LOAD." properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } buyer_payment_instrument_ids: { type: "array" description: "If you are not using the Orders API, this field is required because it is used to identify a buyer \nto perform compliance checks." items: { type: "string" } } line_item_uid: { type: "string" description: "The `line_item_uid` of the gift card’s line item in the order associated with the activity.\nIt is populated along with `order_id` and is required if using the Square Orders API." } order_id: { type: "string" description: "The `order_id` of the order associated with the activity.\nIt is populated along with `line_item_uid` and is required if using the Square Orders API." } reference_id: { type: "string" description: "A client-specified ID to associate an entity, in another system, with this gift card\nactivity. This can be used to track the order or payment related information when the Square Orders\nAPI is not being used." } } } location_id: { type: "string" description: "The ID of the location at which the activity occurred." } redeem_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is REDEEM." required: ["amount_money"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } payment_id: { type: "string" description: "When the Square Payments API is used, Redeem is not called on the Gift Cards API.\nHowever, when Square reads a Redeem activity from the Gift Cards API, developers need to know the\nassociated `payment_id`." } reference_id: { type: "string" description: "A client-specified ID to associate an entity, in another system, with this gift card\nactivity. This can be used to track the order or payment related information when the Square Orders\nAPI is not being used." } } } refund_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is REFUND." required: ["redeem_activity_id"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } payment_id: { type: "string" description: "When the Square Payments API is used, Refund is not called on the Gift Cards API.\nHowever, when Square reads a Refund activity from the Gift Cards API, the developer needs to know the\nID of the payment (made using this gift card) that is being refunded." } redeem_activity_id: { type: "string" description: "The ID for the Redeem activity that needs to be refunded. Hence, the activity it\nrefers to has to be of the REDEEM type." } reference_id: { type: "string" description: "A client-specified ID to associate an entity, in another system, with this gift card\nactivity. This can be used to track the order or payment related information when the Square Orders\nAPI is not being used." } } } type: { type: "object" } unblock_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is UNBLOCK." required: ["reason"] properties: { reason: { type: "object" } } } unlinked_activity_refund_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is UNLINKED_ACTIVITY_REFUND." required: ["amount_money"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } payment_id: { type: "string" description: "When using the Square Payments API, the ID of the payment that was refunded to this gift\ncard." } reference_id: { type: "string" description: "A client-specified ID to associate an entity, in another system, with this gift card\nactivity. This can be used to track the order or payment related information when the Square Payments\nAPI is not being used." } } } } } idempotency_key: { type: "string" description: "A unique string that identifies the `CreateGiftCardActivity` request." } } } output: { type: "object" description: "A response that contains a `GiftCardActivity` that was created.\nThe response might contain a set of `Error` objects if the request resulted in errors." properties: { errors: { type: "array" description: "Any errors that occurred during the request." items: { type: "object" description: "Represents an error encountered during a request to the Connect API.\n\nSee [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information." required: ["category", "code"] properties: { category: { type: "string" description: "The high-level category for the error." } code: { type: "string" description: "The specific code of the error." } detail: { type: "string" description: "A human-readable description of the error for debugging purposes." } field: { type: "string" description: "The name of the field provided in the original request (if any) that\nthe error pertains to." } } } } gift_card_activity: { type: "object" description: "Represents an action performed on a gift card that affects its state or balance." required: ["location_id", "type"] properties: { activate_activity_details: { type: "object" description: "Describes a gift card activity of the ACTIVATE type." properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } buyer_payment_instrument_ids: { type: "array" description: "Required if your application does not use the Square Orders API. \nThis is a list of client-provided payment instrument IDs. \nSquare uses this information to perform compliance checks.\nIf you use the Square Orders API, Square has the necessary instrument IDs to perform necessary \ncompliance checks." items: { type: "string" } } line_item_uid: { type: "string" description: "The `line_item_uid` of the gift card line item in an order. \nThis is required if your application uses the Square Orders API." } order_id: { type: "string" description: "The ID of the order associated with the activity. \nThis is required if your application uses the Square Orders API." } reference_id: { type: "string" description: "If your application does not use the Square Orders API, you can optionally use this field \nto associate the gift card activity with a client-side entity." } } } adjust_decrement_activity_details: { type: "object" description: "Describes a gift card activity of the ADJUST_DECREMENT type." required: ["amount_money", "reason"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } reason: { type: "object" } } } adjust_increment_activity_details: { type: "object" description: "Describes a gift card activity of the ADJUST_INCREMENT type." required: ["amount_money", "reason"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } reason: { type: "object" } } } block_activity_details: { type: "object" description: "Describes a gift card activity of the BLOCK type." required: ["reason"] properties: { reason: { type: "object" } } } clear_balance_activity_details: { type: "object" description: "Describes a gift card activity of the CLEAR_BALANCE type." required: ["reason"] properties: { reason: { type: "object" } } } created_at: { type: "string" description: "The timestamp when the gift card activity was created, in RFC 3339 format." } deactivate_activity_details: { type: "object" description: "Describes a gift card activity of the DEACTIVATE type." required: ["reason"] properties: { reason: { type: "object" } } } gift_card_balance_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } gift_card_gan: { type: "string" description: "The gift card GAN. The GAN is not required if `gift_card_id` is present." } gift_card_id: { type: "string" description: "The gift card ID. The ID is not required if a GAN is present." } id: { type: "string" description: "The unique ID of the gift card activity." } import_activity_details: { type: "object" description: "Describes a gift card activity of the IMPORT type and the `GiftCardGANSource` is OTHER \n(a third-party gift card)." required: ["amount_money"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } } } import_reversal_activity_details: { type: "object" description: "Present only when GiftCardActivityType is IMPORT_REVERSAL and GiftCardGANSource is OTHER" required: ["amount_money"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } } } load_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is LOAD." properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } buyer_payment_instrument_ids: { type: "array" description: "If you are not using the Orders API, this field is required because it is used to identify a buyer \nto perform compliance checks." items: { type: "string" } } line_item_uid: { type: "string" description: "The `line_item_uid` of the gift card’s line item in the order associated with the activity.\nIt is populated along with `order_id` and is required if using the Square Orders API." } order_id: { type: "string" description: "The `order_id` of the order associated with the activity.\nIt is populated along with `line_item_uid` and is required if using the Square Orders API." } reference_id: { type: "string" description: "A client-specified ID to associate an entity, in another system, with this gift card\nactivity. This can be used to track the order or payment related information when the Square Orders\nAPI is not being used." } } } location_id: { type: "string" description: "The ID of the location at which the activity occurred." } redeem_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is REDEEM." required: ["amount_money"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } payment_id: { type: "string" description: "When the Square Payments API is used, Redeem is not called on the Gift Cards API.\nHowever, when Square reads a Redeem activity from the Gift Cards API, developers need to know the\nassociated `payment_id`." } reference_id: { type: "string" description: "A client-specified ID to associate an entity, in another system, with this gift card\nactivity. This can be used to track the order or payment related information when the Square Orders\nAPI is not being used." } } } refund_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is REFUND." required: ["redeem_activity_id"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } payment_id: { type: "string" description: "When the Square Payments API is used, Refund is not called on the Gift Cards API.\nHowever, when Square reads a Refund activity from the Gift Cards API, the developer needs to know the\nID of the payment (made using this gift card) that is being refunded." } redeem_activity_id: { type: "string" description: "The ID for the Redeem activity that needs to be refunded. Hence, the activity it\nrefers to has to be of the REDEEM type." } reference_id: { type: "string" description: "A client-specified ID to associate an entity, in another system, with this gift card\nactivity. This can be used to track the order or payment related information when the Square Orders\nAPI is not being used." } } } type: { type: "object" } unblock_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is UNBLOCK." required: ["reason"] properties: { reason: { type: "object" } } } unlinked_activity_refund_activity_details: { type: "object" description: "Present only when `GiftCardActivityType` is UNLINKED_ACTIVITY_REFUND." required: ["amount_money"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } payment_id: { type: "string" description: "When using the Square Payments API, the ID of the payment that was refunded to this gift\ncard." } reference_id: { type: "string" description: "A client-specified ID to associate an entity, in another system, with this gift card\nactivity. This can be used to track the order or payment related information when the Square Payments\nAPI is not being used." } } } } } } } }