PayNow

Webhooks

Get webhooks

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

Retrieves all webhook subscriptions 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 webhooks for.
Response
200OKWebhookSubscriptionDto[]
Represents a webhook subscription: an endpoint that receives a request whenever one of the subscribed events happens in the store.
Show fields
idFlakeIdRequired
secretstringRequired
The secret used to sign each delivery. Receivers use it to verify the request's signature header and confirm it came from PayNow.
subscribed_toenumRequired
Possible enum values
  • OnIgnore
  • OnOrderCompleted
  • OnRefund
  • OnChargeback
  • OnDeliveryItemAdded
  • OnDeliveryItemActivated
  • OnDeliveryItemUsed
  • OnDeliveryItemRevoked
  • OnSubscriptionActivated
  • OnSubscriptionRenewed
  • OnSubscriptionCanceled
  • OnDiscordOrderActionsQueued
  • OnConnectedUserRegistered
  • OnConnectedUserBecamePayable
  • OnConnectedUserPayoutCreated
  • OnConnectedUserPayoutCompleted
  • OnConnectedUserTransactionInserted
  • OnConnectedUserBecameUnpayable
  • OnTrialActivated
  • OnTrialCompleted
  • OnTrialCanceled
  • OnPurchaseFollowUpAttemptEmailSent
  • OnPurchaseFollowUpAttemptSucceeded
  • OnAbandonedCheckoutRecoveryAttemptEmailSent
  • OnAbandonedCheckoutRecoveryAttemptSucceeded
  • OnChargebackClosed
  • OnDeliveryItemExpired
  • OnDeliveryItemRenewed
  • OnConnectedUserTrustStatusChanged
  • OnPaymentCompleted
  • OnPaymentFailed
typeenumRequired
Possible enum values
  • json_v1
  • discord_v1
urlstringRequired
The URL each event is delivered to. For the 'discord_v1' type this is the Discord webhook URL.
discord_colorstringOptional
The accent colour of the Discord embed, as a hex colour. Only used by the 'discord_v1' type with the 'embed' format.
discord_description_templatestringOptional
The template rendered into the body of the Discord message, with webhook variables substituted. Only used by the 'discord_v1' type.
discord_formatenumOptional
Specifies how a Discord webhook renders its message.
Possible enum values
  • Invalid

    No format specified. This value is typically used as a default or uninitialized state.

  • Embed

    The message is sent as a rich embed with the configured title, colour and description.

  • Text

    The message is sent as plain text rendered from the description template.

discord_titlestringOptional
The title of the Discord embed. Only used by the 'discord_v1' type with the 'embed' format.

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webhooks" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "id": "411486491630370816",
    "secret": "string",
    "subscribed_to": "OnIgnore",
    "type": "json_v1",
    "url": "string",
    "discord_color": "string",
    "discord_description_template": "string",
    "discord_format": "Invalid",
    "discord_title": "string"
  }
]

Create webhook

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

Creates a new webhook subscription 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 webhook in.
Request body
subscribed_toenumRequired
Possible enum values
  • OnIgnore
  • OnOrderCompleted
  • OnRefund
  • OnChargeback
  • OnDeliveryItemAdded
  • OnDeliveryItemActivated
  • OnDeliveryItemUsed
  • OnDeliveryItemRevoked
  • OnSubscriptionActivated
  • OnSubscriptionRenewed
  • OnSubscriptionCanceled
  • OnDiscordOrderActionsQueued
  • OnConnectedUserRegistered
  • OnConnectedUserBecamePayable
  • OnConnectedUserPayoutCreated
  • OnConnectedUserPayoutCompleted
  • OnConnectedUserTransactionInserted
  • OnConnectedUserBecameUnpayable
  • OnTrialActivated
  • OnTrialCompleted
  • OnTrialCanceled
  • OnPurchaseFollowUpAttemptEmailSent
  • OnPurchaseFollowUpAttemptSucceeded
  • OnAbandonedCheckoutRecoveryAttemptEmailSent
  • OnAbandonedCheckoutRecoveryAttemptSucceeded
  • OnChargebackClosed
  • OnDeliveryItemExpired
  • OnDeliveryItemRenewed
  • OnConnectedUserTrustStatusChanged
  • OnPaymentCompleted
  • OnPaymentFailed
typeenumRequired
Possible enum values
  • json_v1
  • discord_v1
