curl https://api.onepay.la/v1/webhooks/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer sk_test_xxx"
const id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
const response = await fetch(`https://api.onepay.la/v1/webhooks/${id}`, {
headers: {
'Authorization': 'Bearer sk_test_xxx'
}
});
const webhook = await response.json();
import requests
webhook_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
response = requests.get(
f'https://api.onepay.la/v1/webhooks/{webhook_id}',
headers={'Authorization': 'Bearer sk_test_xxx'}
)
webhook = response.json()
<?php
$id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/webhooks/{$id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer sk_test_xxx"
]
]);
$response = curl_exec($curl);
$webhook = json_decode($response, true);
?>
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Webhook de producción",
"description": "Notificaciones de pagos aprobados",
"url": "https://mi-servidor.com/webhooks/onepay",
"events": [
"payment.approved",
"payment.rejected",
"charge.paid",
"charge.failed"
],
"header": null,
"is_test": false,
"created_at": "2025-01-20T14:30:00+00:00",
"updated_at": "2025-01-20T14:30:00+00:00"
}
}
{
"message": "Webhook no encontrado.",
"code": 10004,
"code_name": "not_found"
}
Retorna el detalle de un webhook específico.
GET
/
webhooks
/
{id}
curl https://api.onepay.la/v1/webhooks/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer sk_test_xxx"
const id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
const response = await fetch(`https://api.onepay.la/v1/webhooks/${id}`, {
headers: {
'Authorization': 'Bearer sk_test_xxx'
}
});
const webhook = await response.json();
import requests
webhook_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
response = requests.get(
f'https://api.onepay.la/v1/webhooks/{webhook_id}',
headers={'Authorization': 'Bearer sk_test_xxx'}
)
webhook = response.json()
<?php
$id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/webhooks/{$id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer sk_test_xxx"
]
]);
$response = curl_exec($curl);
$webhook = json_decode($response, true);
?>
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Webhook de producción",
"description": "Notificaciones de pagos aprobados",
"url": "https://mi-servidor.com/webhooks/onepay",
"events": [
"payment.approved",
"payment.rejected",
"charge.paid",
"charge.failed"
],
"header": null,
"is_test": false,
"created_at": "2025-01-20T14:30:00+00:00",
"updated_at": "2025-01-20T14:30:00+00:00"
}
}
{
"message": "Webhook no encontrado.",
"code": 10004,
"code_name": "not_found"
}
Path Parameters
ID del webhook a consultar.
curl https://api.onepay.la/v1/webhooks/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer sk_test_xxx"
const id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
const response = await fetch(`https://api.onepay.la/v1/webhooks/${id}`, {
headers: {
'Authorization': 'Bearer sk_test_xxx'
}
});
const webhook = await response.json();
import requests
webhook_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
response = requests.get(
f'https://api.onepay.la/v1/webhooks/{webhook_id}',
headers={'Authorization': 'Bearer sk_test_xxx'}
)
webhook = response.json()
<?php
$id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/webhooks/{$id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer sk_test_xxx"
]
]);
$response = curl_exec($curl);
$webhook = json_decode($response, true);
?>
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Webhook de producción",
"description": "Notificaciones de pagos aprobados",
"url": "https://mi-servidor.com/webhooks/onepay",
"events": [
"payment.approved",
"payment.rejected",
"charge.paid",
"charge.failed"
],
"header": null,
"is_test": false,
"created_at": "2025-01-20T14:30:00+00:00",
"updated_at": "2025-01-20T14:30:00+00:00"
}
}
{
"message": "Webhook no encontrado.",
"code": 10004,
"code_name": "not_found"
}
Was this page helpful?
⌘I