PayNow

Discord

Get product version Discord actions

GEThttps://api.paynow.gg/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions

Retrieves all Discord actions configured for a product version 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 the product version belongs to.
productVersionIdFlakeIdRequired
The ID of the product version.
Response
200OKDiscordActionDto[]
Show fields
idFlakeIdRequired
action_typeenumRequired
Possible enum values
  • persist_role
  • send_message
  • ban_user
  • kick_user
  • generate_invite_link
discord_server_idFlakeIdRequired
execution_stageenumRequired
Possible enum values
  • on_purchase
  • on_expire
  • on_refund
  • on_chargeback
product_idFlakeIdRequired
product_version_idFlakeIdRequired
revocation_stagesenum[]Required
Possible enum values
  • on_expire
  • on_refund
  • on_chargeback
store_idFlakeIdRequired
channel_idFlakeIdOptional
messagestringOptional
role_idFlakeIdOptional

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "id": "411486491630370816",
    "action_type": "persist_role",
    "discord_server_id": "411486491630370816",
    "execution_stage": "on_purchase",
    "product_id": "411486491630370816",
    "product_version_id": "411486491630370816",
    "revocation_stages": [
      "on_expire"
    ],
    "store_id": "411486491630370816",
    "channel_id": "411486491630370816",
    "message": "string",
    "role_id": "411486491630370816"
  }
]

Set product version Discord actions

PUThttps://api.paynow.gg/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions

Replaces the Discord actions configured for a product version 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 the product version belongs to.
productVersionIdFlakeIdRequired
The ID of the product version.
Request body
action_typeenumRequired
Possible enum values
  • persist_role
  • send_message
  • ban_user
  • kick_user
  • generate_invite_link
discord_server_idFlakeIdRequired
execution_stageenumRequired
Possible enum values
  • on_purchase
  • on_expire
  • on_refund
  • on_chargeback
channel_idFlakeIdOptional
messagestringOptional
revocation_stagesenum[]Optional
Possible enum values
  • on_expire
  • on_refund
  • on_chargeback
role_idFlakeIdOptional
Response
200OKDiscordActionDto
Show fields
idFlakeIdRequired
action_typeenumRequired
Possible enum values
  • persist_role
  • send_message
  • ban_user
  • kick_user
  • generate_invite_link
discord_server_idFlakeIdRequired
execution_stageenumRequired
Possible enum values
  • on_purchase
  • on_expire
  • on_refund
  • on_chargeback
product_idFlakeIdRequired
product_version_idFlakeIdRequired
revocation_stagesenum[]Required
Possible enum values
  • on_expire
  • on_refund
  • on_chargeback
store_idFlakeIdRequired
channel_idFlakeIdOptional
messagestringOptional
role_idFlakeIdOptional

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

curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '[
  {
    "action_type": "persist_role",
    "discord_server_id": "411486491630370816",
    "execution_stage": "on_purchase",
    "channel_id": "411486491630370816",
    "message": "string",
    "revocation_stages": [
      "on_expire"
    ],
    "role_id": "411486491630370816"
  }
]'
Response200
{
  "id": "411486491630370816",
  "action_type": "persist_role",
  "discord_server_id": "411486491630370816",
  "execution_stage": "on_purchase",
  "product_id": "411486491630370816",
  "product_version_id": "411486491630370816",
  "revocation_stages": [
    "on_expire"
  ],
  "store_id": "411486491630370816",
  "channel_id": "411486491630370816",
  "message": "string",
  "role_id": "411486491630370816"
}

Get linked Discord accounts

GEThttps://api.paynow.gg/v1/stores/{storeId}/orders/{orderId}/discord

Retrieves the Discord accounts linked to an order 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 linked Discord accounts for.
orderIdFlakeIdRequired
The ID of the order.
Response
200OKobject

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/orders/{orderId}/discord" \
  -H "Authorization: APIKey TOKEN"
Response200
{}

Get Discord action execution history

GEThttps://api.paynow.gg/v1/stores/{storeId}/orders/{orderId}/discord/queued

Retrieves the history of Discord actions executed for an order 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 retrieve the Discord action history for.
orderIdFlakeIdRequired
The ID of the order.
Response
200OKQueuedDiscordActionDto[]
Show fields
idintegerRequired
action_typeenumRequired
Possible enum values
  • persist_role
  • send_message
  • ban_user
  • kick_user
  • generate_invite_link
delivery_item_idFlakeIdRequired
discord_server_idFlakeIdRequired
enqueued_atstringRequired
execution_stageenumRequired
Possible enum values
  • on_purchase
  • on_expire
  • on_refund
  • on_chargeback
executionsQueuedDiscordActionExecutionDto[]Required
idintegerRequired
executed_atstringRequired
execution_statusenumRequired
Possible enum values
  • success
  • failure
queue_idintegerRequired
messagestringOptional
trace_idstringOptional
product_idFlakeIdRequired
product_version_idFlakeIdRequired
revocation_stagesenum[]Required
Possible enum values
  • on_expire
  • on_refund
  • on_chargeback
