v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
GiftCards

CreateGiftCard

Creates a digital gift card or registers a physical (plastic) gift card. The resulting gift card has a PENDING state. To activate a gift card so that it can be redeemed for purchases, call CreateGiftCardActivity and create an ACTIVATE activity with the initial balance. Alternatively, you can use RefundPayment to refund a payment to the new gift card.

post/v2/gift-cards

Request body

idempotency_keystring required

A unique identifier for this request, used to ensure idempotency. For more information, see Idempotency.

location_idstring required

The ID of the location where the gift card should be registered for reporting purposes. Gift cards can be redeemed at any of the seller's locations.

Example request

{
  "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"
  }
}