Gift cards and credit
GiftCard
Section titled “GiftCard”A gift card — کارت هدیه.
Distinct from store credit: a gift card is bearer, transferable, and bought by one person for another, so it is addressed by a code rather than by a customer. Redeeming one moves its value into the redeemer’s store credit, which is what keeps a single ledger for everything the shop owes.
ID!
No description.
version
Section titled “version”Version!
No description.
codeLast4
Section titled “codeLast4”String!
The last four characters, for identifying it in a list.
The full code is shown once, at creation, and only its hash is stored — the same treatment as any other bearer token. A merchant who loses it issues a new card; nobody can recover the old one.
initialValue
Section titled “initialValue”Money!
No description.
balance
Section titled “balance”Money!
No description.
status
Section titled “status”GiftCardStatus!
No description.
recipient
Section titled “recipient”GiftCardRecipient
Who it was issued to, when the merchant recorded anybody.
redeemedBy
Section titled “redeemedBy”Customer
The customer who has redeemed it, once somebody has.
purchaseOrder
Section titled “purchaseOrder”Order
The order it was sold on, when it was bought rather than issued.
expiresAt
Section titled “expiresAt”DateTime
No description.
String
No description.
createdBy
Section titled “createdBy”StaffMember
No description.
createdAt
Section titled “createdAt”DateTime!
No description.
redeemedAt
Section titled “redeemedAt”DateTime
No description.
disabledAt
Section titled “disabledAt”DateTime
No description.
GiftCardConnection
Section titled “GiftCardConnection”A page of gift cards.
[GiftCardEdge!]!
No description.
[GiftCard!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int
How many match across every page — when this page is the whole result. Null otherwise: the service behind this list does not count, and a number made up here would be a wrong one that looks right.
totalBalance
Section titled “totalBalance”Money!
What these cards are collectively worth — the shop’s outstanding liability.
GiftCardCreateInput
Section titled “GiftCardCreateInput”A gift card to issue.
initialValue
Section titled “initialValue”MoneyInput!
No description.
customerId
Section titled “customerId”ID
The customer it is for, when it is for one. Omit for a bearer card.
recipient
Section titled “recipient”GiftCardRecipientInput
No description.
expiresAt
Section titled “expiresAt”DateTime
No description.
String
No description.
String
A code the merchant chose. Omit to have one generated, which is what to do: a chosen code is a guessable one.
notifyRecipient
Section titled “notifyRecipient”Boolean
Whether to SMS the code to the recipient.
GiftCardCreatePayload
Section titled “GiftCardCreatePayload”What giftCardCreate returns.
giftCard
Section titled “giftCard”GiftCard
No description.
String
The full code — shown once and never again.
Only its hash is stored. If the merchant does not capture it here, the card can still be sent to its recipient by the platform, but nobody can look it up.
userErrors
Section titled “userErrors”[UserError!]!
No description.
GiftCardEdge
Section titled “GiftCardEdge”One gift card, with its cursor.
cursor
Section titled “cursor”String!
No description.
GiftCard!
No description.
GiftCardFilter
Section titled “GiftCardFilter”A filter on the gift-card list.
status
Section titled “status”[GiftCardStatus!]
No description.
customerId
Section titled “customerId”ID
No description.
createdAfter
Section titled “createdAfter”DateTime
No description.
expiringWithinDays
Section titled “expiringWithinDays”Int
Cards expiring within this many days — the reminder queue.
GiftCardPayload
Section titled “GiftCardPayload”What the other gift-card mutations return.
giftCard
Section titled “giftCard”GiftCard
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
GiftCardRecipient
Section titled “GiftCardRecipient”Who a gift card was issued to.
String
No description.
String
Where the code was sent. SMS, here, essentially always.
String
No description.
message
Section titled “message”String
The buyer’s message to the recipient.
GiftCardRecipientInput
Section titled “GiftCardRecipientInput”Who a gift card goes to.
String
No description.
String
No description.
String
No description.
message
Section titled “message”String
No description.
GiftCardStatus
Section titled “GiftCardStatus”Where a gift card stands.
| Value | Meaning |
|---|---|
ACTIVE | Issued and unspent. |
REDEEMED | Redeemed onto a customer’s credit account. Its balance now lives there. |
EXPIRED | Past its expiry. |
DISABLED | Switched off by the merchant — lost, stolen, or issued in error. Not deleted: the entry that created it stays in the ledger, because a card that vanished would leave an unexplained balance. |
StoreCreditAccount
Section titled “StoreCreditAccount”A buyer’s credit balance on one shop.
ID!
No description.
customer
Section titled “customer”Customer!
No description.
balance
Section titled “balance”Money!
What is available now. Derived from the entries, never stored.
Cannot go negative: a redemption larger than the balance is refused rather than allowed to overdraw.
expiringAmount
Section titled “expiringAmount”Money
What will expire, and when the soonest does.
Merchants issue goodwill credit with an expiry, and a buyer discovering it lapsed generates the support call this field exists to prevent.
nextExpiryAt
Section titled “nextExpiryAt”DateTime
No description.
entries
Section titled “entries”StoreCreditEntryConnection!
No description.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
createdAt
Section titled “createdAt”DateTime!
No description.
updatedAt
Section titled “updatedAt”DateTime!
No description.
StoreCreditAdjustInput
Section titled “StoreCreditAdjustInput”Credit a merchant is granting or removing by hand.
customerId
Section titled “customerId”ID!
No description.
amount
Section titled “amount”MoneyInput!
Signed. Negative removes credit.
reason
Section titled “reason”StoreCreditReason!
No description.
String
Required when reason is MANUAL. The merchant will be asked why.
expiresAt
Section titled “expiresAt”DateTime
When this grant lapses. Omit for credit that does not expire.
notifyCustomer
Section titled “notifyCustomer”Boolean
No description.
StoreCreditEntry
Section titled “StoreCreditEntry”One movement of credit.
ID!
No description.
amount
Section titled “amount”Money!
Signed. Negative spends.
balanceAfter
Section titled “balanceAfter”Money!
The balance after it, so the ledger reads without replaying it.
reason
Section titled “reason”StoreCreditReason!
No description.
String
The merchant’s own note. Required for MANUAL.
reference
Section titled “reference”Node
What caused it — an order, a refund, a gift card, a return.
expiresAt
Section titled “expiresAt”DateTime
When this entry’s own credit lapses. Null for credit that does not expire.
AuditActor!
No description.
occurredAt
Section titled “occurredAt”DateTime!
No description.
StoreCreditEntryConnection
Section titled “StoreCreditEntryConnection”A page of credit entries.
[StoreCreditEntryEdge!]!
No description.
[StoreCreditEntry!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
StoreCreditEntryEdge
Section titled “StoreCreditEntryEdge”One credit entry, with its cursor.
cursor
Section titled “cursor”String!
No description.
StoreCreditEntry!
No description.
StoreCreditPayload
Section titled “StoreCreditPayload”What the store-credit mutations return.
account
Section titled “account”StoreCreditAccount
No description.
StoreCreditEntry
The entry written, so a client shows the ledger line it just made.
userErrors
Section titled “userErrors”[UserError!]!
No description.
StoreCreditReason
Section titled “StoreCreditReason”Why credit moved.
| Value | Meaning |
|---|---|
REFUND | A refund issued as credit rather than as money. |
REDEMPTION | Spent on an order. |
GIFT_CARD | A gift card was loaded onto the account. |
MANUAL | A goodwill gesture. note is required. |
EXPIRY | Lapsed unspent. |
REVERSAL | A redemption reversed because its order was cancelled. |
REWARD | Loyalty or a referral reward, once those exist. |