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 fieldsHide fields
idFlakeIdRequired
created_atstringRequired
The date and time the ban was created.
created_byActorDtoRequiredRepresents 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
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
enabledbooleanRequired
Indicates whether the ban is currently enforced.
identitiesBanIdentityDto[]RequiredThe identities the ban applies to. A customer matching any one of them is banned.
ban_typeenumRequired
Possible enum values
unknownsteamipcustomercustomer_nameemail
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_byActorDtoOptionalRepresents 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
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_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"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.bans.getBans();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/bans", headers=headers)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[]OptionalRepresents one identity a ban applies to.
ban_typeenumRequired
Possible enum values
unknownsteamipcustomercustomer_nameemail
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 fieldsHide fields
idFlakeIdRequired
created_atstringRequired
The date and time the ban was created.
created_byActorDtoRequiredRepresents 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
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
enabledbooleanRequired
Indicates whether the ban is currently enforced.
identitiesBanIdentityDto[]RequiredThe identities the ban applies to. A customer matching any one of them is banned.
ban_typeenumRequired
Possible enum values
unknownsteamipcustomercustomer_nameemail
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_byActorDtoOptionalRepresents 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
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_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"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.bans.createBan({
expires_at: "2024-01-01T00:00:00Z",
identities: [
{
ban_type: "unknown",
ban_type_value: "string",
},
],
reason: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"expires_at": "2024-01-01T00:00:00Z",
"identities": [
{
"ban_type": "unknown",
"ban_type_value": "string",
},
],
"reason": "string",
}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/bans", headers=headers, json=payload)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 fieldsHide fields
idFlakeIdRequired
created_atstringRequired
The date and time the ban was created.
created_byActorDtoRequiredRepresents 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
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
enabledbooleanRequired
Indicates whether the ban is currently enforced.
identitiesBanIdentityDto[]RequiredThe identities the ban applies to. A customer matching any one of them is banned.
ban_typeenumRequired
Possible enum values
unknownsteamipcustomercustomer_nameemail
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_byActorDtoOptionalRepresents 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
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_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"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.bans.getBan("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/bans/{banId}", headers=headers)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[]OptionalRepresents one identity a ban applies to.
ban_typeenumRequired
Possible enum values
unknownsteamipcustomercustomer_nameemail
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 fieldsHide fields
idFlakeIdRequired
created_atstringRequired
The date and time the ban was created.
created_byActorDtoRequiredRepresents 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
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
enabledbooleanRequired
Indicates whether the ban is currently enforced.
identitiesBanIdentityDto[]RequiredThe identities the ban applies to. A customer matching any one of them is banned.
ban_typeenumRequired
Possible enum values
unknownsteamipcustomercustomer_nameemail
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_byActorDtoOptionalRepresents 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
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_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"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.bans.updateBan("411486491630370816", {
expires_at: "2024-01-01T00:00:00Z",
identities: [
{
ban_type: "unknown",
ban_type_value: "string",
},
],
reason: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"expires_at": "2024-01-01T00:00:00Z",
"identities": [
{
"ban_type": "unknown",
"ban_type_value": "string",
},
],
"reason": "string",
}
response = requests.patch("https://api.paynow.gg/v1/stores/{storeId}/bans/{banId}", headers=headers, json=payload)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.
curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/bans/{banId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.bans.deleteBan("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/stores/{storeId}/bans/{banId}", headers=headers)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[]RequiredRepresents one identity a ban applies to.
ban_typeenumRequired
Possible enum values
unknownsteamipcustomercustomer_nameemail
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 fieldsHide 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"
}
]
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.bans.checkForBanByIdentities({
identities: [
{
ban_type: "unknown",
ban_type_value: "string",
},
],
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"identities": [
{
"ban_type": "unknown",
"ban_type_value": "string",
},
],
}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/bans/check", headers=headers, json=payload)Response200
{
"is_banned": true,
"ban_id": "411486491630370816"
}