PayNow

Bans

Get bans

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

Retrieves all bans 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 bans for.
Query parameters
ban_typeenumOptional
ban_type_valuestringOptional
reasonstringOptional
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.
Response
200OKBanDto[]
Represents a ban that blocks customers matching any of its identities from purchasing in the store.
Show fields
idFlakeIdRequired
created_atstringRequired
The date and time the ban was created.
created_byActorDtoRequired
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
enabledbooleanRequired
Indicates whether the ban is currently enforced.
identitiesBanIdentityDto[]Required
The identities the ban applies to. A customer matching any one of them is banned.
ban_typeenumRequired
Possible enum values
  • unknown
  • steam
  • ip
  • customer
  • customer_name
  • email
ban_type_valuestringRequired
The value to match for 'ban_type': the Steam ID, IP address, customer ID, customer name or email address respectively.
reasonstringRequired
The reason recorded for the ban.
store_idFlakeIdRequired
expires_atstringOptional
The date and time the ban lifts, or null when the ban is permanent.
updated_atstringOptional
The date and time the ban was last updated, or null when it has never been updated.
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}/bans" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "id": "411486491630370816",
    "created_at": "2024-01-01T00:00:00Z",
    "created_by": {
      "id": "411486491630370816",
      "type": "anonymous"
    },
    "enabled": true,
    "identities": [
      {
        "ban_type": "unknown",
        "ban_type_value": "string"
      }
    ],
    "reason": "string",
    "store_id": "411486491630370816",
    "expires_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z",
    "updated_by": {
      "id": "411486491630370816",
      "type": "anonymous"
    }
  }
]

Create ban

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

Creates a new ban 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 ban in.
Request body
expires_atstringOptional
identitiesBanIdentityDto[]Optional
Represents one identity a ban applies to.
ban_typeenumRequired
Possible enum values
  • unknown
  • steam
  • ip
  • customer
  • customer_name
  • email
ban_type_valuestringRequired
The value to match for 'ban_type': the Steam ID, IP address, customer ID, customer name or email address respectively.
reasonstringOptional
Response
201CreatedBanDto
Represents a ban that blocks customers matching any of its identities from purchasing in the store.
Show fields
idFlakeIdRequired
created_atstringRequired
The date and time the ban was created.
created_byActorDtoRequired
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
enabledbooleanRequired
Indicates whether the ban is currently enforced.
identitiesBanIdentityDto[]Required
The identities the ban applies to. A customer matching any one of them is banned.
ban_typeenumRequired
Possible enum values
  • unknown
  • steam
  • ip
  • customer
  • customer_name
  • email
ban_type_valuestringRequired
The value to match for 'ban_type': the Steam ID, IP address, customer ID, customer name or email address respectively.
reasonstringRequired
The reason recorded for the ban.
store_idFlakeIdRequired
expires_atstringOptional
The date and time the ban lifts, or null when the ban is permanent.
updated_atstringOptional
The date and time the ban was last updated, or null when it has never been updated.
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}/bans" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "expires_at": "2024-01-01T00:00:00Z",
  "identities": [
    {
      "ban_type": "unknown",
      "ban_type_value": "string"
    }
  ],
  "reason": "string"
}'
Response201
{
  "id": "411486491630370816",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "enabled": true,
  "identities": [
    {
      "ban_type": "unknown",
      "ban_type_value": "string"
    }
  ],
  "reason": "string",
  "store_id": "411486491630370816",
  "expires_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  }
}

Get ban by ID

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

Retrieves a ban 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 ban for.
banIdFlakeIdRequired
The ID of the ban.
Response
200OKBanDto
Represents a ban that blocks customers matching any of its identities from purchasing in the store.
Show fields
idFlakeIdRequired
created_atstringRequired
The date and time the ban was created.
created_byActorDtoRequired
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
enabledbooleanRequired
Indicates whether the ban is currently enforced.
identitiesBanIdentityDto[]Required
The identities the ban applies to. A customer matching any one of them is banned.
ban_typeenumRequired
Possible enum values
  • unknown
  • steam
  • ip
  • customer
  • customer_name
  • email
