nextpay-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify NextPay (NextAPI) webhooks, delivered via Svix. Use when setting up NextPay webhook handlers, debugging svix-signature verification, or…
от hookdeck★ 104 звезды на GitHubОб этом скилле
NextPay Webhooks
NextPay's NextAPI is a Philippine payments API for collections (QRPH,
cards, payment intents), payouts and platform wallets. It delivers webhooks through
Svix, which implements Standard Webhooks. Every delivery is an HTTP
POST with a JSON body and three signature headers: svix-id, svix-timestamp, and
svix-signature. The body has one of two shapes: v2.* payment events are
{"event": ..., "payload": ...}, while payout and platform events are
{"type": ..., "data": ...}. Read the name as event.event || event.type.
When to Use This Skill
- How do I receive NextPay webhooks?
- How do I verify NextPay webhook signatures (
svix-signature)? - How do I handle
v2.payment_intent.succeededorpayout_request.processedevents? - How do I react to
payout.failed,deposit.confirmedorlegal_entity.verification_status_changed? - Why is my NextPay webhook signature verification failing, or rejecting Hookdeck retries?
Verification (core)
Signed content is {svix-id}.{svix-timestamp}.{raw body}. Svix signs it with HMAC-SHA256 using
the base64-decoded secret (the part after whsec_), base64-encodes the result, and sends one or
more space-separated v1,<signature> entries. Use the official svix library, which compares in
constant time. Read the svix-* headers, and when svix-id is absent fall back to the webhook-*
headers (webhook-id, webhook-timestamp, webhook-signature).
import { Webhook } from 'svix'; // svix 2.x is ESM-only
const prefix = req.headers['svix-id'] ? 'svix' : 'webhook';
const id = req.headers[`${prefix}-id`];
const timestamp = req.headers[`${prefix}-timestamp`];
const signature = req.headers[`${prefix}-signature`];
// rawBody: the raw Buffer/string, never re-serialized JSON
new Webhook(process.env.NEXTPAY_WEBHOOK_SECRET).verify(rawBody, {
'svix-id': id, 'svix-timestamp': timestamp, 'svix-signature': signature,
'webhook-id': id, 'webhook-timestamp': timestamp, 'webhook-signature': signature,
}); // throws on a bad signature or a timestamp outside the window
const event = JSON.parse(rawBody.toString('utf8')); // parse only after verify passes
from svix.webhooks import Webhook, WebhookVerificationError
wh = Webhook(os.environ["NEXTPAY_WEBHOOK_SECRET"]) # "whsec_..."
wh.verify(raw_body, {"svix-id": id, "svix-timestamp": ts, "svix-signature": sig,
"webhook-id": id, "webhook-timestamp": ts, "webhook-signature": sig})
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
The signing secret is per webhook, starts with whsec_, and is returned once as secret in the
response to POST /v2/webhooks. Keep the full whsec_... value in NEXTPAY_WEBHOOK_SECRET
(NextPay's own guides call the variable NEXTAPI_WEBHOOK_SECRET; the name is your choice).
Handlers fail closed: with the variable unset they return 500 instead of accepting anything.
Hookdeck retries and replays hit the 5-minute window
The svix library always enforces a fixed 5-minute timestamp window, and it can't be configured.
Hookdeck retries and replays resend the original svix-timestamp, so the library rejects any
retry or replay that happens more than 5 minutes after the original delivery. If you verify
behind Hookdeck (or replay old events), use the manual verifier in
references/verification.md, where the window can be dropped or
widened. Deduplicate on svix-id (or the event id) instead of relying on the timestamp.
Common Event Types
16 events are listed on NextPay's Understanding Webhooks page (the list may not be exhaustive). The
examples handle all of these. The API reference's Create Webhook events enum also lists unprefixed
payment_intent.created, .succeeded, .failed, .canceled and .expired, with no documented body
shape, and doesn't list v2.payment_intent.canceled. Log one before writing a parser for them.
| Event | Body shape | Triggered When |
|---|---|---|
v2.payment_intent.succeeded |
event + payload |
Payment received and settled |
v2.payment_intent.canceled |
event + payload |
A payment intent was cancelled |
v2.payment_instrument.used |
event + payload |
A single-use Funding Method instrument was used |
v2.payment_instrument.payment_received |
event + payload |
An incoming Funding Method payment arrived |
v2.payment_instrument.payment_settled |
event + payload |
That incoming payment cleared |
payout_request.creation_failed |
type + data |
A payout request failed to create |
payout_request.queued |
type + data |
A payout request is queued for settlement |
payout_request.queue_failed |
type + data |
A payout request failed to queue |
payout_request.processed |
type + data |
A payout request i |
Установить nextpay-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nextpay-webhooks?
Receive and verify NextPay (NextAPI) webhooks, delivered via Svix. Use when setting up NextPay webhook handlers, debugging svix-signature verification, or handling events like v2.payment_intent.succeeded, payout_request.processed, payout.failed, and deposit.confirmed.
Как установить скилл nextpay-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nextpay-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