Skip to main content

GiftcardPurchase

Representation of a purchased giftcard

type GiftcardPurchase {
id: Int!
value: Float!
balance: Float!
currency: Currency!
code: String!
redeemable: Boolean
orderId: Int
productId: String
paidAt: DateTime
createdAt: DateTime
expiresAt: DateTime
customerId: Int
}

Fields

id ● Int!

Id of the gift card purchase

value ● Float!

Gift card value

balance ● Float!

Balance of the gift card

currency ● Currency!

Currency of the gift card

code ● String!

Gift card code

redeemable ● Boolean

Can the gift card be redeemed or has it expired/been used up

orderId ● Int

The ID of the order that purchased the gift card

productId ● String

The product ID of the gift card product

paidAt ● DateTime

Timestamp when the gift card was paid for

createdAt ● DateTime

Timestamp when the gift card was created

expiresAt ● DateTime

Expiry date of the gift card

customerId ● Int

The customer that purchased the gift card

Example

{
"currency": {
"code": "USD",
"rate": 11.355,
"prefix": "$"
},
"paidAt": "2024-05-03T11:52:33Z"
}