curl --request GET \
--url https://api.onepay.la/v1/webhooks \
--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"
],
"header": "wh_hdr_abc123...",
"is_test": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Notificaciones de Cargos",
"description": null,
"url": "https://mi-servidor.com/webhooks/charges",
"events": [
"charge.paid",
"charge.failed"
],
"header": "wh_hdr_def456...",
"is_test": false,
"created_at": "2024-02-01T14:20:00Z",
"updated_at": "2024-02-05T09:15:00Z"
}
]
}
curl --request GET \
--url https://api.onepay.la/v1/webhooks \
--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"
],
"header": "wh_hdr_abc123...",
"is_test": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Notificaciones de Cargos",
"description": null,
"url": "https://mi-servidor.com/webhooks/charges",
"events": [
"charge.paid",
"charge.failed"
],
"header": "wh_hdr_def456...",
"is_test": false,
"created_at": "2024-02-01T14:20:00Z",
"updated_at": "2024-02-05T09:15:00Z"
}
]
}
Show Propiedades del webhook
curl https://api.onepay.la/v1/webhooks \
-H "Authorization: Bearer sk_test_xxx"
import fetch from 'node-fetch';
const response = await fetch('https://api.onepay.la/v1/webhooks', {
method: 'GET',
headers: {
Authorization: 'Bearer sk_test_xxx'
}
});
const data = await response.json();
console.log(data);
import requests
headers = {
'Authorization': 'Bearer sk_test_xxx'
}
response = requests.get('https://api.onepay.la/v1/webhooks', 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"
],
"header": "wh_hdr_abc123...",
"is_test": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Notificaciones de Cargos",
"description": null,
"url": "https://mi-servidor.com/webhooks/charges",
"events": [
"charge.paid",
"charge.failed"
],
"header": "wh_hdr_def456...",
"is_test": false,
"created_at": "2024-02-01T14:20:00Z",
"updated_at": "2024-02-05T09:15:00Z"
}
]
}
Was this page helpful?