Skip to main content

Build

Asaas Webhooks

HookdeckOfficialCertified

Receive and authenticate Asaas (Brazilian payments) webhooks. Use when setting up Asaas webhook handlers, debugging the asaas-access-token header or authToken check, or handling payment events like PAYMENT_CREATED, PAYMENT_RECEIVED, PAYMENT_CONFIRMED, and PAYMENT_OVERDUE.

  • New
  • v1.0.1
  • Reviewed Oct 21
  • No reviews yet

Capabilities

  • Verification (core)

    Asaas webhooks are not signed

  • Common Event Types

    The payload is { id, event, dateCreated, account, payment } (the resource key is subscription,

  • Local Development

  • Recommended: webhook-handler-patterns

    Install webhook-handler-patterns

Getting started

Full instructions

Example command

Local Development

npx hookdeck-cli listen 3000 asaas --path /webhooks/asaas

Instructions: SKILL.mdv1.0.1

Asaas Webhooks

When to Use This Skill

  • How do I receive Asaas webhooks?
  • How do I verify an Asaas webhook? Why is my asaas-access-token check failing?
  • How do I handle PAYMENT_RECEIVED, PAYMENT_CONFIRMED, or PAYMENT_OVERDUE events?
  • How do I stop processing duplicate Asaas webhook events?
  • Why did Asaas pause my webhook queue?

Verification (core)

Asaas webhooks are not signed. There is no HMAC and no timestamp. When you create the
webhook you choose an authToken (32-255 characters, no whitespace, and not your Asaas API key).
Asaas sends it unchanged in the asaas-access-token header on every delivery, so
verification is a constant-time comparison against the token you stored.

javascript
const crypto = require('crypto');

function verifyAsaasToken(receivedToken, expectedToken) {
  if (!receivedToken || !expectedToken) return false;
  // Hash both sides so timingSafeEqual always gets equal-length buffers.
  const a = crypto.createHash('sha256').update(receivedToken).digest();
  const b = crypto.createHash('sha256').update(expectedToken).digest();
  return crypto.timingSafeEqual(a, b);
}

// header: req.headers['asaas-access-token'], secret: process.env.ASAAS_WEBHOOK_TOKEN

Check the token before parsing or acting on the body, then dedupe on the event id
(delivery is at-least-once) and answer 200 quickly. Asaas pauses the queue after 15
consecutive failures.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Common Event Types

The payload is { id, event, dateCreated, account, payment } (the resource key is subscription,
transfer, or invoice for those families).

Event Triggered When
PAYMENT_CREATED A new charge is generated
PAYMENT_CONFIRMED Payment made, balance not yet available
PAYMENT_RECEIVED Charge received, amount available in the account
PAYMENT_OVERDUE Charge overdue
PAYMENT_REFUNDED Charge refunded
SUBSCRIPTION_CREATED A new subscription is created
TRANSFER_DONE A transfer is completed

See references/overview.md for the full list.

Environment Variables

bash
ASAAS_WEBHOOK_TOKEN=your_32_to_255_char_auth_token   # the authToken set on the webhook

Local Development

bash
npx hookdeck-cli listen 3000 asaas --path /webhooks/asaas

No account required: the CLI creates a guest account on first run and provides a local tunnel plus a web UI for inspecting requests. Use port 8000 for the FastAPI example.

Reference Materials

  • references/overview.md - What Asaas webhooks are, payload shape, event list
  • references/setup.md - Create the webhook and authToken, send type, IP allowlist
  • references/verification.md - Token check details and gotchas

Install webhook-handler-patterns
alongside this skill for cross-cutting concerns:

  • Handler sequence
  • Idempotency
  • Error handling
  • Retry logic
  • paystack-webhooks - Payments webhooks for African markets
  • razorpay-webhooks - Payments webhooks for India
  • mollie-webhooks - European payments webhooks
  • paypal-webhooks - PayPal payment events
  • airwallex-webhooks - Cross-border payments
  • checkout-com-webhooks - Payment gateway events
  • stripe-webhooks - Stripe payment events with HMAC signatures
  • webhook-handler-patterns - Idempotency, error handling, retry logic
  • hookdeck-event-gateway - Production webhook infrastructure

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed

Reviews (0)

More from Hookdeck

View source →
razorpay-webhooksReceive and verify Razorpay webhooks. Use when setting up Razorpay webhook handlers, debugging X-Razorpay-Signature verification, or handling payment events like payment.captured, payment.failed, order.paid, refund.processed, or…3 installsvercel-log-drains-webhooksReceive and verify Vercel Log Drains deliveries. Use when setting up a Vercel log drain HTTP endpoint, debugging x-vercel-signature verification, passing the drain's endpoint test, or processing batched log entries from sources like…1 installsstripe-webhooksReceive and verify Stripe webhooks. Use when setting up Stripe webhook handlers, debugging signature verification, or handling payment events like payment_intent.succeeded, customer.subscription.created, or invoice.paid.1 installsalchemy-webhooksReceive and verify Alchemy Notify webhooks. Use when setting up Alchemy webhook handlers, debugging X-Alchemy-Signature verification, or handling onchain events like ADDRESS_ACTIVITY, NFT_ACTIVITY, or GRAPHQL (Custom Webhook).1 installstiktok-webhooksReceive and verify TikTok for Developers webhooks (Login Kit, Content Posting, Data Portability). Use when setting up TikTok webhook handlers, debugging TikTok-Signature verification, or handling events like authorization.removed,…1 installsfedex-webhooksReceive and verify FedEx Advanced Integrated Visibility (AIV) shipment tracking webhooks. Use when setting up an AIV webhook or "Try this webhook" in the FedEx Developer Portal, verifying the fdx-signature header (base64 HMAC-SHA256 of the…1 installs

Frequently asked questions about asaas-webhooks

What does the asaas-webhooks skill do?

Receive and authenticate Asaas (Brazilian payments) webhooks. Use when setting up Asaas webhook handlers, debugging the asaas-access-token header or authToken check, or handling payment events like PAYMENT_CREATED, PAYMENT_RECEIVED, PAYMENT_CONFIRMED, and PAYMENT_OVERDUE. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the asaas-webhooks skill?

Run `npx @skills-hub-ai/cli install hookdeck-asaas-webhooks` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/hookdeck-asaas-webhooks/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does asaas-webhooks work with?

asaas-webhooks runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the asaas-webhooks skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use asaas-webhooks after installing it?

In Claude Code, type `/hookdeck-asaas-webhooks` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the asaas-webhooks skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/hookdeck-asaas-webhooks)](https://skills-hub.ai/skills/hookdeck-asaas-webhooks)
HTML
<a href="https://skills-hub.ai/skills/hookdeck-asaas-webhooks"><img src="https://skills-hub.ai/api/badges/skill/hookdeck-asaas-webhooks" alt="Install on Skills Hub"></a>

More options in the badge docs.