worldpay-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Access Worldpay event webhooks. Use when verifying the Event-Signature header ({keyId}/SHA256/{hex HMAC-SHA256 of the raw body}, several…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Worldpay Webhooks
Worldpay (worldpay.com, developer docs at docs.worldpay.com) is a card acquirer and payment processor, formerly part of FIS and earlier known as Vantiv and Litle. Global Payments acquired it in January 2026. This skill's code handles Access Worldpay event webhooks: JSON events signed with the Event-Signature header.
Also covered (briefly): WPG (Worldpay Payments Gateway / Corporate Gateway) XML order notifications, which are unsigned and need a literal [OK] reply. Not covered: Worldline (a different company with its own scheme) and the Worldpay for Platforms merchant-boarding notifications.
When to Use This Skill
- How do I verify the Worldpay
Event-Signatureheader? - Why does every Worldpay webhook fail verification? (the body was parsed before hashing)
- Why is
req.bodyempty in Express? (express.json()ignoresapplication/vnd.worldpay.events-v1.hal+json) - Why did verification break during a key renewal? (two signatures arrive; look the secret up by keyId)
- Why are my webhooks unsigned? (signing is opt-in through your Implementation Manager)
- What status code does Worldpay expect on a bad signature? (
400) - How do I tell
paymentrefusedfrompayoutrefused? - Why does Worldpay keep retrying my WPG XML notifications? (reply
200with the body[OK])
Verification (core)
| Part | Value |
|---|---|
| Header | Event-Signature: {keyId}/{hashFunction}/{signature}[,{keyId}/{hashFunction}/{signature}...] |
| Algorithm | SHA256 → HMAC-SHA256 |
| Encoding | Hex |
| Signed content | The raw request body bytes, nothing else: no timestamp, URL or headers |
| Key | The per-merchant shared secret for that keyId. Not the Access Worldpay API username/password |
const crypto = require('crypto');
// secrets: Map of keyId -> shared secret (WORLDPAY_WEBHOOK_SECRET_<keyId>)
function verifyWorldpay(rawBody, header, secrets) {
for (const entry of (header || '').split(',')) {
const [keyId, hashFunction, signature, ...rest] = entry.trim().split('/');
const secret = secrets.get(keyId);
if (rest.length || !signature || hashFunction.toUpperCase() !== 'SHA256' || !secret) continue;
const expected = Buffer.from(crypto.createHmac('sha256', secret).update(rawBody).digest('hex'));
const received = Buffer.from(signature.toLowerCase());
if (received.length === expected.length && crypto.timingSafeEqual(received, expected)) return true;
}
return false;
}
- Raw body only. Use
express.raw({ type: '*/*' })in Express,await request.text()in Next.js andawait request.body()in FastAPI. The raw read also gets around the vendor Content-Type, whichexpress.json()doesn't match. - Key renewal sends two entries in no fixed order. Look each secret up by its own keyId and accept the request if any entry verifies. Skip unknown keyIds and unsupported hash functions.
- Return
400, not401, for a missing header, a mismatch or a malformed header. That is Worldpay's documented contract. Return500and log if no secret is configured: fail closed, never skip the check. - Signing is opt-in. Ask your Implementation Manager to enable
Event-Signatureand send the shared secret. The examples reject unsigned requests. - No timestamp, no replay window. Dedupe on
eventIdinstead. - Python:
hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()+hmac.compare_digest. See references/verification.md.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Payload
{
"eventId": "bb55ca5a-e05c-47e1-8e94-e88bac1a0a17",
"eventTimestamp": "2018-06-13T14:18:13.407",
"eventDetails": {
"classification": "payment",
"type": "sentForAuthorization",
"transactionReference": "Memory265-13/08/1876",
"downstreamReference": "3378792436",
"date": "2018-06-13",
"amount": { "value": 100, "currencyCode": "EUR" },
"_links": { "...": "HAL links to the payment resource" }
}
}
eventIdis the dedupe key. Retries reuse it.eventTimestamphas no timezone designator in the spec example. Parse it leniently.amount.valueis in integer minor units:250is 2.50.downstreamReferenceand_linksare absent from the payout schemas. Treat them as optional.tokenCreatedhas foureventDetailsshapes (Card, Klarna, iDEAL, SEPA).
Event Types
Route on the pair (eventDetails.classification, eventDetails.type). type alone is not unique: refused exists as a payment event and as a payout event. There is no event-type header.
classification |
type values (26 in the OpenAPI spec) |
|---|---|
payment (20) |
sentForAuthorization, authorized, sentForSettlement, settled, settlementFailed, settlementInstructed, `settlementRe |
Установить worldpay-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл worldpay-webhooks?
Receive and verify Access Worldpay event webhooks. Use when verifying the Event-Signature header ({keyId}/SHA256/{hex HMAC-SHA256 of the raw body}, several comma-separated entries during key renewal), reading the application/vnd.worldpay.events-v1.hal+json body, debugging signature mismatches or empty request bodies, deduping retries on eventId, routing on eventDetails.classification and eventDetails.type, or handling authorized, sentForSettlement, settled, refused, refunded, payout and chargeback events. Also covers acknowledging WPG (Corporate Gateway) XML order notifications with [OK]. Not Worldline.
Как установить скилл worldpay-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл worldpay-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic