- Direct webhook: Hotmart sends events to a Timely endpoint (or your own server), which triggers automations in the workspace.
- Native integration: configure the webhook URL generated by your Timely agent directly in the Hotmart dashboard.
Configure the webhook URL in Hotmart
Access the Hotmart dashboard
Go to Tools → Webhooks in your Hotmart account (producer or co-producer).
Add a new webhook
Click Add webhook and enter the URL. To send events to a Timely agent, use the endpoint generated under Settings → Channels → Incoming Webhook in your workspace.
Select events
Select
PURCHASE_COMPLETE, PURCHASE_CANCELED, PURCHASE_REFUNDED, SUBSCRIPTION_CANCELLATION, and others as needed.Hotmart signature validation
Hotmart sends theX-Hotmart-Webhook-Token header with a fixed token you configure in the dashboard. This is not HMAC — it is a direct token comparison. For that reason, make sure to use HTTPS and keep the token secret.
Node.js
Event: PURCHASE_COMPLETE
Triggered when a purchase is approved (credit card, cleared bank slip, confirmed PIX).Event: PURCHASE_CANCELED
Triggered when a purchase is canceled before compensation (expired bank slip, card definitively declined).Event: PURCHASE_REFUNDED
Triggered when a refund is approved after the purchase was already completed.Event: SUBSCRIPTION_CANCELLATION
Triggered when a recurring subscription is canceled (by the buyer or the producer).Other available events
| Event | When it occurs |
|---|---|
PURCHASE_COMPLETE | Purchase approved |
PURCHASE_CANCELED | Purchase canceled |
PURCHASE_REFUNDED | Refund approved |
PURCHASE_CHARGEBACK | Chargeback filed |
PURCHASE_PROTEST | Dispute opened |
PURCHASE_DELAYED | Delayed payment (bank slip) |
PURCHASE_EXPIRED | Bank slip expired without payment |
SUBSCRIPTION_CANCELLATION | Subscription canceled |
SWITCH_PLAN | Buyer changed plans |
Key payload fields
| Field | Type | Description |
|---|---|---|
id | string | Unique Hotmart event ID (HP-*) |
event | string | Event type |
creation_date | number | Timestamp in milliseconds |
data.product.id | number | Product ID in Hotmart |
data.purchase.transaction | string | Unique transaction code |
data.purchase.status | string | Purchase status |
data.buyer.email | string | Buyer’s email |
data.buyer.phone | string | Phone number (international format) |
data.subscription.subscriber_code | string | Unique subscriber code |
Common automations with Hotmart
Welcome message via WhatsApp
On receiving
PURCHASE_COMPLETE, send an automatic message via the Timely agent using the buyer’s phone.Revoke access
On receiving
SUBSCRIPTION_CANCELLATION, remove the contact from groups or mark them as inactive in Timely’s CRM.Bank slip recovery
On receiving
PURCHASE_EXPIRED, start a recovery flow with a message and a new payment link.CRM update
Sync buyer data as a contact in Timely using the Contacts API.
Next steps
Contacts — API Reference
Create and update contacts programmatically when receiving Hotmart events.
Webhooks — API Reference
Configure endpoints to receive events from your Timely workspace.