Saltar al contenido principal
POST
/
api
/
v1
/
webhooks
Create Webhook
curl --request POST \
  --url https://api.agentwallex.com/api/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "url": "https://your-app.com/webhooks/agentwallex",
  "events": [
    "payment.completed",
    "payment.failed",
    "policy.violated"
  ],
  "secret": "whsec_your_signing_secret"
}
'
{
  "id": "whk_abc123",
  "url": "https://your-app.com/webhooks/agentwallex",
  "events": [
    "payment.completed",
    "payment.failed",
    "policy.violated"
  ],
  "status": "active",
  "created_at": "2025-06-01T10:00:00Z"
}
Registre un nuevo endpoint de Webhook para recibir notificaciones de eventos en tiempo real a través de HTTP POST.

Cuerpo de la solicitud

url
string
requerido
La URL HTTPS que recibirá los eventos del Webhook.
events
string[]
requerido
Lista de tipos de eventos a los que suscribirse. Consulte Webhooks para los tipos de eventos disponibles.
secret
string
requerido
Secreto de firma utilizado para verificar las cargas del Webhook. Debe comenzar con whsec_.

Ejemplo

curl -X POST https://api.agentwallex.com/api/v1/webhooks \
  -H "X-API-Key: awx_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/agentwallex",
    "events": ["payment.completed", "payment.failed", "policy.violated"],
    "secret": "whsec_your_signing_secret"
  }'
Response
{
  "id": "whk_abc123",
  "url": "https://your-app.com/webhooks/agentwallex",
  "events": ["payment.completed", "payment.failed", "policy.violated"],
  "status": "active",
  "created_at": "2025-06-01T10:00:00Z"
}

Autorizaciones

X-API-Key
string
header
requerido

API key authentication. Keys are prefixed with awx_.

Cuerpo

application/json
url
string<uri>
requerido

The HTTPS URL that will receive webhook events.

events
string[]
requerido

List of event types to subscribe to (e.g., payment.completed, payment.failed, policy.violated).

secret
string
requerido

Signing secret used to verify webhook payloads. Must start with whsec_.

Respuesta

Webhook created successfully.

A registered webhook endpoint for receiving real-time event notifications.

id
string

Unique webhook identifier (e.g., whk_abc123).

url
string<uri>

HTTPS URL that receives webhook events.

events
string[]

List of subscribed event types.

status
enum<string>

Webhook status.

Opciones disponibles:
active,
inactive
created_at
string<date-time>

ISO 8601 creation timestamp.