v1

latestOpenAPI 3.0.0Apache 2.02026-07-142008071.1 MB
GiftCards

CreateGiftCard

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.

post/v2/gift-cards

Request body

idempotency_keystring required

A unique string that identifies the CreateGiftCard request.

location_idstring required

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

Example request

{
  "request_body": {
    "gift_card": {
      "type": "DIGITAL"
    },
    "idempotency_key": "NC9Tm69EjbjtConu",
    "location_id": "81FN9BNFZTKS4"
  }
}

Response

Success

Example response

{
  "gift_card": {
    "balance_money": {
      "amount": 0,
      "currency": "USD"
    },
    "created_at": "2021-05-20T22:26:54.000Z",
    "gan": "7783320006753271",
    "gan_source": "SQUARE",
    "id": "gftc:6cbacbb64cf54e2ca9f573d619038059",
    "state": "PENDING",
    "type": "DIGITAL"
  }
}