Add a webhook endpoint
To start listening to webhook messages sent by Hyperline, go to your webhooks settings in the app and click Add endpoint. Enter the URL of an HTTPS endpoint that you control, and select the Events you want to listen to. Leave Events empty to receive all events. To separate the events you listen to, you can add as many endpoints as you want. You can also set:- Description: a label to recognize the endpoint in the list.
- Throttling rate: the maximum number of messages Hyperline sends to the endpoint per second. Leave it empty for no throttling.
Manage an endpoint
Select an endpoint in the Endpoints tab to open its details: URL, status, events, throttling rate, signing secret, delivery counts, and recent delivery attempts. From there, you can:- Add Custom headers that Hyperline includes in every request to the endpoint.
- Edit endpoint to change its URL, description, events, or throttling rate.
- Rotate signing secret. The current secret stays valid for 24 hours, so update your receiver with the new secret within that window.
- Disable endpoint to stop sending events to it, and Enable endpoint to resume.
- Delete endpoint. This action cannot be undone.
Event types
You can find a complete list of the event types in the product Webhooks page,
on the Event catalog tab. Select an event to see its payload fields and an
example payload.
customer.created,customer.updated,customer.archived,customer.recovered,customer.deletedsubscription.created,subscription.trial_ended,subscription.activated,subscription.reactivated,subscription.contract_started,subscription.contract_renewed,subscription.paused,subscription.phase_activated,subscription.updated,subscription.cancellation_scheduled,subscription.cancelled,subscription.voided,subscription.errored,subscription.charged,subscription.commitment_renewed,subscription.reinstated,subscription.analytics_updatedsubscription_transition.completedinvoice.created,invoice.grace_period.started,invoice.late,invoice.ready,invoice.reminder_sent,invoice.settled,invoice.errored,invoice.chargeback,invoice.voided,invoice.uncollectible,invoice.deletedinvoice.electronic_invoice.generated,invoice.electronic_invoice.sent,invoice.electronic_invoice.failedinvoice.batch.creation_succeeded,invoice.batch.creation_failedcredit_note.ready,credit_note.settled,credit_note.voidedcheckout.created,checkout.completedpayment_method.created,payment_method.activated,payment_method.errored,payment_method.deleted,payment_method.expiring_soon,payment_method.expiredwallet.credited,wallet.debited,wallet.low_projected_balancecredit.created,credit.updated,credit.balance_refreshed,credit.low_balance,credit.balance_at_zero,credit.topup_transaction_created,credit.usage_transaction_created,credit.expiration_transaction_createdquote.created,quote.updated,quote.approval_requested,quote.approved,quote.sent,quote.viewed,quote.signed,quote.voidedbank_account.created,bank_account.deleted,bank_account.erroredcustom_property.created,custom_property.updated,custom_property.deleted,custom_property.value_created,custom_property.value_updatedproduct.created,product.updated,product.archived,product.recovered,product.deletedplan.created,plan.updated,plan.deletedcoupon.created,coupon.updated,coupon.deletedpricebook.created,pricebook.updated,pricebook.deletedapproval_workflow.created,approval_workflow.updated,approval_workflow.deletedapproval_request.created,approval_request.step_approved,approval_request.step_rejected,approval_request.approved,approval_request.rejected,approval_request.cancelleddaily_analytics.readydataloader.failedaggregator.updated,aggregator.threshold_crossedevent.price_calculatedagent.run.completedcustom_action
Trigger webhooks with custom actions
Custom actions let your team trigger webhook-backed workflows directly from customer, invoice, quote, and subscription pages. An action appears at the top of the pages you select and sends acustom_action event when a user clicks it.
Create a custom action
- Go to Settings → Developers → Custom actions.
- Click Add action.
- Enter a Name. This label appears on the action button.
- Enter a Type. This stable slug identifies the action in the webhook payload as
custom_action_typeand can contain lowercase letters, numbers, and underscores. - Select an Icon.
- Select one or more Entities: customers, invoices, quotes, or subscriptions.
- Under Pages, select where the action appears: Detail pages, Edit pages, or both.
- Click Save changes.
A custom action configured for edit pages appears only after the entity has
been created, such as after a draft quote or subscription exists.
Receive custom action events
Configure your webhook endpoint to listen for thecustom_action event type. Hyperline sends the following payload when a user triggers an action:
Checkout sessions do not expire automatically, so Hyperline does not emit a
checkout.expired event. A checkout remains open until it is completed, cancelled, or errored.Consume webhooks
Webhook calls are alwaysPOST HTTPS requests containing a JSON body with this format:
Monitor deliveries
The Logs tab lists every message Hyperline sent, with its date, event, and event ID. Filter by event or date, or search by message ID or event ID. Select a message to view its payload, the endpoints that received it, and all of its delivery attempts with their status. The Activity tab shows a chart of successful and failed delivery attempts across all your endpoints over the selected period.Event delivery
Replay events
To resend one message, open it from the Logs tab or from the endpoint details, and click Resend next to the delivery attempt. To resend several messages to an endpoint at once, open the endpoint’s actions menu and select a period, from the last 8 hours to the last 2 weeks:- Recover failed messages resends every message that failed during the period.
- Replay missing messages sends every message the endpoint did not receive during the period.
Retry schedule
Hyperline attempts each message based on the following schedule. Each period starts after the preceding attempt fails:- Immediately
- 5 seconds
- 5 minutes
- 30 minutes
- 2 hours
- 5 hours
- 10 hours
- 10 hours (in addition to the previous)
Event ordering
Hyperline doesn’t guarantee delivery of events in the order in which they’re generated. You can find more details about why guaranteeing order doesn’t really work in this article. Your endpoint shouldn’t expect delivery of events in a specific order. Design your system so that it doesn’t require ordering. You can also use the API to fetch any missing objects. For example, you can fetch the subscription details using the ID provided in thesubscription.created event payload.
Static source IP addresses
In case your webhook receiving endpoint is behind a firewall or NAT, you may need to allow traffic from the static IP addresses of Hyperline’s webhook servers. In such scenarios, whitelist the following IP addresses:Best practices
Handle duplicate events
Webhook endpoints might occasionally receive the same event more than once. You can guard against duplicated event receipts by making your event processing idempotent. One way of doing this is logging the events you’ve processed, and then not processing already-logged events.Prevent stale data
Because Hyperline can retry webhooks, another update can occur once your server is finally able to process the event. Therefore, query the latest version of the related entity upon receiving a webhook.Verify webhooks
Verifying webhooks is an important part of consuming them. Because of the way webhooks work, attackers can impersonate services by sending a fake webhook to an endpoint. This is a potential security hole for your application. To prevent this, Hyperline signs every webhook and its metadata with a unique key for each endpoint. You can then use this signature to verify the webhook indeed comes from Hyperline, and only process it if it does. Another potential security hole is what’s called replay attacks. A replay attack is when an attacker intercepts a valid payload (including the signature), and re-transmits it to your endpoint. This payload passes signature validation, so your endpoint acts on it. To mitigate this attack, Hyperline includes a timestamp (webhook-timestamp header) in every request that indicates when the webhook attempt occurred. Reject webhooks with a timestamp that is more than five minutes away (past or future) from the current time.
Verifying signatures
Each webhook call includes three headers with additional information that you use for verification:
webhook-id: the unique message identifier for the webhook message. This identifier is unique across all messages but stays the same when Hyperline resends the same webhook (e.g., due to a previous failure).webhook-timestamp: timestamp in seconds since epoch.webhook-signature: the Base64 encoded list of signatures (space delimited).
.). In code, it looks something like:
body is the raw body of the request. The signature is sensitive to any change. Even a small change in the body produces a completely different signature, so don’t change the body in any way before verifying.
Determining the expected signature
Hyperline uses HMAC with SHA-256 to sign webhooks.
To calculate the expected signature, HMAC the signed_content from above using the base64 portion of your signing secret as the key. This is the part after the whsec_ prefix. For example, given the secret whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw, use MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw.
Here is an example of how you can calculate the signature in Node.js:
webhook-signature header.
This header contains a list of space-delimited signatures and their corresponding version identifiers. The signature list is most commonly of length one, though there could be any number of signatures. For example:

