Saltar al contenido principal

updateWebhook

Replaces the URL, event types and state of a webhook endpoint of the current account. With enabled: true, MONEI first sends a signed webhook.test request, and the mutation fails unless the URL answers with a 2xx status. Arguments: - input: Webhook ID and the new values.

updateWebhook(
input: UpdateWebhookInput!
): Webhook!

Arguments​

updateWebhook.input ● UpdateWebhookInput! non-null input​

Type​

Webhook object​

Endpoint that receives MONEI events as HTTP POST requests with a JSON body. The dashboard shows endpoints on Settings > Webhooks. The body is the event: id, type, livemode, accountId, objectType, objectId, createdAt (Unix seconds) and object. MONEI signs each attempt with the account API key, or with the legacy secret of the webhook when the account has no API key. The MONEI-Signature header is t=<unix seconds>,v1=<signature>, where the signature is the hex HMAC-SHA256 of <t>.<body>. Only a 2xx answer counts as delivered. MONEI does not follow redirects, and waits 60 seconds at most for an answer. MONEI does not send to a URL that resolves to a private or local address. A failed live delivery is retried with growing delays, up to 18 attempts over about 3 days. A test-mode delivery gets 3 attempts. A URL on a tunnelling or request-inspection host (ngrok, webhook.site) gets 1 attempt. MONEI emails the account admin when a live endpoint starts to fail, and disables the endpoint only after it fails without a break for 7 days.