v1

latestOpenAPI 3.0.1MIT2026-07-26336777.7 KB

Create a webhook configuration to receive realtime events for payments, intents, subscriptions, payouts, or setup methods.

post/webhook

Headers

Idempotency-Keystring

A unique key for making the request idempotent. Must match pattern: ^[a-zA-Z0-9\-_:\.]+$. See Idempotent Requests for more details.

Request body

eventSignerstring required

Secret used to sign outbound webhook events. Provide a value that you will use to verify the signature.

endpointstring required

Public HTTPS URL where xPay should POST webhook events.

subscribedEventTypesstring[] required

List of event types to subscribe to. Refer to webhook events for the full list of available events.

Example request

{
  "eventSigner": "secret_key",
  "endpoint": "https://your-webhook-endpoint.com/webhook",
  "subscribedEventTypes": [
    "intent.created",
    "intent.success",
    "intent.failed",
    "intent.refunded",
    "intent.checkout_opened",
    "subscription.trialing",
    "subscription.cycle_charged"
  ]
}

Response

Webhook configuration created successfully. Returns the identifier of the newly created webhook.

webhookConfigIdstring required

Identifier of the newly created webhook configuration.

Example response

{
  "webhookConfigId": "whc_gKAi2oZN1AeU7BfV"
}