Saltar al contenido principal

Webhook

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.

type Webhook {
id: ID!
accountId: ID!
url: String!
eventTypes: [WebhookEventType!]!
secret: String
enabled: Boolean!
createdAt: String!
updatedAt: String
lastResponse: CallbackData
}

Fields​

Webhook.id ● ID! non-null scalar​

Webhook ID.

Webhook.accountId ● ID! non-null scalar​

ID of the account that owns the webhook.

Webhook.url ● String! non-null scalar​

URL that receives the events. The dashboard shows it as URL and sends only https:// URLs. MONEI delivers only to http:// and https:// URLs.

Webhook.eventTypes ● [WebhookEventType!]! non-null enum​

Event types this webhook receives. Events of other types are not sent to it. The dashboard shows them as Event types.

Webhook.secret ● String scalar​

Sensitive: legacy signing secret of the webhook. The dashboard shows it as Signing secret when it is set. A webhook created through this API has none. MONEI signs with the account API key, and uses this secret only when the account has no API key. null without the credentials:read permission.

Webhook.enabled ● Boolean! non-null scalar​

Whether MONEI sends events to the webhook. The dashboard shows it as Status (Enabled or Disabled). MONEI sets it to false when a delivery runs out of attempts and the endpoint has failed every attempt for at least 7 days. Any successful delivery ends that run. A disabled webhook gets no events, and pending retries to it stop.

Webhook.createdAt ● String! non-null scalar​

Time the webhook was created, as an ISO 8601 string. The dashboard shows it as Created.

Webhook.updatedAt ● String scalar​

Time the webhook was last changed, as an ISO 8601 string. MONEI also changes it when it records a delivery result.

Webhook.lastResponse ● CallbackData object​

Result of the most recent delivery attempt to the webhook, from any event. null before the first attempt.

Returned By​

createWebhook mutation ● updateWebhook mutation ● webhook query

Member Of​

WebhooksConnection object