Skip to main content

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 the Authorization header:
Authorization: Bearer YOUR_SECRET_KEY

Path Parameters

ParameterTypeDescription
accountIdstringYour account ID
idstringThe webhook ID

Example Request

curl https://pay.sandbox.yabetoopay.com/v1/account/YOUR_ACCOUNT_ID/webhooks/whk_123456789 \
  -H "Authorization: Bearer YOUR_SECRET_KEY"

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

StatusDescription
activeWebhook is active and functional
disabledWebhook manually disabled
failedWebhook disabled after too many failures

Error Types

TypeDescription
connection_errorUnable to connect to URL
timeout_errorResponse timeout exceeded
invalid_responseInvalid response (code != 200)
ssl_errorSSL certificate error

404 Not Found

{
  "message": "Webhook not found"
}

401 Unauthorized

{
  "message": "Unauthorized"
}