POST /v2/gift-cards

Creates a digital gift card or registers a physical (plastic) gift card. You must activate the gift card before it can be used for payment. For more information, see Selling 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
location_id String Yes

The location ID where the gift card that will be created should be registered.

idempotency_key String Yes

A unique string that identifies the CreateGiftCard request.

gift_card Object Yes

Represents a Square gift card.

gift_card.id String No

The Square-assigned ID of the gift card.

gift_card.customer_ids[] Array No

The IDs of the customers to whom this gift card is linked.

gift_card.gan_source No
gift_card.gan String No

The gift card account number.

gift_card.type Yes
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.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.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.created_at String No

The timestamp when the gift card was created, in RFC 3339 format. In the case of a digital gift card, it is the time when you create a card (using the Square Point of Sale application, Seller Dashboard, or Gift Cards API).
In the case of a plastic gift card, it is the time when Square associates the card with the seller at the time of activation.

gift_card.state No

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.