Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 2.18 KB

gift-card.md

File metadata and controls

38 lines (29 loc) · 2.18 KB

Gift Card

Represents a Square gift card.

Structure

GiftCard

Fields

Name Type Tags Description Getter
Id String Optional The Square-assigned ID of the gift card. String getId()
Type String Required Indicates the gift card type. String getType()
GanSource String Optional Indicates the source that generated the gift card
account number (GAN).
String getGanSource()
State String Optional Indicates the gift card state. String getState()
BalanceMoney Money Optional 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.
Money getBalanceMoney()
Gan String Optional The gift card account number (GAN). Buyers can use the GAN to make purchases or check
the gift card balance.
String getGan()
CreatedAt String Optional 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.
String getCreatedAt()
CustomerIds List<String> Optional The IDs of the customer profiles to whom this gift card is linked. List getCustomerIds()

Example (as JSON)

{
  "id": "id0",
  "type": "PHYSICAL",
  "gan_source": "SQUARE",
  "state": "ACTIVE",
  "balance_money": {
    "amount": 146,
    "currency": "BBD"
  },
  "gan": "gan6"
}