Endpoint
GET https://pay.sandbox.yabetoopay.com/v1/account/{accountId}/webhooks/{id} # Sandbox
GET https://pay.api.yabetoopay.com/v1/account/{accountId}/webhooks/{id} # Production
Authentication
Use your secret key in theAuthorization header:
Authorization: Bearer YOUR_SECRET_KEY
Path Parameters
| Parameter | Type | Description |
|---|---|---|
accountId | string | Your account ID |
id | string | The webhook ID |
Example Request
curl https://pay.sandbox.yabetoopay.com/v1/account/YOUR_ACCOUNT_ID/webhooks/whk_123456789 \
-H "Authorization: Bearer YOUR_SECRET_KEY"
import Yabetoo from "@yabetoo/sdk-js";
const yabetoo = new Yabetoo("YOUR_SECRET_KEY");
const webhook = await yabetoo.webhooks.retrieve("whk_123456789");
from yabetoo import Yabetoo
yabetoo = Yabetoo("YOUR_SECRET_KEY")
webhook = yabetoo.webhooks.retrieve("whk_123456789")
<?php
require 'vendor/autoload.php';
use Yabetoo\Yabetoo;
$yabetoo = new Yabetoo("YOUR_SECRET_KEY");
$webhook = $yabetoo->webhooks->retrieve("whk_123456789");
import com.yabetoo.Yabetoo;
import com.yabetoo.YabetooConfig;
import com.yabetoo.model.Webhook;
YabetooConfig config = new YabetooConfig()
.setApiKey("YOUR_SECRET_KEY");
Yabetoo yabetoo = new Yabetoo(config);
Webhook webhook = yabetoo.webhooks().retrieve("whk_123456789");
Response
200 OK
{
"id": "whk_123456789",
"object": "webhook",
"url": "https://example.com/webhooks",
"description": "Production webhook",
"status": "active",
"enabled_events": [
"intent.completed",
"disbursement.completed"
],
"metadata": {
"environment": "production"
},
"created_at": "2023-05-12T10:12:32Z",
"last_error": null,
"stats": {
"successful_deliveries": 150,
"failed_deliveries": 2,
"average_response_time": 245
}
}
Webhook Status
| Status | Description |
|---|---|
active | Webhook is active and functional |
disabled | Webhook manually disabled |
failed | Webhook disabled after too many failures |
Error Types
| Type | Description |
|---|---|
connection_error | Unable to connect to URL |
timeout_error | Response timeout exceeded |
invalid_response | Invalid response (code != 200) |
ssl_error | SSL certificate error |
404 Not Found
{
"message": "Webhook not found"
}
401 Unauthorized
{
"message": "Unauthorized"
}