PayNow

Gift Cards

Get Gift Cards for a store

GEThttps://api.paynow.gg/v1/stores/{storeId}/giftcards
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
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
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.
idFlakeIdRequired
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional

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
[
  {
    "balance": 2500,
    "code": "GIFT-2024-ABCD1234",
    "enabled": true,
    "id": "411486491630370816",
    "starting_balance": 5000,
    "store_id": "411486491630370816",
    "usable_at": "2024-01-01T00:00:00Z",
    "note": "string",
    "expires_at": "2024-01-01T00:00:00Z",
    "created_at": "2024-01-01T00:00:00Z",
    "created_by": {
      "type": "anonymous",
      "id": "411486491630370816"
    },
    "updated_at": "2024-01-01T00:00:00Z",
    "updated_by": {
      "type": "anonymous",
      "id": "411486491630370816"
    },
    "canceled_at": "2024-01-01T00:00:00Z",
    "canceled_by": {
      "type": "anonymous",
      "id": "411486491630370816"
    }
  }
]

Create a Gift Card for a store

POSThttps://api.paynow.gg/v1/stores/{storeId}/giftcards
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
Request body
balanceintegerRequired
codestringRequired
enabledbooleanRequired
usable_atstringRequired
expires_atstringOptional
notestringOptional
Response
200OKGiftCardDto
Represents a gift card in the PayNow system.
Show fields
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.
idFlakeIdRequired
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional

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 '{
  "enabled": true,
  "code": "string",
  "balance": 0,
  "usable_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "expires_at": "2024-01-01T00:00:00Z"
}'
Response200
{
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "id": "411486491630370816",
  "starting_balance": 5000,
  "store_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "expires_at": "2024-01-01T00:00:00Z",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "canceled_at": "2024-01-01T00:00:00Z",
  "canceled_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  }
}

Get a Gift Card By ID for a store

GEThttps://api.paynow.gg/v1/stores/{storeId}/giftcards/{giftCardId}
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
giftCardIdFlakeIdRequired
Response
200OKGiftCardDto
Represents a gift card in the PayNow system.
Show fields
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.
idFlakeIdRequired
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional

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
{
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "id": "411486491630370816",
  "starting_balance": 5000,
  "store_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "expires_at": "2024-01-01T00:00:00Z",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "canceled_at": "2024-01-01T00:00:00Z",
  "canceled_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  }
}

Update a Gift Card By ID for a store

PATCHhttps://api.paynow.gg/v1/stores/{storeId}/giftcards/{giftCardId}
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
giftCardIdFlakeIdRequired
Request body
balanceintegerOptional
codestringOptional
enabledbooleanOptional
expires_atstringOptional
notestringOptional
usable_atstringOptional
Response
200OKGiftCardDto
Represents a gift card in the PayNow system.
Show fields
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.
idFlakeIdRequired
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional

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 '{
  "enabled": true,
  "code": "string",
  "note": "string",
  "balance": 0,
  "usable_at": "2024-01-01T00:00:00Z",
  "expires_at": "2024-01-01T00:00:00Z"
}'
Response200
{
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "id": "411486491630370816",
  "starting_balance": 5000,
  "store_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "expires_at": "2024-01-01T00:00:00Z",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "canceled_at": "2024-01-01T00:00:00Z",
  "canceled_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  }
}

Delete a Gift Card By ID for a store

DELETEhttps://api.paynow.gg/v1/stores/{storeId}/giftcards/{giftCardId}
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
giftCardIdFlakeIdRequired
Response
200OKGiftCardDto
Represents a gift card in the PayNow system.
Show fields
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.
idFlakeIdRequired
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
created_atstringOptional
The date and time when the gift card was created.
created_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
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
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional

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
{
  "balance": 2500,
  "code": "GIFT-2024-ABCD1234",
  "enabled": true,
  "id": "411486491630370816",
  "starting_balance": 5000,
  "store_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "expires_at": "2024-01-01T00:00:00Z",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "canceled_at": "2024-01-01T00:00:00Z",
  "canceled_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  }
}