ban_type_valuestringRequired
The value to match for 'ban_type': the Steam ID, IP address, customer ID, customer name or email address respectively.
reasonstringRequired
The reason recorded for the ban.
store_idFlakeIdRequired
expires_atstringOptional
The date and time the ban lifts, or null when the ban is permanent.
updated_atstringOptional
The date and time the ban was last updated, or null when it has never been updated.
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}/bans/{banId}" \
  -H "Authorization: APIKey TOKEN"
Response200
{
  "id": "411486491630370816",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "enabled": true,
  "identities": [
    {
      "ban_type": "unknown",
      "ban_type_value": "string"
    }
  ],
  "reason": "string",
  "store_id": "411486491630370816",
  "expires_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  }
}

Update ban by ID

PATCHhttps://api.paynow.gg/v1/stores/{storeId}/bans/{banId}

Updates a ban 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 ban for.
banIdFlakeIdRequired
The ID of the ban.
Request body
expires_atstringOptional
identitiesBanIdentityDto[]Optional
Represents one identity a ban applies to.
ban_typeenumRequired
Possible enum values
  • unknown
  • steam
  • ip
  • customer
  • customer_name
  • email
ban_type_valuestringRequired
The value to match for 'ban_type': the Steam ID, IP address, customer ID, customer name or email address respectively.
reasonstringOptional
Response
200OKBanDto
Represents a ban that blocks customers matching any of its identities from purchasing in the store.
Show fields
idFlakeIdRequired
created_atstringRequired
The date and time the ban was created.
created_byActorDtoRequired
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
enabledbooleanRequired
Indicates whether the ban is currently enforced.
identitiesBanIdentityDto[]Required
The identities the ban applies to. A customer matching any one of them is banned.
ban_typeenumRequired
Possible enum values
  • unknown
  • steam
  • ip
  • customer
  • customer_name
  • email
ban_type_valuestringRequired
The value to match for 'ban_type': the Steam ID, IP address, customer ID, customer name or email address respectively.
reasonstringRequired
The reason recorded for the ban.
store_idFlakeIdRequired
expires_atstringOptional
The date and time the ban lifts, or null when the ban is permanent.
updated_atstringOptional
The date and time the ban was last updated, or null when it has never been updated.
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}/bans/{banId}" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "expires_at": "2024-01-01T00:00:00Z",
  "identities": [
    {
      "ban_type": "unknown",
      "ban_type_value": "string"
    }
  ],
  "reason": "string"
}'
Response200
{
  "id": "411486491630370816",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "enabled": true,
  "identities": [
    {
      "ban_type": "unknown",
      "ban_type_value": "string"
    }
  ],
  "reason": "string",
  "store_id": "411486491630370816",
  "expires_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  }
}

Delete ban by ID

DELETEhttps://api.paynow.gg/v1/stores/{storeId}/bans/{banId}

Deletes a ban 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 ban for.
banIdFlakeIdRequired
The ID of the ban.
Response
204No Content

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

curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/bans/{banId}" \
  -H "Authorization: APIKey TOKEN"

Check for ban by identities

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

Checks whether any of the supplied identities are banned 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 check the identities for.
Request body
identitiesBanIdentityDto[]Required
Represents one identity a ban applies to.
ban_typeenumRequired
Possible enum values
  • unknown
  • steam
  • ip
  • customer
  • customer_name
  • email
ban_type_valuestringRequired
The value to match for 'ban_type': the Steam ID, IP address, customer ID, customer name or email address respectively.
Response
200OKCheckForBanIDByIdentitiesResponseDto
Show fields
is_bannedbooleanRequired
ban_idFlakeIdOptional

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

curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/bans/check" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "identities": [
    {
      "ban_type": "unknown",
      "ban_type_value": "string"
    }
  ]
}'
Response200
{
  "is_banned": true,
  "ban_id": "411486491630370816"
}