curl --request GET \
--url https://api.onepay.la/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Notificaciones de Pagos",
"description": "Webhook para recibir eventos de pagos",
"url": "https://mi-servidor.com/webhooks/onepay",
"events": [
"payment.approved",
"payment.rejected",
"payment.expired"
],
"header": "wh_hdr_abc123...",
"is_test": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-02-09T15:45:00Z"
}
}
curl --request GET \
--url https://api.onepay.la/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Notificaciones de Pagos",
"description": "Webhook para recibir eventos de pagos",
"url": "https://mi-servidor.com/webhooks/onepay",
"events": [
"payment.approved",
"payment.rejected",
"payment.expired"
],
"header": "wh_hdr_abc123...",
"is_test": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-02-09T15:45:00Z"
}
}
Show Propiedades del webhook
curl https://api.onepay.la/v1/webhooks/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer sk_test_xxx"
import fetch from 'node-fetch';
const webhookId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(`https://api.onepay.la/v1/webhooks/${webhookId}`, {
method: 'GET',
headers: {
Authorization: 'Bearer sk_test_xxx'
}
});
const data = await response.json();
console.log(data);
import requests
webhook_id = '550e8400-e29b-41d4-a716-446655440000'
headers = {
'Authorization': 'Bearer sk_test_xxx'
}
response = requests.get(f'https://api.onepay.la/v1/webhooks/{webhook_id}', headers=headers)
data = response.json()
print(data)
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Notificaciones de Pagos",
"description": "Webhook para recibir eventos de pagos",
"url": "https://mi-servidor.com/webhooks/onepay",
"events": [
"payment.approved",
"payment.rejected",
"payment.expired"
],
"header": "wh_hdr_abc123...",
"is_test": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-02-09T15:45:00Z"
}
}
{
"message": "No query results for model [Modules\\Developer\\App\\Models\\Webhook]."
}
Was this page helpful?