Webhooks
Get webhooks
Retrieves all webhook subscriptions for the specified store.
Authorization: APIKey TOKEN.Show fieldsHide fields
OnIgnoreOnOrderCompletedOnRefundOnChargebackOnDeliveryItemAddedOnDeliveryItemActivatedOnDeliveryItemUsedOnDeliveryItemRevokedOnSubscriptionActivatedOnSubscriptionRenewedOnSubscriptionCanceledOnDiscordOrderActionsQueuedOnConnectedUserRegisteredOnConnectedUserBecamePayableOnConnectedUserPayoutCreatedOnConnectedUserPayoutCompletedOnConnectedUserTransactionInsertedOnConnectedUserBecameUnpayableOnTrialActivatedOnTrialCompletedOnTrialCanceledOnPurchaseFollowUpAttemptEmailSentOnPurchaseFollowUpAttemptSucceededOnAbandonedCheckoutRecoveryAttemptEmailSentOnAbandonedCheckoutRecoveryAttemptSucceededOnChargebackClosedOnDeliveryItemExpiredOnDeliveryItemRenewedOnConnectedUserTrustStatusChangedOnPaymentCompletedOnPaymentFailed
json_v1discord_v1
InvalidNo format specified. This value is typically used as a default or uninitialized state.
EmbedThe message is sent as a rich embed with the configured title, colour and description.
TextThe message is sent as plain text rendered from the description template.
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"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webhooks.getSubscriptions();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webhooks", headers=headers)[
{
"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
Creates a new webhook subscription in the specified store.
Authorization: APIKey TOKEN.OnIgnoreOnOrderCompletedOnRefundOnChargebackOnDeliveryItemAddedOnDeliveryItemActivatedOnDeliveryItemUsedOnDeliveryItemRevokedOnSubscriptionActivatedOnSubscriptionRenewedOnSubscriptionCanceledOnDiscordOrderActionsQueuedOnConnectedUserRegisteredOnConnectedUserBecamePayableOnConnectedUserPayoutCreatedOnConnectedUserPayoutCompletedOnConnectedUserTransactionInsertedOnConnectedUserBecameUnpayableOnTrialActivatedOnTrialCompletedOnTrialCanceledOnPurchaseFollowUpAttemptEmailSentOnPurchaseFollowUpAttemptSucceededOnAbandonedCheckoutRecoveryAttemptEmailSentOnAbandonedCheckoutRecoveryAttemptSucceededOnChargebackClosedOnDeliveryItemExpiredOnDeliveryItemRenewedOnConnectedUserTrustStatusChangedOnPaymentCompletedOnPaymentFailed
json_v1discord_v1
InvalidNo format specified. This value is typically used as a default or uninitialized state.
EmbedThe message is sent as a rich embed with the configured title, colour and description.
TextThe message is sent as plain text rendered from the description template.
Show fieldsHide fields
OnIgnoreOnOrderCompletedOnRefundOnChargebackOnDeliveryItemAddedOnDeliveryItemActivatedOnDeliveryItemUsedOnDeliveryItemRevokedOnSubscriptionActivatedOnSubscriptionRenewedOnSubscriptionCanceledOnDiscordOrderActionsQueuedOnConnectedUserRegisteredOnConnectedUserBecamePayableOnConnectedUserPayoutCreatedOnConnectedUserPayoutCompletedOnConnectedUserTransactionInsertedOnConnectedUserBecameUnpayableOnTrialActivatedOnTrialCompletedOnTrialCanceledOnPurchaseFollowUpAttemptEmailSentOnPurchaseFollowUpAttemptSucceededOnAbandonedCheckoutRecoveryAttemptEmailSentOnAbandonedCheckoutRecoveryAttemptSucceededOnChargebackClosedOnDeliveryItemExpiredOnDeliveryItemRenewedOnConnectedUserTrustStatusChangedOnPaymentCompletedOnPaymentFailed
json_v1discord_v1
InvalidNo format specified. This value is typically used as a default or uninitialized state.
EmbedThe message is sent as a rich embed with the configured title, colour and description.
TextThe message is sent as plain text rendered from the description template.
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"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webhooks.createSubscription({
subscribed_to: "OnIgnore",
type: "json_v1",
url: "string",
discord_color: "string",
discord_description_template: "string",
discord_format: "Invalid",
discord_title: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"subscribed_to": "OnIgnore",
"type": "json_v1",
"url": "string",
"discord_color": "string",
"discord_description_template": "string",
"discord_format": "Invalid",
"discord_title": "string",
}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webhooks", headers=headers, json=payload){
"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
Retrieves the variables available to webhook payload templates for the specified store.
Authorization: APIKey TOKEN.Show fieldsHide fields
OnIgnoreOnOrderCompletedOnRefundOnChargebackOnDeliveryItemAddedOnDeliveryItemActivatedOnDeliveryItemUsedOnDeliveryItemRevokedOnSubscriptionActivatedOnSubscriptionRenewedOnSubscriptionCanceledOnDiscordOrderActionsQueuedOnConnectedUserRegisteredOnConnectedUserBecamePayableOnConnectedUserPayoutCreatedOnConnectedUserPayoutCompletedOnConnectedUserTransactionInsertedOnConnectedUserBecameUnpayableOnTrialActivatedOnTrialCompletedOnTrialCanceledOnPurchaseFollowUpAttemptEmailSentOnPurchaseFollowUpAttemptSucceededOnAbandonedCheckoutRecoveryAttemptEmailSentOnAbandonedCheckoutRecoveryAttemptSucceededOnChargebackClosedOnDeliveryItemExpiredOnDeliveryItemRenewedOnConnectedUserTrustStatusChangedOnPaymentCompletedOnPaymentFailed
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"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webhooks.getVariables();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webhooks/variables", headers=headers)[
{
"event_type": "OnIgnore",
"variables": [
"string"
]
}
]Update webhook by ID
Performs a delta update of a webhook subscription by the ID for the specified store.
Authorization: APIKey TOKEN.OnIgnoreOnOrderCompletedOnRefundOnChargebackOnDeliveryItemAddedOnDeliveryItemActivatedOnDeliveryItemUsedOnDeliveryItemRevokedOnSubscriptionActivatedOnSubscriptionRenewedOnSubscriptionCanceledOnDiscordOrderActionsQueuedOnConnectedUserRegisteredOnConnectedUserBecamePayableOnConnectedUserPayoutCreatedOnConnectedUserPayoutCompletedOnConnectedUserTransactionInsertedOnConnectedUserBecameUnpayableOnTrialActivatedOnTrialCompletedOnTrialCanceledOnPurchaseFollowUpAttemptEmailSentOnPurchaseFollowUpAttemptSucceededOnAbandonedCheckoutRecoveryAttemptEmailSentOnAbandonedCheckoutRecoveryAttemptSucceededOnChargebackClosedOnDeliveryItemExpiredOnDeliveryItemRenewedOnConnectedUserTrustStatusChangedOnPaymentCompletedOnPaymentFailed
InvalidNo format specified. This value is typically used as a default or uninitialized state.
EmbedThe message is sent as a rich embed with the configured title, colour and description.
TextThe message is sent as plain text rendered from the description template.
Show fieldsHide fields
OnIgnoreOnOrderCompletedOnRefundOnChargebackOnDeliveryItemAddedOnDeliveryItemActivatedOnDeliveryItemUsedOnDeliveryItemRevokedOnSubscriptionActivatedOnSubscriptionRenewedOnSubscriptionCanceledOnDiscordOrderActionsQueuedOnConnectedUserRegisteredOnConnectedUserBecamePayableOnConnectedUserPayoutCreatedOnConnectedUserPayoutCompletedOnConnectedUserTransactionInsertedOnConnectedUserBecameUnpayableOnTrialActivatedOnTrialCompletedOnTrialCanceledOnPurchaseFollowUpAttemptEmailSentOnPurchaseFollowUpAttemptSucceededOnAbandonedCheckoutRecoveryAttemptEmailSentOnAbandonedCheckoutRecoveryAttemptSucceededOnChargebackClosedOnDeliveryItemExpiredOnDeliveryItemRenewedOnConnectedUserTrustStatusChangedOnPaymentCompletedOnPaymentFailed
json_v1discord_v1
InvalidNo format specified. This value is typically used as a default or uninitialized state.
EmbedThe message is sent as a rich embed with the configured title, colour and description.
TextThe message is sent as plain text rendered from the description template.
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"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webhooks.updateSubscription("411486491630370816", {
reset_secret: true,
subscribed_to: "OnIgnore",
url: "string",
discord_color: "string",
discord_description_template: "string",
discord_format: "Invalid",
discord_title: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"reset_secret": True,
"subscribed_to": "OnIgnore",
"url": "string",
"discord_color": "string",
"discord_description_template": "string",
"discord_format": "Invalid",
"discord_title": "string",
}
response = requests.patch("https://api.paynow.gg/v1/stores/{storeId}/webhooks/{webhookId}", headers=headers, json=payload){
"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
Deletes a webhook subscription by the ID for the specified store.
Authorization: APIKey TOKEN.curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/webhooks/{webhookId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webhooks.deleteSubscription("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/stores/{storeId}/webhooks/{webhookId}", headers=headers)Resend webhook events
Resends the supplied webhook events for the specified store.
Authorization: APIKey TOKEN.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"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webhooks.resend({
webhook_id: "411486491630370816",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"webhook_id": "411486491630370816",
}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webhooks/resend", headers=headers, json=payload)Get webhook history
Retrieves the delivery history of a webhook subscription by the ID for the specified store.
Authorization: APIKey TOKEN.Show fieldsHide fields
historyQueuedWebhookDto[]Required
OnIgnoreOnOrderCompletedOnRefundOnChargebackOnDeliveryItemAddedOnDeliveryItemActivatedOnDeliveryItemUsedOnDeliveryItemRevokedOnSubscriptionActivatedOnSubscriptionRenewedOnSubscriptionCanceledOnDiscordOrderActionsQueuedOnConnectedUserRegisteredOnConnectedUserBecamePayableOnConnectedUserPayoutCreatedOnConnectedUserPayoutCompletedOnConnectedUserTransactionInsertedOnConnectedUserBecameUnpayableOnTrialActivatedOnTrialCompletedOnTrialCanceledOnPurchaseFollowUpAttemptEmailSentOnPurchaseFollowUpAttemptSucceededOnAbandonedCheckoutRecoveryAttemptEmailSentOnAbandonedCheckoutRecoveryAttemptSucceededOnChargebackClosedOnDeliveryItemExpiredOnDeliveryItemRenewedOnConnectedUserTrustStatusChangedOnPaymentCompletedOnPaymentFailed
executionsExecutedWebhookDto[]Required
successpendingfailedall
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"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webhooks.getHistory("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webhooks/{webhookId}/history", headers=headers){
"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
}