Webhooks

Crear un endpoint de webhook

Registra una URL y los eventos a los que se suscribe. El secreto de firma (whsec_…) se devuelve una sola vez.

POST
/api/webhooks

Autorización

bearerAuth
AutorizaciónBearer <token>

JWT de operador (panel): Authorization: Bearer <jwt>.

In: header

Cuerpo de la petición

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Cuerpo de la respuesta

application/json

application/json

application/json

curl -X POST "https://example.com/api/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "string",    "events": [      "string"    ]  }'
{
  "data": {
    "id": "whk_1c9e2f",
    "merchant_id": "string",
    "url": "string",
    "events": [
      "string"
    ],
    "status": "active",
    "secret_masked": "string",
    "description": "string",
    "last_delivery_at": "2019-08-24T14:15:22Z",
    "last_delivery_status": "string",
    "created_at": "2019-08-24T14:15:22Z"
  },
  "secret": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
¿Te fue útil esta página?