urlstringRequired
discord_colorstringOptional
discord_description_templatestringOptional
discord_formatenumOptional
Specifies how a Discord webhook renders its message.
Possible enum values
  • Invalid

    No format specified. This value is typically used as a default or uninitialized state.

  • Embed

    The message is sent as a rich embed with the configured title, colour and description.

  • Text

    The message is sent as plain text rendered from the description template.

discord_titlestringOptional
Response
200OKWebhookSubscriptionDto
Represents a webhook subscription: an endpoint that receives a request whenever one of the subscribed events happens in the store.
Show fields
idFlakeIdRequired
secretstringRequired
The secret used to sign each delivery. Receivers use it to verify the request's signature header and confirm it came from PayNow.
subscribed_toenumRequired
Possible enum values
  • OnIgnore
  • OnOrderCompleted
  • OnRefund
  • OnChargeback
  • OnDeliveryItemAdded
  • OnDeliveryItemActivated
  • OnDeliveryItemUsed
  • OnDeliveryItemRevoked
  • OnSubscriptionActivated
  • OnSubscriptionRenewed
  • OnSubscriptionCanceled
  • OnDiscordOrderActionsQueued
  • OnConnectedUserRegistered
  • OnConnectedUserBecamePayable
  • OnConnectedUserPayoutCreated
  • OnConnectedUserPayoutCompleted
  • OnConnectedUserTransactionInserted
  • OnConnectedUserBecameUnpayable
  • OnTrialActivated
  • OnTrialCompleted
  • OnTrialCanceled
  • OnPurchaseFollowUpAttemptEmailSent
  • OnPurchaseFollowUpAttemptSucceeded
  • OnAbandonedCheckoutRecoveryAttemptEmailSent
  • OnAbandonedCheckoutRecoveryAttemptSucceeded
  • OnChargebackClosed
  • OnDeliveryItemExpired
  • OnDeliveryItemRenewed
  • OnConnectedUserTrustStatusChanged
  • OnPaymentCompleted
  • OnPaymentFailed
typeenumRequired
Possible enum values
  • json_v1
  • discord_v1
urlstringRequired
The URL each event is delivered to. For the 'discord_v1' type this is the Discord webhook URL.
discord_colorstringOptional
The accent colour of the Discord embed, as a hex colour. Only used by the 'discord_v1' type with the 'embed' format.
discord_description_templatestringOptional
The template rendered into the body of the Discord message, with webhook variables substituted. Only used by the 'discord_v1' type.
discord_formatenumOptional
Specifies how a Discord webhook renders its message.
Possible enum values
  • Invalid

    No format specified. This value is typically used as a default or uninitialized state.

  • Embed

    The message is sent as a rich embed with the configured title, colour and description.

  • Text

    The message is sent as plain text rendered from the description template.

discord_titlestringOptional
The title of the Discord embed. Only used by the 'discord_v1' type with the 'embed' format.

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

curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webhooks" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "subscribed_to": "OnIgnore",
  "type": "json_v1",
  "url": "string",
  "discord_color": "string",
  "discord_description_template": "string",
  "discord_format": "Invalid",
  "discord_title": "string"
}'
Response200
{
  "id": "411486491630370816",
  "secret": "string",
  "subscribed_to": "OnIgnore",
  "type": "json_v1",
  "url": "string",
  "discord_color": "string",
  "discord_description_template": "string",
  "discord_format": "Invalid",
  "discord_title": "string"
}

Get webhook variables

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

Retrieves the variables available to webhook payload templates 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 webhook variables for.
Response
200OKWebhookVariablesDto[]
Show fields
event_typeenumRequired
Possible enum values
  • OnIgnore
  • OnOrderCompleted
  • OnRefund
  • OnChargeback
  • OnDeliveryItemAdded
  • OnDeliveryItemActivated
  • OnDeliveryItemUsed
  • OnDeliveryItemRevoked
  • OnSubscriptionActivated
  • OnSubscriptionRenewed
  • OnSubscriptionCanceled
  • OnDiscordOrderActionsQueued
  • OnConnectedUserRegistered
  • OnConnectedUserBecamePayable
  • OnConnectedUserPayoutCreated
  • OnConnectedUserPayoutCompleted
  • OnConnectedUserTransactionInserted
  • OnConnectedUserBecameUnpayable
  • OnTrialActivated
  • OnTrialCompleted
  • OnTrialCanceled
  • OnPurchaseFollowUpAttemptEmailSent
  • OnPurchaseFollowUpAttemptSucceeded
  • OnAbandonedCheckoutRecoveryAttemptEmailSent
  • OnAbandonedCheckoutRecoveryAttemptSucceeded
  • OnChargebackClosed
  • OnDeliveryItemExpired
  • OnDeliveryItemRenewed
  • OnConnectedUserTrustStatusChanged
  • OnPaymentCompleted
  • OnPaymentFailed
variablesstring[]Required

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webhooks/variables" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "event_type": "OnIgnore",
    "variables": [
      "string"
    ]
  }
]

Update webhook by ID

PATCHhttps://api.paynow.gg/v1/stores/{storeId}/webhooks/{webhookId}

Performs a delta update of a webhook subscription 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 webhook for.
webhookIdFlakeIdRequired
The ID of the webhook.
Request body
reset_secretbooleanRequired
subscribed_toenumRequired
Possible enum values
  • OnIgnore
  • OnOrderCompleted
  • OnRefund
  • OnChargeback
  • OnDeliveryItemAdded
  • OnDeliveryItemActivated
  • OnDeliveryItemUsed
  • OnDeliveryItemRevoked
  • OnSubscriptionActivated
  • OnSubscriptionRenewed
  • OnSubscriptionCanceled
  • OnDiscordOrderActionsQueued
  • OnConnectedUserRegistered
  • OnConnectedUserBecamePayable
  • OnConnectedUserPayoutCreated
  • OnConnectedUserPayoutCompleted
  • OnConnectedUserTransactionInserted
  • OnConnectedUserBecameUnpayable
  • OnTrialActivated
  • OnTrialCompleted
  • OnTrialCanceled
  • OnPurchaseFollowUpAttemptEmailSent
  • OnPurchaseFollowUpAttemptSucceeded
  • OnAbandonedCheckoutRecoveryAttemptEmailSent
  • OnAbandonedCheckoutRecoveryAttemptSucceeded
  • OnChargebackClosed
  • OnDeliveryItemExpired
  • OnDeliveryItemRenewed
  • OnConnectedUserTrustStatusChanged
  • OnPaymentCompleted
  • OnPaymentFailed
urlstringRequired
discord_colorstringOptional
discord_description_templatestringOptional
discord_formatenumOptional
Specifies how a Discord webhook renders its message.
Possible enum values
  • Invalid

    No format specified. This value is typically used as a default or uninitialized state.

  • Embed

    The message is sent as a rich embed with the configured title, colour and description.

  • Text

    The message is sent as plain text rendered from the description template.

discord_titlestringOptional
Response
200OKWebhookSubscriptionDto
Represents a webhook subscription: an endpoint that receives a request whenever one of the subscribed events happens in the store.
Show fields
idFlakeIdRequired
secretstringRequired
The secret used to sign each delivery. Receivers use it to verify the request's signature header and confirm it came from PayNow.
subscribed_toenumRequired
Possible enum values
  • OnIgnore
  • OnOrderCompleted
  • OnRefund
  • OnChargeback
  • OnDeliveryItemAdded
  • OnDeliveryItemActivated
  • OnDeliveryItemUsed
  • OnDeliveryItemRevoked
  • OnSubscriptionActivated
  • OnSubscriptionRenewed
  • OnSubscriptionCanceled
  • OnDiscordOrderActionsQueued
  • OnConnectedUserRegistered
  • OnConnectedUserBecamePayable
  • OnConnectedUserPayoutCreated
  • OnConnectedUserPayoutCompleted
  • OnConnectedUserTransactionInserted
  • OnConnectedUserBecameUnpayable
  • OnTrialActivated
  • OnTrialCompleted
  • OnTrialCanceled
  • OnPurchaseFollowUpAttemptEmailSent
  • OnPurchaseFollowUpAttemptSucceeded
  • OnAbandonedCheckoutRecoveryAttemptEmailSent
  • OnAbandonedCheckoutRecoveryAttemptSucceeded
  • OnChargebackClosed
  • OnDeliveryItemExpired
  • OnDeliveryItemRenewed
  • OnConnectedUserTrustStatusChanged
  • OnPaymentCompleted
  • OnPaymentFailed
typeenumRequired
Possible enum values
  • json_v1
  • discord_v1
