nium-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and authenticate Nium webhooks. Use when setting up a Nium webhook endpoint, checking the static client-specified header (such as x-partner-key)…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Nium Webhooks
Nium is a cross-border payments platform (payouts, wallets, FX, card issuing, onboarding). It
sends a JSON POST to the endpoint you register whenever something happens: a customer's status
changes, a payout is paid, an FX conversion completes, a card transaction is approved, an RFI is
raised. The event is named in the body's template field.
Nium webhooks are not signed. There is no HMAC and no timestamp. During client setup you
agree a static header with Nium (the docs use x-partner-key as an example name, but the name
is your choice), and Nium adds it to every webhook. Your endpoint authenticates the request by
comparing that header's value with the secret you chose.
A static shared credential authenticates the sender, not the body, and gives no replay protection (no signature, no timestamp). Anyone who learns the value can send forged events, and a captured request can be replayed. Serve the endpoint over HTTPS only, rotate the credential with Nium if it leaks, and treat webhook bodies as hints: fetch current state from the Nium API before acting on money movement.
When to Use This Skill
- How do I receive Nium webhooks?
- How do I authenticate Nium webhook requests? Does Nium sign webhooks? (No: static header)
- How do I configure the
x-partner-keyheader for Nium webhooks? - How do I handle
REMIT_TRANSACTION_PAID_WEBHOOK,FX_CONVERSION_COMPLETED_WEBHOOKorCUSTOMER_STATUS_WEBHOOK? - How do I handle Nium RFI webhooks (
RFI_REQUESTED,RFI_RESPONDED,RFI_CLOSED)? - Why does my Nium webhook endpoint return 401?
Verification (core)
const crypto = require('crypto');
// Hash both sides: equal-length buffers, so timingSafeEqual never throws.
function safeEqual(a, b) {
const ha = crypto.createHash('sha256').update(String(a)).digest();
const hb = crypto.createHash('sha256').update(String(b)).digest();
return crypto.timingSafeEqual(ha, hb);
}
function verifyNiumRequest(
headers,
secret = process.env.NIUM_WEBHOOK_SECRET,
headerName = process.env.NIUM_WEBHOOK_HEADER || 'x-partner-key'
) {
if (!secret) return false; // never accept when unconfigured
const received = headers[headerName.toLowerCase()]; // Node lowercases header names
return Boolean(received) && safeEqual(received, secret); // compare the WHOLE value
}
- Header name: whatever you agreed with Nium (
NIUM_WEBHOOK_HEADER, defaultx-partner-key), looked up case-insensitively. - Value: the exact, whole header value (
NIUM_WEBHOOK_SECRET), including any prefix you typed such asBearer. Do not strip or parse aBearerprefix; compare it whole. - Return
401on a missing header or mismatch,400for a body that isn't a JSON object,200once handled. Nium treats any non-200 as a failed delivery. - Read the body raw (
express.raw({ type: '*/*' })) and authenticate before parsing it. - Python:
hmac.compare_digest(received.encode(), secret.encode()). Encode both sides to bytes; passingstrraisesTypeErroron non-ASCII values.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Event Types
Dispatch on template. RFI events have no template: use rfiDetails.status.
| Event | Sent When |
|---|---|
CUSTOMER_STATUS_WEBHOOK |
A customer's status or subStatus changes (onboarding, RFI, suspension) |
CUSTOMER_ODD_STATUS_WEBHOOK |
A customer's ongoing due diligence status changes |
CARD_CLIENT_KYB_STATUS_WEBHOOK |
The client's KYB compliance status changes |
REMIT_TRANSACTION_INITIATED_WEBHOOK |
A payout is initiated |
REMIT_TRANSACTION_PAID_WEBHOOK |
A payout is paid |
REMIT_TRANSACTION_REJECTED_WEBHOOK |
A payout is rejected |
REMIT_TRANSACTION_RETURNED_WEBHOOK |
A payout is returned |
FX_CONVERSION_COMPLETED_WEBHOOK |
An FX conversion settles |
FX_CONVERSION_FAILED_WEBHOOK |
An FX conversion fails |
FX_CONVERSION_CANCELLED_WEBHOOK |
An FX conversion is cancelled |
CARD_POS_APPROVED_WEBHOOK |
A point-of-sale card transaction is approved |
CARD_ATM_APPROVED_WEBHOOK |
An ATM card transaction is approved |
CARD_WALLET_FUNDING_WEBHOOK |
A card wallet receives funds |
VIRTUAL_ACCOUNT_ASSIGNED_WEBHOOK |
A virtual account is assigned |
INCOMING_FUNDS_WEBHOOK |
Funds arrive for a wallet |
RFI_REQUESTED (rfiDetails.status) |
Nium raises a Request for Information |
RFI_RESPONDED (rfiDetails.status) |
A response to an RFI is submitted |
RFI_CLOSED (rfiDetails.status) |
Nium cancels an RFI before it is resolved |
Nium defines many more templates (cards, wallets, direct debit, settlement); see references/overview.md.
Environment Variables
NIUM_WEBHOOK_HEADER=x-partner-key # header name agreed with Nium (default x-partner-key)
NIUM_WEBHOOK_SECRET=your-shared-secret #
Установить nium-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nium-webhooks?
Receive and authenticate Nium webhooks. Use when setting up a Nium webhook endpoint, checking the static client-specified header (such as x-partner-key), debugging 401s, or handling events like CUSTOMER_STATUS_WEBHOOK, REMIT_TRANSACTION_PAID_WEBHOOK, FX_CONVERSION_COMPLETED_WEBHOOK, CARD_POS_APPROVED_WEBHOOK and RFI requests.
Как установить скилл nium-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nium-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