PayNow

Gift Cards

Get Gift Cards for a store

GEThttps://api.paynow.gg/v1/stores/{storeId}/giftcards

Retrieves all gift cards for the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to retrieve gift cards for.
Query parameters
limitintegerOptional
The maximum number of items to return in a single request.
afterFlakeIdOptional
Returns items after the specified ID. Used for forward pagination through results.
beforeFlakeIdOptional
Returns items before the specified ID. Used for backward pagination through results.
ascbooleanOptional
Determines the sort order of returned items. When true, items are returned in ascending order. When false, items are returned in descending order.
codestringOptional
A gift card code to filter by.
include_canceledbooleanOptional
Should canceled gift cards be included in the response?
Response
200OKGiftCardDto[]
Represents a gift card in the PayNow system.
Show fields
idFlakeIdRequired
balanceintegerRequired
The current balance remaining on the gift card in cents.
codestringRequired
The unique code that customers use to redeem the gift card.
enabledbooleanRequired
Indicates whether the gift card is currently enabled and can be used.
starting_balanceintegerRequired
The original balance when the gift card was first created in cents.
store_idFlakeIdRequired
usable_atstringRequired
The date and time when the gift card becomes usable.
canceled_atstringOptional
The date and time when the gift card was canceled, if applicable.
canceled_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
expires_atstringOptional
The date and time when the gift card expires, if applicable.
notestringOptional
Optional note or description associated with the gift card.
updated_atstringOptional
The date and time when the gift card was last updated, if applicable.
updated_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer

Failed requests return a PayNowError body. See the error response guide.

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/giftcards" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "id": "411486491630370816",
    "balance": 2500,
    "code": "GIFT-2024-ABCD1234",
    "enabled": true,
    "starting_balance": 5000,
    "store_id": "411486491630370816",
    "usable_at": "2024-01-01T00:00:00Z",
    "canceled_at": "2024-01-01T00:00:00Z",
    "canceled_by": {
      "id": "411486491630370816",
      "type": "anonymous"
    },
    "created_at": "2024-01-01T00:00:00Z",
    "created_by": {
      "id": "411486491630370816",
      "type": "anonymous"
    },
    "expires_at": "2024-01-01T00:00:00Z",
    "note": "string",
    "updated_at": "2024-01-01T00:00:00Z",
    "updated_by": {
      "id": "411486491630370816",
      "type": "anonymous"
    }
  }
]

Create a Gift Card for a store

POSThttps://api.paynow.gg/v1/stores/{storeId}/giftcards

Creates a new gift card in the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to create the gift card in.
Request body
balanceintegerRequired
The current balance remaining on the gift card in cents.
codestringRequired
The unique code that customers use to redeem the gift card.
enabledbooleanRequired
Indicates whether the gift card is currently enabled and can be used.
usable_atstringRequired
The date and time when the gift card becomes usable.
expires_atstringOptional
The date and time when the gift card expires, if applicable.
notestringOptional
Optional note or description associated with the gift card.
Response
200OKGiftCardDto
Represents a gift card in the PayNow system.
Show fields
idFlakeIdRequired
balanceintegerRequired
The current balance remaining on the gift card in cents.
codestringRequired
The unique code that customers use to redeem the gift card.
enabledbooleanRequired
Indicates whether the gift card is currently enabled and can be used.
starting_balanceintegerRequired
The original balance when the gift card was first created in cents.
store_idFlakeIdRequired
usable_atstringRequired
The date and time when the gift card becomes usable.
canceled_atstringOptional
The date and time when the gift card was canceled, if applicable.
canceled_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
expires_atstringOptional
The date and time when the gift card expires, if applicable.
notestringOptional
Optional note or description associated with the gift card.
updated_atstringOptional
The date and time when the gift card was last updated, if applicable.
updated_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer

Failed requests return a PayNowError body. See the error response guide.

curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/giftcards" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "usable_at": "2024-01-01T00:00:00Z",
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string"
}'
Response200
{
  "id": "411486491630370816",
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "starting_balance": 5000,
  "store_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "canceled_at": "2024-01-01T00:00:00Z",
  "canceled_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  }
}

Get a Gift Card By ID for a store

GEThttps://api.paynow.gg/v1/stores/{storeId}/giftcards/{giftCardId}