urlstringRequired
The URL each event is delivered to. For the 'discord_v1' type this is the Discord webhook URL.
discord_colorstringOptional
The accent colour of the Discord embed, as a hex colour. Only used by the 'discord_v1' type with the 'embed' format.
discord_description_templatestringOptional
The template rendered into the body of the Discord message, with webhook variables substituted. Only used by the 'discord_v1' type.
discord_formatenumOptional
Specifies how a Discord webhook renders its message.
Possible enum values
  • Invalid

    No format specified. This value is typically used as a default or uninitialized state.

  • Embed

    The message is sent as a rich embed with the configured title, colour and description.

  • Text

    The message is sent as plain text rendered from the description template.

discord_titlestringOptional
The title of the Discord embed. Only used by the 'discord_v1' type with the 'embed' format.

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

curl -X PATCH "https://api.paynow.gg/v1/stores/{storeId}/webhooks/{webhookId}" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "reset_secret": true,
  "subscribed_to": "OnIgnore",
  "url": "string",
  "discord_color": "string",
  "discord_description_template": "string",
  "discord_format": "Invalid",
  "discord_title": "string"
}'
Response200
{
  "id": "411486491630370816",
  "secret": "string",
  "subscribed_to": "OnIgnore",
  "type": "json_v1",
  "url": "string",
  "discord_color": "string",
  "discord_description_template": "string",
  "discord_format": "Invalid",
  "discord_title": "string"
}

Delete webhook by ID

DELETEhttps://api.paynow.gg/v1/stores/{storeId}/webhooks/{webhookId}

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

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

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

Resend webhook events

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

Resends the supplied webhook events 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 resend the webhook events for.
Request body
webhook_idFlakeIdRequired
Response
204No Content

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

curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webhooks/resend" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "webhook_id": "411486491630370816"
}'

Get webhook history

GEThttps://api.paynow.gg/v1/stores/{storeId}/webhooks/{webhookId}/history

Retrieves the delivery history of a webhook subscription 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 webhook history for.
webhookIdFlakeIdRequired
The ID of the webhook.
Query parameters
pageintegerOptional
The page of history to retrieve.
statestringOptional
Filters the history to a specific delivery state.
Response
200OKWebhookHistoryDto
Show fields
historyQueuedWebhookDto[]Required
idFlakeIdRequired
created_atstringRequired
eventenumRequired
Possible enum values
  • OnIgnore
  • OnOrderCompleted
  • OnRefund
  • OnChargeback
  • OnDeliveryItemAdded
  • OnDeliveryItemActivated
  • OnDeliveryItemUsed
  • OnDeliveryItemRevoked
  • OnSubscriptionActivated
  • OnSubscriptionRenewed
  • OnSubscriptionCanceled
  • OnDiscordOrderActionsQueued
  • OnConnectedUserRegistered
  • OnConnectedUserBecamePayable
  • OnConnectedUserPayoutCreated
  • OnConnectedUserPayoutCompleted
  • OnConnectedUserTransactionInserted
  • OnConnectedUserBecameUnpayable
  • OnTrialActivated
  • OnTrialCompleted
  • OnTrialCanceled
  • OnPurchaseFollowUpAttemptEmailSent
  • OnPurchaseFollowUpAttemptSucceeded
  • OnAbandonedCheckoutRecoveryAttemptEmailSent
  • OnAbandonedCheckoutRecoveryAttemptSucceeded
  • OnChargebackClosed
  • OnDeliveryItemExpired
  • OnDeliveryItemRenewed
  • OnConnectedUserTrustStatusChanged
  • OnPaymentCompleted
  • OnPaymentFailed
executionsExecutedWebhookDto[]Required
idFlakeIdRequired
started_atstringRequired
status_codeintegerRequired
finished_atstringOptional
responsestringOptional
payloadobjectRequired
stateenumRequired
Possible enum values
  • success
  • pending
  • failed
  • all
webhook_idFlakeIdRequired
next_retrystringOptional
pageintegerRequired

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webhooks/{webhookId}/history" \
  -H "Authorization: APIKey TOKEN"
Response200
{
  "history": [
    {
      "id": "411486491630370816",
      "created_at": "2024-01-01T00:00:00Z",
      "event": "OnIgnore",
      "executions": [
        {
          "id": "411486491630370816",
          "started_at": "2024-01-01T00:00:00Z",
          "status_code": 0,
          "finished_at": "2024-01-01T00:00:00Z",
          "response": "string"
        }
      ],
      "payload": {},
      "state": "success",
      "webhook_id": "411486491630370816",
      "next_retry": "2024-01-01T00:00:00Z"
    }
  ],
  "page": 0
}