Global Commands
Get global commands
Retrieves all global commands for the specified store.
Authorization: APIKey TOKEN.Show fieldsHide fields
created_byActorDtoRequired
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
invalidonce_per_itemExecutes commands regularly, once per item (number of products * quantity times)
once_per_orderExecutes command only once per entire order
invalidRepresents an invalid or unspecified command stage.
on_purchaseCommands that should be executed when a product is purchased.
on_expireCommands that should be executed when a product expires.
on_refundCommands that should be executed when a product is refunded.
on_renewCommands that should be executed when a subscription is renewed.
on_chargebackCommands that should be executed when an order is charged back.
on_trial_startCommands that should be executed when a trial is started.
on_trial_expireCommands that should be executed when a trial expires.
updated_byActorDtoOptional
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}/global-commands" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.globalCommands.getGlobalCommands();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/global-commands", headers=headers)[
{
"content": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"execution_rule": "invalid",
"id": "411486491630370816",
"online_only": true,
"override_execute_on_gameserver_ids": [
"411486491630370816"
],
"stage": "invalid",
"store_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"updated_by": {
"type": "anonymous",
"id": "411486491630370816"
}
}
]Create global command
Creates a global command for a store.
Authorization: APIKey TOKEN.invalidonce_per_itemExecutes commands regularly, once per item (number of products * quantity times)
once_per_orderExecutes command only once per entire order
invalidRepresents an invalid or unspecified command stage.
on_purchaseCommands that should be executed when a product is purchased.
on_expireCommands that should be executed when a product expires.
on_refundCommands that should be executed when a product is refunded.
on_renewCommands that should be executed when a subscription is renewed.
on_chargebackCommands that should be executed when an order is charged back.
on_trial_startCommands that should be executed when a trial is started.
on_trial_expireCommands that should be executed when a trial expires.
Show fieldsHide fields
created_byActorDtoRequired
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
invalidonce_per_itemExecutes commands regularly, once per item (number of products * quantity times)
once_per_orderExecutes command only once per entire order
invalidRepresents an invalid or unspecified command stage.
on_purchaseCommands that should be executed when a product is purchased.
on_expireCommands that should be executed when a product expires.
on_refundCommands that should be executed when a product is refunded.
on_renewCommands that should be executed when a subscription is renewed.
on_chargebackCommands that should be executed when an order is charged back.
on_trial_startCommands that should be executed when a trial is started.
on_trial_expireCommands that should be executed when a trial expires.
updated_byActorDtoOptional
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}/global-commands" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "string",
"execution_rule": "invalid",
"online_only": true,
"stage": "invalid",
"override_execute_on_gameserver_ids": [
"411486491630370816"
]
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.globalCommands.createGlobalCommand({
content: "string",
execution_rule: "invalid",
online_only: true,
stage: "invalid",
override_execute_on_gameserver_ids: [
"411486491630370816",
],
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"content": "string",
"execution_rule": "invalid",
"online_only": True,
"stage": "invalid",
"override_execute_on_gameserver_ids": [
"411486491630370816",
],
}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/global-commands", headers=headers, json=payload){
"content": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"execution_rule": "invalid",
"id": "411486491630370816",
"online_only": true,
"override_execute_on_gameserver_ids": [
"411486491630370816"
],
"stage": "invalid",
"store_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"updated_by": {
"type": "anonymous",
"id": "411486491630370816"
}
}Update global command
Updates a global command for a store.
Authorization: APIKey TOKEN.invalidonce_per_itemExecutes commands regularly, once per item (number of products * quantity times)
once_per_orderExecutes command only once per entire order
invalidRepresents an invalid or unspecified command stage.
on_purchaseCommands that should be executed when a product is purchased.
on_expireCommands that should be executed when a product expires.
on_refundCommands that should be executed when a product is refunded.
on_renewCommands that should be executed when a subscription is renewed.
on_chargebackCommands that should be executed when an order is charged back.
on_trial_startCommands that should be executed when a trial is started.
on_trial_expireCommands that should be executed when a trial expires.
Show fieldsHide fields
created_byActorDtoRequired
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
invalidonce_per_itemExecutes commands regularly, once per item (number of products * quantity times)
once_per_orderExecutes command only once per entire order
invalidRepresents an invalid or unspecified command stage.
on_purchaseCommands that should be executed when a product is purchased.
on_expireCommands that should be executed when a product expires.
on_refundCommands that should be executed when a product is refunded.
on_renewCommands that should be executed when a subscription is renewed.
on_chargebackCommands that should be executed when an order is charged back.
on_trial_startCommands that should be executed when a trial is started.
on_trial_expireCommands that should be executed when a trial expires.
updated_byActorDtoOptional
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}/global-commands/{globalCommandId}" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "string",
"execution_rule": "invalid",
"online_only": true,
"stage": "invalid",
"override_execute_on_gameserver_ids": [
"411486491630370816"
]
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.globalCommands.updateGlobalCommand("411486491630370816", {
content: "string",
execution_rule: "invalid",
online_only: true,
stage: "invalid",
override_execute_on_gameserver_ids: [
"411486491630370816",
],
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"content": "string",
"execution_rule": "invalid",
"online_only": True,
"stage": "invalid",
"override_execute_on_gameserver_ids": [
"411486491630370816",
],
}
response = requests.patch("https://api.paynow.gg/v1/stores/{storeId}/global-commands/{globalCommandId}", headers=headers, json=payload){
"content": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"execution_rule": "invalid",
"id": "411486491630370816",
"online_only": true,
"override_execute_on_gameserver_ids": [
"411486491630370816"
],
"stage": "invalid",
"store_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"updated_by": {
"type": "anonymous",
"id": "411486491630370816"
}
}Delete global command
Deletes a global command for a store.
Authorization: APIKey TOKEN.curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/global-commands/{globalCommandId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.globalCommands.deleteGlobalCommand("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/stores/{storeId}/global-commands/{globalCommandId}", headers=headers)