rebilly-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and authenticate Rebilly subscription billing webhooks. Use when setting up a Rebilly webhook endpoint, checking HTTP basic access authentication…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Rebilly Webhooks
Rebilly sends a JSON webhook when something happens in your organization: a transaction is
processed, a customer is created, a subscription is activated, an invoice is issued. When the
webhook has HTTP basic access authentication credentials, every request carries
Authorization: Basic base64(username:password), and your endpoint authenticates the request by
checking them. Rebilly also signs every webhook (see below), but Hookdeck's Rebilly source checks
only basic auth, so set basic auth on the Rebilly webhook.
When to Use This Skill
- How do I receive Rebilly webhooks?
- How do I check the
Authorization: Basicheader on a Rebilly webhook? - Does Rebilly sign webhooks? (Yes,
Security-SignatureJWT andv2aand legacyv1aEd25519, but the examples check basic auth) - How do I handle
transaction-processed,subscription-activatedorinvoice-issuedevents? - Why does my Rebilly webhook endpoint return 401, or why does Rebilly keep retrying?
Verification (core)
const crypto = require('crypto');
const BASIC_RE = /^basic +([A-Za-z0-9+/]+={0,2})$/i; // strict base64 alphabet, scheme case-insensitive
const digest = (b) => crypto.createHash('sha256').update(b).digest();
const safeEqual = (a, b) => crypto.timingSafeEqual(digest(a), digest(b));
function verifyRebillyRequest(headers, username, password) {
if (!username || !password) return false; // never accept when unconfigured
const m = BASIC_RE.exec(headers.authorization || '');
if (!m || m[1].length % 4 !== 0) return false;
const decoded = Buffer.from(m[1], 'base64');
if (decoded.toString('base64') !== m[1]) return false; // reject non-canonical base64
const colon = decoded.indexOf(0x3a); // split on the FIRST colon
if (colon === -1) return false;
const userOk = safeEqual(decoded.subarray(0, colon), Buffer.from(username));
const passOk = safeEqual(decoded.subarray(colon + 1), Buffer.from(password));
return userOk && passOk; // both evaluated, no short-circuit
}
In Python, decode with base64.b64decode(value, validate=True), split with bytes.partition(b":")
and compare with hmac.compare_digest on bytes (encode both sides; str raises on non-ASCII).
- Header:
Authorization: Basic base64(username:password), set on the webhook in Rebilly. Environment variables:REBILLY_WEBHOOK_USERNAMEandREBILLY_WEBHOOK_PASSWORD. - Missing or malformed header, or a mismatch:
401. Check it first, for every HTTP method. - The credentials must arrive with each request: Event Gateway doesn't prompt for them, and a request with wrong ones still gets a 200 and is recorded as failed verification.
- A static shared credential authenticates the sender, not the body, and gives no replay protection (basic auth itself carries no signature or timestamp). Use HTTPS and rotate the credential if it leaks.
- Read the body raw (
express.raw({ type: '*/*' })) and parse it only after the check.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Rebilly Also Signs Webhooks
Rebilly sends a Security-Signature JWT and a webhook-signature header with Ed25519
signatures. Rebilly recommends the organization-bound v2a signature for new receivers and
continues to send v1a for existing receivers. Hookdeck's Rebilly source and the runnable
examples check HTTP basic auth. For optional body verification, including deliveries replayed
through Hookdeck, see signature verification.
Methods
A Rebilly webhook's method is one of GET, POST, PUT, PATCH or DELETE, so the handlers accept all five, check the credentials before anything else and handle an empty body. Any method the webhook uses must also be allowed on the Hookdeck source (custom methods).
Event Types
The payload has an eventType field plus the resource ids and HAL _embedded / _links. A
webhook's optional body template replaces this default payload. Dispatch on eventType.
| Event | Sent When |
|---|---|
transaction-processed |
A transaction is processed |
transaction-declined |
A transaction is declined |
customer-created |
A customer is created |
subscription-activated |
A subscription is activated |
subscription-canceled |
A subscription is canceled |
invoice-issued |
An invoice is issued |
invoice-paid |
An invoice is paid |
data-export-completed |
A data export is completed |
The full list is in the eventsFilter vocabulary of Rebilly's API reference.
Responding
Rebilly retries unless the response is exactly HTTP 200 (not 202 or 204), and also if there is
no response within 20 seconds. Return 200 quickly and process asynchronously. Webhooks can be
delivered more t
Установить rebilly-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл rebilly-webhooks?
Receive and authenticate Rebilly subscription billing webhooks. Use when setting up a Rebilly webhook endpoint, checking HTTP basic access authentication, debugging 401s, accepting GET/POST/PUT/PATCH/DELETE webhooks, or handling events like transaction-processed, customer-created, subscription-activated, invoice-issued and data-export-completed.
Как установить скилл rebilly-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rebilly-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic