Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.waffo.ai/llms.txt

Use this file to discover all available pages before exploring further.

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)

Error Responses

StatusDescription
400id not a valid UUID, events not a string array, or secret not a string/null
403Caller is not an owner or admin of the store
404Webhook not found