Skip to content
Select theme
Light
Dark
Auto
Select language
English
فارسی

Gift cards and credit

Object

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!

No description.

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.

Money!

No description.

Money!

No description.

GiftCardStatus!

No description.

GiftCardRecipient

Who it was issued to, when the merchant recorded anybody.

Customer

The customer who has redeemed it, once somebody has.

Order

The order it was sold on, when it was bought rather than issued.

DateTime

No description.

String

No description.

StaffMember

No description.

DateTime!

No description.

DateTime

No description.

DateTime

No description.

Object

A page of gift cards.

[GiftCardEdge!]!

No description.

[GiftCard!]!

No description.

PageInfo!

No description.

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.

Money!

What these cards are collectively worth — the shop’s outstanding liability.

Input

A gift card to issue.

MoneyInput!

No description.

ID

The customer it is for, when it is for one. Omit for a bearer card.

GiftCardRecipientInput

No description.

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.

Boolean

Whether to SMS the code to the recipient.

Object

What giftCardCreate returns.

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.

[UserError!]!

No description.

Object

One gift card, with its cursor.

String!

No description.

GiftCard!

No description.

Input

A filter on the gift-card list.

[GiftCardStatus!]

No description.

ID

No description.

DateTime

No description.

Int

Cards expiring within this many days — the reminder queue.

Object

What the other gift-card mutations return.

GiftCard

No description.

[UserError!]!

No description.

Object

Who a gift card was issued to.

String

No description.

String

Where the code was sent. SMS, here, essentially always.

String

No description.

String

The buyer’s message to the recipient.

Input

Who a gift card goes to.

String

No description.

String

No description.

String

No description.

String

No description.

Enum

Where a gift card stands.

ValueMeaning
ACTIVEIssued and unspent.
REDEEMEDRedeemed onto a customer’s credit account. Its balance now lives there.
EXPIREDPast its expiry.
DISABLEDSwitched 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.
Object

A buyer’s credit balance on one shop.

ID!

No description.

Customer!

No description.

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.

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.

DateTime

No description.

StoreCreditEntryConnection!

No description.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

DateTime!

No description.

DateTime!

No description.

Input

Credit a merchant is granting or removing by hand.

ID!

No description.

MoneyInput!

Signed. Negative removes credit.

StoreCreditReason!

No description.

String

Required when reason is MANUAL. The merchant will be asked why.

DateTime

When this grant lapses. Omit for credit that does not expire.

Boolean

No description.

Object

One movement of credit.

ID!

No description.

Money!

Signed. Negative spends.

Money!

The balance after it, so the ledger reads without replaying it.

StoreCreditReason!

No description.

String

The merchant’s own note. Required for MANUAL.

Node

What caused it — an order, a refund, a gift card, a return.

DateTime

When this entry’s own credit lapses. Null for credit that does not expire.

AuditActor!

No description.

DateTime!

No description.

Object

A page of credit entries.

[StoreCreditEntryEdge!]!

No description.

[StoreCreditEntry!]!

No description.

PageInfo!

No description.

Object

One credit entry, with its cursor.

String!

No description.

StoreCreditEntry!

No description.

Object

What the store-credit mutations return.

StoreCreditAccount

No description.

StoreCreditEntry

The entry written, so a client shows the ledger line it just made.

[UserError!]!

No description.

Enum

Why credit moved.

ValueMeaning
REFUNDA refund issued as credit rather than as money.
REDEMPTIONSpent on an order.
GIFT_CARDA gift card was loaded onto the account.
MANUALA goodwill gesture. note is required.
EXPIRYLapsed unspent.
REVERSALA redemption reversed because its order was cancelled.
REWARDLoyalty or a referral reward, once those exist.