statusenumRequired
Possible enum values
  • active
  • complete
  • errored
  • canceled
store_idFlakeIdRequired
channel_idFlakeIdOptional
checkout_idFlakeIdOptional
checkout_line_idFlakeIdOptional
discord_user_idFlakeIdOptional
finalised_atstringOptional
messagestringOptional
order_idFlakeIdOptional
role_idFlakeIdOptional

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/orders/{orderId}/discord/queued" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "id": 0,
    "action_type": "persist_role",
    "delivery_item_id": "411486491630370816",
    "discord_server_id": "411486491630370816",
    "enqueued_at": "2024-01-01T00:00:00Z",
    "execution_stage": "on_purchase",
    "executions": [
      {
        "id": 0,
        "executed_at": "2024-01-01T00:00:00Z",
        "execution_status": "success",
        "queue_id": 0,
        "message": "string",
        "trace_id": "string"
      }
    ],
    "product_id": "411486491630370816",
    "product_version_id": "411486491630370816",
    "revocation_stages": [
      "on_expire"
    ],
    "status": "active",
    "store_id": "411486491630370816",
    "channel_id": "411486491630370816",
    "checkout_id": "411486491630370816",
    "checkout_line_id": "411486491630370816",
    "discord_user_id": "411486491630370816",
    "finalised_at": "2024-01-01T00:00:00Z",
    "message": "string",
    "order_id": "411486491630370816",
    "role_id": "411486491630370816"
  }
]

Get queued Discord actions for delivery item

GEThttps://api.paynow.gg/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/queued

Retrieves all queued Discord actions for a delivery item 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 the delivery item belongs to.
inventoryItemIdFlakeIdRequired
The ID of the delivery item.
Response
200OKQueuedDiscordActionDto[]
Show fields
idintegerRequired
action_typeenumRequired
Possible enum values
  • persist_role
  • send_message
  • ban_user
  • kick_user
  • generate_invite_link
delivery_item_idFlakeIdRequired
discord_server_idFlakeIdRequired
enqueued_atstringRequired
execution_stageenumRequired
Possible enum values
  • on_purchase
  • on_expire
  • on_refund
  • on_chargeback
executionsQueuedDiscordActionExecutionDto[]Required
idintegerRequired
executed_atstringRequired
execution_statusenumRequired
Possible enum values
  • success
  • failure
queue_idintegerRequired
messagestringOptional
trace_idstringOptional
product_idFlakeIdRequired
product_version_idFlakeIdRequired
revocation_stagesenum[]Required
Possible enum values
  • on_expire
  • on_refund
  • on_chargeback
statusenumRequired
Possible enum values
  • active
  • complete
  • errored
  • canceled
store_idFlakeIdRequired
channel_idFlakeIdOptional
checkout_idFlakeIdOptional
checkout_line_idFlakeIdOptional
discord_user_idFlakeIdOptional
finalised_atstringOptional
messagestringOptional
order_idFlakeIdOptional
role_idFlakeIdOptional

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/queued" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "id": 0,
    "action_type": "persist_role",
    "delivery_item_id": "411486491630370816",
    "discord_server_id": "411486491630370816",
    "enqueued_at": "2024-01-01T00:00:00Z",
    "execution_stage": "on_purchase",
    "executions": [
      {
        "id": 0,
        "executed_at": "2024-01-01T00:00:00Z",
        "execution_status": "success",
        "queue_id": 0,
        "message": "string",
        "trace_id": "string"
      }
    ],
    "product_id": "411486491630370816",
    "product_version_id": "411486491630370816",
    "revocation_stages": [
      "on_expire"
    ],
    "status": "active",
    "store_id": "411486491630370816",
    "channel_id": "411486491630370816",
    "checkout_id": "411486491630370816",
    "checkout_line_id": "411486491630370816",
    "discord_user_id": "411486491630370816",
    "finalised_at": "2024-01-01T00:00:00Z",
    "message": "string",
    "order_id": "411486491630370816",
    "role_id": "411486491630370816"
  }
]

Get Discord server roles

GEThttps://api.paynow.gg/v1/stores/{storeId}/discord/{discordServerId}/roles

Retrieves all roles for a Discord server linked to the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store the Discord server is linked to.
discordServerIdintegerRequired
The ID of the Discord server.
Response
200OKDiscordServerRoleDto[]
Show fields
idFlakeIdRequired
namestringRequired

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/discord/{discordServerId}/roles" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "id": "411486491630370816",
    "name": "string"
  }
]

Get Discord server text channels

GEThttps://api.paynow.gg/v1/stores/{storeId}/discord/{discordServerId}/discord/text_channels

Retrieves all text channels for a Discord server linked to the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store the Discord server is linked to.
discordServerIdintegerRequired
The ID of the Discord server.
Response
200OKDiscordServerChannelDto[]
Show fields
idstringRequired
categorystringRequired
namestringRequired

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/discord/{discordServerId}/discord/text_channels" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "id": "string",
    "category": "string",
    "name": "string"
  }
]