Skip to main content
Update an existing webhook’s URL, subscribed events, or channel-specific secret. The channel and testMode fields are immutable — to change them, remove and re-add the webhook.
POST /v1/actions/store/update-webhook
Authentication: API Key (owner or admin role required)

Request Body

FieldTypeRequiredDescription
idstringYesWebhook UUID (returned from add-webhook or GraphQL Store.storeWebhooks)
urlstringNoReplace target URL.
eventsstring[]NoReplace subscribed event types
secretstring | nullNoReplace channel-specific credential. Pass null to clear.
channel is permanent for a given webhook record — to switch channel, remove and re-add. URL changes are accepted as-is; merchant ensures the new URL matches the channel.

Example Request

import { WaffoPancake } from "@waffo/pancake-ts";

const client = new WaffoPancake({
  merchantId: process.env.WAFFO_MERCHANT_ID!,
  privateKey: process.env.WAFFO_PRIVATE_KEY!,
});

// Add more events to an existing webhook
await client.webhooks.update({
  id: "11111111-2222-3333-4444-555555555555",
  events: ["order.completed", "refund.succeeded", "subscription.canceled"],
});

Success Response (200)

Returns the updated webhook entity. Identical shape to add-webhook.

Response Fields

FieldTypeDescription
idstringWebhook UUID
storeIdstringOwning store UUID
channelstringWebhook channel (immutable)
urlstringTarget webhook URL
eventsstring[]Subscribed event types
testModebooleantrue for test transactions, false for production (immutable)
secretstring | nullChannel-specific credential, null if cleared
createdAtstringCreation timestamp (ISO 8601)
updatedAtstringLast update timestamp (ISO 8601)

Errors

Retry policy: Never retry 4xx — fix the request and resubmit. Retry 5xx with exponential backoff (start 5s, max 3 attempts).
Statuserrors[0].messageWhat it meansRecommended handling
400Missing required field: idid was not providedFix the request body, resubmit
400id must be a valid UUIDid is not a valid UUIDFix the id, resubmit
400Invalid URL formaturl could not be parsed as a valid URLFix the URL format (HTTPS, well-formed), resubmit
400events must be a string arrayevents is not a JSON array of stringsSend events as a string array (e.g. ["order.completed"])
400secret must be a string or nullsecret is neither a string nor nullSend a string value, or null to clear
403Not authorized to manage webhooks for this storeThe caller’s merchant role on the owning store is not owner or adminSwitch to an API Key whose merchant has the required role
404Webhook not foundNo webhook matches the supplied id (or deleted by a concurrent request)Verify the id; if just removed, re-list webhooks before retrying
500Internal server errorUnexpected server-side failureRetry with exponential backoff (start 5s, max 3 attempts)