Retrieves a gift card by the ID for the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to retrieve the gift card for.
giftCardIdFlakeIdRequired
The ID of the gift card.
Response
200OKGiftCardDto
Represents a gift card in the PayNow system.
Show fields
idFlakeIdRequired
balanceintegerRequired
The current balance remaining on the gift card in cents.
codestringRequired
The unique code that customers use to redeem the gift card.
enabledbooleanRequired
Indicates whether the gift card is currently enabled and can be used.
starting_balanceintegerRequired
The original balance when the gift card was first created in cents.
store_idFlakeIdRequired
usable_atstringRequired
The date and time when the gift card becomes usable.
canceled_atstringOptional
The date and time when the gift card was canceled, if applicable.
canceled_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
expires_atstringOptional
The date and time when the gift card expires, if applicable.
notestringOptional
Optional note or description associated with the gift card.
updated_atstringOptional
The date and time when the gift card was last updated, if applicable.
updated_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer

Failed requests return a PayNowError body. See the error response guide.

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/giftcards/{giftCardId}" \
  -H "Authorization: APIKey TOKEN"
Response200
{
  "id": "411486491630370816",
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "starting_balance": 5000,
  "store_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "canceled_at": "2024-01-01T00:00:00Z",
  "canceled_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  }
}

Update a Gift Card By ID for a store

PATCHhttps://api.paynow.gg/v1/stores/{storeId}/giftcards/{giftCardId}

Performs a delta update of a gift card by the ID for the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to update the gift card for.
giftCardIdFlakeIdRequired
The ID of the gift card.
Request body
balanceintegerOptional
The current balance remaining on the gift card in cents.
codestringOptional
The unique code that customers use to redeem the gift card.
enabledbooleanOptional
Indicates whether the gift card is currently enabled and can be used.
expires_atstringOptional
The date and time when the gift card expires, if applicable.
notestringOptional
Optional note or description associated with the gift card.
usable_atstringOptional
The date and time when the gift card becomes usable.
Response
200OKGiftCardDto
Represents a gift card in the PayNow system.
Show fields
idFlakeIdRequired
balanceintegerRequired
The current balance remaining on the gift card in cents.
codestringRequired
The unique code that customers use to redeem the gift card.
enabledbooleanRequired
Indicates whether the gift card is currently enabled and can be used.
starting_balanceintegerRequired
The original balance when the gift card was first created in cents.
store_idFlakeIdRequired
usable_atstringRequired
The date and time when the gift card becomes usable.
canceled_atstringOptional
The date and time when the gift card was canceled, if applicable.
canceled_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
expires_atstringOptional
The date and time when the gift card expires, if applicable.
notestringOptional
Optional note or description associated with the gift card.
updated_atstringOptional
The date and time when the gift card was last updated, if applicable.
updated_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer

Failed requests return a PayNowError body. See the error response guide.

curl -X PATCH "https://api.paynow.gg/v1/stores/{storeId}/giftcards/{giftCardId}" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "usable_at": "2024-01-01T00:00:00Z"
}'
Response200
{
  "id": "411486491630370816",
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "starting_balance": 5000,
  "store_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "canceled_at": "2024-01-01T00:00:00Z",
  "canceled_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  }
}

Delete a Gift Card By ID for a store

DELETEhttps://api.paynow.gg/v1/stores/{storeId}/giftcards/{giftCardId}

Deletes a gift card by the ID for the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to delete the gift card for.
giftCardIdFlakeIdRequired
The ID of the gift card.
Response
200OKGiftCardDto
Represents a gift card in the PayNow system.
Show fields
idFlakeIdRequired
balanceintegerRequired
The current balance remaining on the gift card in cents.
codestringRequired
The unique code that customers use to redeem the gift card.
enabledbooleanRequired
Indicates whether the gift card is currently enabled and can be used.
starting_balanceintegerRequired
The original balance when the gift card was first created in cents.
store_idFlakeIdRequired
usable_atstringRequired
The date and time when the gift card becomes usable.
canceled_atstringOptional
The date and time when the gift card was canceled, if applicable.
canceled_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
expires_atstringOptional
The date and time when the gift card expires, if applicable.
notestringOptional
Optional note or description associated with the gift card.
updated_atstringOptional
The date and time when the gift card was last updated, if applicable.
updated_byActorDtoOptional
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer

Failed requests return a PayNowError body. See the error response guide.

curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/giftcards/{giftCardId}" \
  -H "Authorization: APIKey TOKEN"
Response200
{
  "id": "411486491630370816",
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "starting_balance": 5000,
  "store_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "canceled_at": "2024-01-01T00:00:00Z",
  "canceled_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  }
}