POST /v2/gift-cards/activities

Creates a gift card activity. For more information, see GiftCardActivity and Using activated gift cards.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
gift_card_activity Object Yes

Represents an action performed on a gift card that affects its state or balance.

gift_card_activity.adjust_decrement_activity_details Object No

Describes a gift card activity of the ADJUST_DECREMENT type.

gift_card_activity.adjust_decrement_activity_details.reason Yes
gift_card_activity.adjust_decrement_activity_details.amount_money Object Yes

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.

gift_card_activity.adjust_decrement_activity_details.amount_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.adjust_decrement_activity_details.amount_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.deactivate_activity_details Object No

Describes a gift card activity of the DEACTIVATE type.

gift_card_activity.deactivate_activity_details.reason Yes
gift_card_activity.block_activity_details Object No

Describes a gift card activity of the BLOCK type.

gift_card_activity.block_activity_details.reason Yes
gift_card_activity.clear_balance_activity_details Object No

Describes a gift card activity of the CLEAR_BALANCE type.

gift_card_activity.clear_balance_activity_details.reason Yes
gift_card_activity.gift_card_balance_money Object No

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.

gift_card_activity.gift_card_balance_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.gift_card_balance_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.import_reversal_activity_details Object No

Present only when GiftCardActivityType is IMPORT_REVERSAL and GiftCardGANSource is OTHER

gift_card_activity.import_reversal_activity_details.amount_money Object Yes

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.

gift_card_activity.import_reversal_activity_details.amount_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.import_reversal_activity_details.amount_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.gift_card_gan String No

The gift card GAN. The GAN is not required if gift_card_id is present.

gift_card_activity.redeem_activity_details Object No

Present only when GiftCardActivityType is REDEEM.

gift_card_activity.redeem_activity_details.payment_id String No

When the Square Payments API is used, Redeem is not called on the Gift Cards API. However, when Square reads a Redeem activity from the Gift Cards API, developers need to know the associated payment_id.

gift_card_activity.redeem_activity_details.amount_money Object Yes

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.

gift_card_activity.redeem_activity_details.amount_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.redeem_activity_details.amount_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.redeem_activity_details.reference_id String No

A client-specified ID to associate an entity, in another system, with this gift card activity. This can be used to track the order or payment related information when the Square Orders API is not being used.

gift_card_activity.gift_card_id String No

The gift card ID. The ID is not required if a GAN is present.

gift_card_activity.id String No

The unique ID of the gift card activity.

gift_card_activity.location_id String Yes

The ID of the location at which the activity occurred.

gift_card_activity.adjust_increment_activity_details Object No

Describes a gift card activity of the ADJUST_INCREMENT type.

gift_card_activity.adjust_increment_activity_details.reason Yes
gift_card_activity.adjust_increment_activity_details.amount_money Object Yes

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.

gift_card_activity.adjust_increment_activity_details.amount_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.adjust_increment_activity_details.amount_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.import_activity_details Object No

Describes a gift card activity of the IMPORT type and the GiftCardGANSource is OTHER (a third-party gift card).

gift_card_activity.import_activity_details.amount_money Object Yes

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.

gift_card_activity.import_activity_details.amount_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.import_activity_details.amount_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.unlinked_activity_refund_activity_details Object No

Present only when GiftCardActivityType is UNLINKED_ACTIVITY_REFUND.

gift_card_activity.unlinked_activity_refund_activity_details.payment_id String No

When using the Square Payments API, the ID of the payment that was refunded to this gift card.

gift_card_activity.unlinked_activity_refund_activity_details.amount_money Object Yes

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.

gift_card_activity.unlinked_activity_refund_activity_details.amount_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.unlinked_activity_refund_activity_details.amount_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.unlinked_activity_refund_activity_details.reference_id String No

A client-specified ID to associate an entity, in another system, with this gift card activity. This can be used to track the order or payment related information when the Square Payments API is not being used.

gift_card_activity.unblock_activity_details Object No

Present only when GiftCardActivityType is UNBLOCK.

gift_card_activity.unblock_activity_details.reason Yes
gift_card_activity.type Yes
gift_card_activity.created_at String No

The timestamp when the gift card activity was created, in RFC 3339 format.

gift_card_activity.load_activity_details Object No

Present only when GiftCardActivityType is LOAD.

gift_card_activity.load_activity_details.buyer_payment_instrument_ids[] Array No

If you are not using the Orders API, this field is required because it is used to identify a buyer to perform compliance checks.

gift_card_activity.load_activity_details.order_id String No

The order_id of the order associated with the activity. It is populated along with line_item_uid and is required if using the Square Orders API.

gift_card_activity.load_activity_details.amount_money Object No

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.

gift_card_activity.load_activity_details.amount_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.load_activity_details.amount_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.load_activity_details.line_item_uid String No

The line_item_uid of the gift card’s line item in the order associated with the activity. It is populated along with order_id and is required if using the Square Orders API.

gift_card_activity.load_activity_details.reference_id String No

A client-specified ID to associate an entity, in another system, with this gift card activity. This can be used to track the order or payment related information when the Square Orders API is not being used.

gift_card_activity.activate_activity_details Object No

Describes a gift card activity of the ACTIVATE type.

gift_card_activity.activate_activity_details.buyer_payment_instrument_ids[] Array No

Required if your application does not use the Square Orders API. This is a list of client-provided payment instrument IDs. Square uses this information to perform compliance checks. If you use the Square Orders API, Square has the necessary instrument IDs to perform necessary compliance checks.

gift_card_activity.activate_activity_details.order_id String No

The ID of the order associated with the activity. This is required if your application uses the Square Orders API.

gift_card_activity.activate_activity_details.amount_money Object No

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.

gift_card_activity.activate_activity_details.amount_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.activate_activity_details.amount_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.activate_activity_details.line_item_uid String No

The line_item_uid of the gift card line item in an order. This is required if your application uses the Square Orders API.

gift_card_activity.activate_activity_details.reference_id String No

If your application does not use the Square Orders API, you can optionally use this field to associate the gift card activity with a client-side entity.

gift_card_activity.refund_activity_details Object No

Present only when GiftCardActivityType is REFUND.

gift_card_activity.refund_activity_details.payment_id String No

When the Square Payments API is used, Refund is not called on the Gift Cards API. However, when Square reads a Refund activity from the Gift Cards API, the developer needs to know the ID of the payment (made using this gift card) that is being refunded.

gift_card_activity.refund_activity_details.redeem_activity_id String Yes

The ID for the Redeem activity that needs to be refunded. Hence, the activity it refers to has to be of the REDEEM type.

gift_card_activity.refund_activity_details.amount_money Object No

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.

gift_card_activity.refund_activity_details.amount_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

gift_card_activity.refund_activity_details.amount_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

gift_card_activity.refund_activity_details.reference_id String No

A client-specified ID to associate an entity, in another system, with this gift card activity. This can be used to track the order or payment related information when the Square Orders API is not being used.

idempotency_key String Yes

A unique string that identifies the CreateGiftCardActivity request.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.