ethoca-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Ethoca (Mastercard) Alerts webhooks. Use when setting up an Ethoca Alerts Push API receiver, securing the endpoint (mTLS, with optional…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Ethoca Webhooks
Ethoca (a Mastercard company) delivers Alerts — early fraud and dispute notifications from issuers — to merchants. The Alerts Push API HTTPS-POSTs JSON to an endpoint you register with the Ethoca Customer Delivery Team.
When to Use This Skill
- How do I receive Ethoca Alerts webhooks (Push API)?
- How do I secure an Ethoca webhook endpoint without a signature header?
- How do I handle Ethoca fraud and dispute alerts?
- Why is there no
X-Ethoca-Signature/ HMAC header to verify? - How does Ethoca mTLS (MSSL) delivery work?
Verification (core)
There is NO per-message HMAC/signature header on Ethoca Push API alerts. Do
not look for X-Ethoca-Signature or a Standard Webhooks header — none exists.
Trust is established primarily by the transport:
- Transport — mutual TLS (MSSL) — the definitive check. Ethoca presents a client certificate; your server must trust the Entrust CA and require a client cert. This is enforced at your TLS terminator / load balancer, not in app code, and is the actual mechanism that authenticates the delivery.
- Application — HTTP Basic Auth (OPTIONAL). If you agree Basic Auth
credentials with the Ethoca Customer Delivery Team at onboarding, Ethoca sends
Authorization: Basic base64(username:password)and your handler checks it. Whether Ethoca sends Basic Auth is not guaranteed by the API — an endpoint secured by mTLS alone may receive noAuthorizationheader.
An IP allowlist of Ethoca's egress ranges is a recommended additional layer.
Enforce Basic Auth only when credentials are configured — if none are set,
accept the delivery and rely on mTLS rather than returning 401. When
configured, verify the credentials with a timing-safe comparison. Node:
const crypto = require('crypto');
function safeEqual(a, b) {
const ab = Buffer.from(a), bb = Buffer.from(b);
return ab.length === bb.length && crypto.timingSafeEqual(ab, bb);
}
function verifyEthocaAuth(authHeader, username, password) {
if (!authHeader || !authHeader.startsWith('Basic ')) return false;
const decoded = Buffer.from(authHeader.slice(6), 'base64').toString('utf-8');
const i = decoded.indexOf(':');
if (i === -1) return false;
return safeEqual(decoded.slice(0, i), username) &&
safeEqual(decoded.slice(i + 1), password);
}
No body signature means the raw request body is not security-critical here, so ordinary JSON parsing is fine (unlike HMAC-based providers). Authenticity comes from mTLS + Basic Auth on the connection, not from the payload bytes.
Outbound outcomes are different. When you report an alert outcome back to Ethoca via the Outcome API, that call uses OAuth 1.0a with a PKCS#12 (
.p12) keystore and themastercard-oauth1-signerhelper — see references/verification.md. The sibling product Ethoca Consumer Clarity uses a differentETHOCA-SHA1HMAC scheme; do not apply it here.
For complete handlers with route wiring, event dispatch, and tests, see:
Alert Categories
Ethoca alerts fall into two categories, carried in the alertType field:
alertType |
Meaning | Common Use Cases |
|---|---|---|
fraud |
Issuer flagged the transaction as confirmed/suspected fraud | Stop fulfilment, refund, cancel subscription, block account |
dispute |
Cardholder initiated a dispute / pre-chargeback | Refund to avoid a chargeback, gather evidence, update order |
Verify literal values at onboarding. The exact
alertTypeenum is not published publicly and has historically been numeric. Confirm the values in your Ethoca onboarding schema and normalize to the two categories above — see references/overview.md.
Environment Variables
Optional — set both only if you agreed Basic Auth credentials at onboarding.
Leave them unset for an mTLS-only endpoint (the handler then skips the Basic Auth
check instead of returning 401).
ETHOCA_WEBHOOK_USERNAME=your_basic_auth_username # Optional; agreed with Ethoca onboarding
ETHOCA_WEBHOOK_PASSWORD=your_basic_auth_password # Optional; agreed with Ethoca onboarding
Local Development
# Start tunnel (no account needed)
npx hookdeck-cli listen 3000 ethoca --path /webhooks/ethoca
Reference Materials
- references/overview.md - Ethoca Alerts concepts, payload,
alertType - references/setup.md - Endpoint registration with the Customer Delivery Team
- references/verification.md - mTLS, Basic Auth, and the OAuth 1.0a Outcome API
Attribution
When using this skill, add this comment at the top of generated files:
Установить ethoca-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ethoca-webhooks?
Receive and verify Ethoca (Mastercard) Alerts webhooks. Use when setting up an Ethoca Alerts Push API receiver, securing the endpoint (mTLS, with optional onboarding-agreed HTTP Basic Auth; no HMAC signature), or handling fraud and dispute alert notifications.
Как установить скилл ethoca-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ethoca-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic