Enviar un evento de prueba
POST
/v1/webhook-endpoints/{id}/test
const url = 'https://api.chaski.ec/v1/webhook-endpoints/example/test';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"type":"invoice.authorized"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.chaski.ec/v1/webhook-endpoints/example/test \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "type": "invoice.authorized" }'Manda ya al webhook un evento firmado (por defecto, del primer tipo al que está suscrito) y devuelve qué respondió tu servidor. Los datos son de ejemplo y traen sample: true; el evento no se guarda, no aparece en las entregas y no se reintenta. Funciona aunque el webhook esté desactivado.
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»id
required
string
Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
type
string
Responses
Sección titulada «Responses»OK
Media typeapplication/json
object
Example
{ "event": { "id": "evt_01jbx3k9q2f8m4tn6vwz0yh5ce", "type": "invoice.authorized", "environment": "test" }}Petición inválida
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
field
string
key
additional properties
Example
{ "error": { "code": "invalid_request" }}Falta la API key o no es válida
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
field
string
key
additional properties
Example
{ "error": { "code": "invalid_request" }}No existe
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
field
string
key
additional properties
Example
{ "error": { "code": "invalid_request" }}Demasiadas peticiones
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
field
string
key
additional properties
Example
{ "error": { "code": "invalid_request" }}