Webhook events
Every event Hardcount sends, when it sends it, what its data carries, and
an example message. How messages are delivered, signed and retried:
Webhooks. How to build a receiver step by step:
Receive webhooks.
How to read this page
Section titled “How to read this page”- Each family of events carries one resource in
data, named in the family’s heading:data.,invoice data.and so on. It is the object the API returns for that resource, as it was when Hardcount made the event.subscription - “Also in
data” lists the other keys an event carries beside the resource. Each is always sent, even when it is empty, such asappliedondunning..escalated - The examples are the real shape of each message. Hardcount sends the
body on one line, with its keys in this order; it is indented here. Tests
check every example against the code that builds the message
(test files). The
examples share one fixed invoice, subscription, customer and so on, so a
value such as an invoice’s
statusdoes not always fit the event: theinvoice.example shows a paid invoice.finalized operatorincanceled_andby triggered_means a dashboard user or an API key.by
Terms: glossary.
Invoices: data.invoice
Section titled “Invoices: data.invoice”data. is the invoice as GET / returns it under
invoice. Three fields the API works out when you read it are left out:
attention, recovery_ and billing_. Line items
are not included; GET / returns them.
invoice.finalized
Section titled “invoice.finalized”An invoice is final and ready to pay. It is sent once per invoice. A draft
sends it when it is finalized. A top-up (billing_ topup) sends it
when it is paid, just before invoice., with its new invoice_.
Its amount_ is the amount before credit, and
credits_ is 0: Hardcount uses credit when it collects the
invoice, just after this event
(invoice.finalized shows the amount before credit).
Under Stripe Tax, tax_ can be recorded after this event;
GET / shows it.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "invoice.finalized", "id": "hc_whevt_golden"}invoice.paid
Section titled “invoice.paid”An invoice is fully paid, by card, credit or an offline payment, or a credit
note left nothing due. Its amount_ is what was paid at that
moment: 0 when credit or a credit note covered the rest.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "invoice.paid", "id": "hc_whevt_golden"}invoice.payment_recorded
Section titled “invoice.payment_recorded”Someone recorded a payment made outside Hardcount, such as a bank transfer
or a cheque. recovered_ is the status the invoice was paid from:
finalized, uncollectible, or draft for a top-up, which the payment
numbered and issued.
Also in data: recovered_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" }, "recovered_from": "uncollectible" }, "event_type": "invoice.payment_recorded", "id": "hc_whevt_golden"}invoice.marked_uncollectible
Section titled “invoice.marked_uncollectible”An invoice was written off as bad debt.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "invoice.marked_uncollectible", "id": "hc_whevt_golden"}invoice.voided
Section titled “invoice.voided”An invoice was voided. Under Stripe Tax, Hardcount reverses the invoice’s
tax just after the void is saved, so the invoice in this event has no
tax_; GET / shows it once that is done.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "invoice.voided", "id": "hc_whevt_golden"}Payments: data.invoice
Section titled “Payments: data.invoice”data. is the invoice the payment was for, in the same shape as for
the invoice events. Hardcount has no separate payment object. The invoice
holds the charge’s Stripe PaymentIntent (stripe_), its
error (last_) and whether it was paid outside Hardcount
(paid_).
The four anomaly events (payment.,
payment., payment. and
payment.) carry the charge that raised the
event: incoming_ is that charge, and captured_ is
what it took. Match the charge by incoming_, not by the
invoice’s stripe_. Each event below says which charge
the invoice’s stripe_ is.
Each anomaly is sent once per charge. When Stripe or Hardcount’s reconciler reports the same charge again, no second event is sent. The invoice keeps only its latest anomaly, so a charge reported again after another anomaly on the same invoice is sent again.
payment.succeeded
Section titled “payment.succeeded”A charge was collected. The invoice names its PaymentIntent.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "payment.succeeded", "id": "hc_whevt_golden"}payment.failed
Section titled “payment.failed”A charge the invoice was waiting on failed. It is sent once per charge attempt (PaymentIntent). A decline on the hosted payment page does not send it, because the customer saw it there and can try again.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "payment.failed", "id": "hc_whevt_golden"}payment.duplicate_charge
Section titled “payment.duplicate_charge”A second charge succeeded on an invoice that was already paid. Refund it.
The invoice’s stripe_ is the other charge, the one
Hardcount recorded on the paid invoice. It is left out when Hardcount
recorded none, such as when credit paid the invoice or it was paid outside
Hardcount (paid_ is true).
Also in data: incoming_, captured_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "captured_cents": 10825, "incoming_payment_intent_id": "pi_second", "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "payment.duplicate_charge", "id": "hc_whevt_golden"}payment.amount_mismatch
Section titled “payment.amount_mismatch”A charge settled for a different amount than the invoice owed. The invoice
was just paid by this charge, so its stripe_ is this
charge, and amount_ is what Hardcount recorded. The event is
saved with the payment, so this invoice, and the invoice in that payment’s
invoice. and payment., show the anomaly
(payment_).
Also in data: incoming_, captured_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "captured_cents": 10825, "incoming_payment_intent_id": "pi_second", "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "payment.amount_mismatch", "id": "hc_whevt_golden"}payment.currency_mismatch
Section titled “payment.currency_mismatch”A charge settled in a different currency than the invoice’s.
charge_ is the charge’s currency, in upper case; compare it with
the invoice’s currency. The payment is recorded as usual and nothing is
converted. Review it in Stripe. The invoice is as it was when the charge
arrived: its stripe_ may be this charge, an earlier one,
or none.
Also in data: incoming_, captured_,
charge_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "captured_cents": 10825, "charge_currency": "EUR", "incoming_payment_intent_id": "pi_second", "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "payment.currency_mismatch", "id": "hc_whevt_golden"}payment.received_on_voided_invoice
Section titled “payment.received_on_voided_invoice”Money arrived for a voided invoice. Refund it. The invoice is as it was
when the charge arrived: its stripe_ may be this charge,
an earlier one, or none.
Also in data: incoming_, captured_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "captured_cents": 10825, "incoming_payment_intent_id": "pi_second", "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "payment.received_on_voided_invoice", "id": "hc_whevt_golden"}payment.dispute_opened
Section titled “payment.dispute_opened”A customer disputed a card payment with their bank (a chargeback), and Hardcount recorded it against the invoice. It is sent once per dispute.
dispute is the dispute as GET / lists it, with
every field it has there, including stripe_, status, reason,
amount_, currency, evidence_ (the deadline to respond in
Stripe), opened_, and closed_ once it is closed. What a dispute does
and how to turn on Stripe’s dispute events:
Card disputes.
Also in data: dispute.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "dispute": { "amount_cents": 10825, "created_at": "2026-10-01T12:00:00Z", "currency": "USD", "evidence_due_by": "2026-10-08T12:00:00Z", "id": "hc_dsp_golden", "invoice_id": "hc_inv_golden", "livemode": false, "opened_at": "2026-10-01T12:00:00Z", "reason": "fraudulent", "status": "needs_response", "stripe_charge_id": "ch_golden", "stripe_dispute_id": "du_golden", "stripe_payment_intent_id": "pi_golden", "updated_at": "2026-10-01T12:00:00Z" }, "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "payment.dispute_opened", "id": "hc_whevt_golden"}payment.dispute_closed
Section titled “payment.dispute_closed”A recorded dispute closed. It is sent again if Stripe turns a loss into a
win. Its dispute. is won, lost, warning_ (an inquiry
that never became a chargeback) or prevented. When the first Stripe event
Hardcount receives is already the close, both dispute events are sent with
the closed status, in either order.
A loss on a top-up’s own payment, in the top-up’s currency, is recorded as
a credit note that takes back the unused credit the bank’s money paid for,
in the same step: dispute. names it. It is absent when the
payment’s credit notes already return all of it, and when Hardcount could
not read the customer’s usage not invoiced yet; then
POST / writes the note,
and no second event is sent.
Also in data: dispute.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "dispute": { "amount_cents": 10825, "created_at": "2026-10-01T12:00:00Z", "currency": "USD", "evidence_due_by": "2026-10-08T12:00:00Z", "id": "hc_dsp_golden", "invoice_id": "hc_inv_golden", "livemode": false, "opened_at": "2026-10-01T12:00:00Z", "reason": "fraudulent", "status": "needs_response", "stripe_charge_id": "ch_golden", "stripe_dispute_id": "du_golden", "stripe_payment_intent_id": "pi_golden", "updated_at": "2026-10-01T12:00:00Z" }, "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" } }, "event_type": "payment.dispute_closed", "id": "hc_whevt_golden"}payment.refunded_in_stripe
Section titled “payment.refunded_in_stripe”A payment on the invoice was refunded in Stripe, outside Hardcount (the Stripe dashboard, or Stripe’s API called directly), and Hardcount recorded it. It is sent once per refund, when the outcome is decided: at once for most refunds, and for a refund first seen pending, when Stripe says it succeeded, failed or was canceled.
refund is the refund as GET / lists it,
with stripe_, stripe_, amount_,
currency, Stripe’s status, and outcome, what Hardcount did with it:
credit_: Hardcount recorded it as the issued credit notenote credit_, whose card refund is this refund. Hardcount made no refund call for it, and the note reverses its share of the tax.note_ id other_: a refund of a payment that did not pay the invoice (a second charge, or money on a voided invoice). No credit note.payment needs_: a refund of the invoice’s own payment that Hardcount did not record;review review_says why. The invoice shows a notice until someone records it with a credit note or dismisses it, in the dashboard or with the API.reason not_: it failed or was canceled before it succeeded. No money moved.refunded
The invoice is as it was: a refund never changes its status or amounts. A
later change to the refund, such as a failure, sends nothing more; a
recorded note’s refund_ follows it. Refunds Hardcount makes itself
send no event. Hardcount hears of a refund made in Stripe only with
refund. on the Stripe webhook endpoint:
A refund made in Stripe.
Also in data: refund.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "invoice": { "amount_due_cents": 0, "amount_paid_cents": 10825, "billing_period_end": "2026-10-01T12:00:00Z", "billing_period_start": "2026-09-01T12:00:00Z", "billing_reason": "subscription_cycle", "billing_timezone": "UTC", "created_at": "2026-10-01T12:00:00Z", "credits_applied_cents": 0, "currency": "USD", "customer_id": "hc_cus_golden", "discount_cents": 0, "due_at": "2026-10-01T12:00:00Z", "id": "hc_inv_golden", "invoice_number": "HC-000042", "issued_at": "2026-10-01T12:00:00Z", "metadata": { "order": "A-1" }, "net_payment_term_days": 0, "paid_at": "2026-10-01T12:01:00Z", "paid_out_of_band": false, "payment_card_brand": "visa", "payment_card_last4": "4242", "payment_status": "succeeded", "status": "paid", "stripe_payment_intent_id": "pi_golden", "subscription_id": "hc_sub_golden", "subtotal_cents": 10000, "tax_amount_cents": 825, "tax_country": "US", "tax_inclusive": false, "tax_name": "Sales tax", "tax_provider": "manual", "tax_rate": 8.25, "tax_status": "ok", "tenant_id": "hc_ten_golden", "total_amount_cents": 10825, "updated_at": "2026-10-01T12:01:00Z" }, "refund": { "amount_cents": 4000, "created_at": "2026-10-01T12:00:00Z", "credit_note_id": "hc_cn_golden", "currency": "USD", "id": "hc_srf_golden", "invoice_id": "hc_inv_golden", "livemode": false, "outcome": "credit_note", "reason": "requested_by_customer", "refund_created_at": "2026-10-01T12:00:00Z", "status": "succeeded", "stripe_charge_id": "ch_golden", "stripe_payment_intent_id": "pi_golden", "stripe_refund_id": "re_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "payment.refunded_in_stripe", "id": "hc_whevt_golden"}Payment methods: data.payment_method
Section titled “Payment methods: data.payment_method”data. is the saved payment method as
GET / lists it: its type, whether
Hardcount can charge it (chargeable, true for a card), a card’s brand,
last 4 digits and expiry, and whether it is the default. A method Hardcount
can’t charge is never the default. A Stripe event that arrives after the
method was removed in Hardcount leaves it removed and sends neither event.
Each event reports a change to the card: a new card, or a new default flag, brand, last 4 digits or expiry. A Stripe event that changes nothing Hardcount has recorded sends no event, so a repeated Stripe event is not sent twice. One Stripe Checkout setup session sends two Stripe events for its card, and the second one sends an event only if it changed the card, for example by making it the default. Subscribe to both events to see every saved card.
payment_method.attached
Section titled “payment_method.attached”A customer saved a payment method. When it is chargeable, invoices
waiting for one are charged on the next billing run.
stripe_ is the method’s Stripe ID.
Also in data: stripe_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "payment_method": { "card_brand": "visa", "card_exp_month": 12, "card_exp_year": 2030, "card_last4": "4242", "chargeable": true, "created_at": "2026-10-01T12:00:00Z", "customer_id": "hc_cus_golden", "id": "hc_pm_golden", "is_default": true, "type": "card" }, "stripe_payment_method_id": "pm_golden" }, "event_type": "payment_method.attached", "id": "hc_whevt_golden"}payment_method.updated
Section titled “payment_method.updated”A customer’s payment method was set up or replaced through Stripe Checkout.
stripe_ is the Stripe customer it was saved to.
Also in data: stripe_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "payment_method": { "card_brand": "visa", "card_exp_month": 12, "card_exp_year": 2030, "card_last4": "4242", "chargeable": true, "created_at": "2026-10-01T12:00:00Z", "customer_id": "hc_cus_golden", "id": "hc_pm_golden", "is_default": true, "type": "card" }, "stripe_customer_id": "cus_golden" }, "event_type": "payment_method.updated", "id": "hc_whevt_golden"}Subscriptions: data.subscription
Section titled “Subscriptions: data.subscription”data. is the subscription with its plan, as
GET / returns it, without
current_ (a date range the API writes out when you
read it). A cancel’s time is the subscription’s canceled_. A scheduled
cancel’s time is its cancel_, the end of the current period.
These fields are left out when they are not set. The example subscription
has no cancel, so its examples do not show them.
subscription.created
Section titled “subscription.created”A subscription was created.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "subscription": { "billing_time": "calendar", "cancel_at_period_end": false, "code": "acme-pro", "created_at": "2026-09-01T12:00:00Z", "current_billing_period_end": "2026-11-01T12:00:00Z", "current_billing_period_start": "2026-10-01T12:00:00Z", "customer_id": "hc_cus_golden", "display_name": "Acme Pro", "id": "hc_sub_golden", "next_billing_at": "2026-11-01T12:00:00Z", "plan_id": "hc_pln_pro", "started_at": "2026-09-01T12:00:00Z", "status": "active", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "subscription.created", "id": "hc_whevt_golden"}subscription.canceled
Section titled “subscription.canceled”A subscription was canceled. canceled_ says who canceled it:
operator (a dashboard user or an API key), customer, schedule (a
cancel set for later), dunning (Hardcount’s automatic payment retries ran
out) or system (Hardcount itself). A cancel by dunning says dunning.
Also in data: canceled_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "canceled_by": "schedule", "subscription": { "billing_time": "calendar", "cancel_at_period_end": false, "code": "acme-pro", "created_at": "2026-09-01T12:00:00Z", "current_billing_period_end": "2026-11-01T12:00:00Z", "current_billing_period_start": "2026-10-01T12:00:00Z", "customer_id": "hc_cus_golden", "display_name": "Acme Pro", "id": "hc_sub_golden", "next_billing_at": "2026-11-01T12:00:00Z", "plan_id": "hc_pln_pro", "started_at": "2026-09-01T12:00:00Z", "status": "active", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "subscription.canceled", "id": "hc_whevt_golden"}subscription.cancel_scheduled
Section titled “subscription.cancel_scheduled”A cancel at period end was scheduled. A cancel now that takes effect at
the end of a period that has already ended sends it too, just before
subscription..
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "subscription": { "billing_time": "calendar", "cancel_at_period_end": false, "code": "acme-pro", "created_at": "2026-09-01T12:00:00Z", "current_billing_period_end": "2026-11-01T12:00:00Z", "current_billing_period_start": "2026-10-01T12:00:00Z", "customer_id": "hc_cus_golden", "display_name": "Acme Pro", "id": "hc_sub_golden", "next_billing_at": "2026-11-01T12:00:00Z", "plan_id": "hc_pln_pro", "started_at": "2026-09-01T12:00:00Z", "status": "active", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "subscription.cancel_scheduled", "id": "hc_whevt_golden"}subscription.cancel_cleared
Section titled “subscription.cancel_cleared”A scheduled cancel was removed. Clearing when no cancel is scheduled sends
nothing. A cancel now that scheduled itself for an ended period it then
could not bill also sends it, and is refused with unbilled_.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "subscription": { "billing_time": "calendar", "cancel_at_period_end": false, "code": "acme-pro", "created_at": "2026-09-01T12:00:00Z", "current_billing_period_end": "2026-11-01T12:00:00Z", "current_billing_period_start": "2026-10-01T12:00:00Z", "customer_id": "hc_cus_golden", "display_name": "Acme Pro", "id": "hc_sub_golden", "next_billing_at": "2026-11-01T12:00:00Z", "plan_id": "hc_pln_pro", "started_at": "2026-09-01T12:00:00Z", "status": "active", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "subscription.cancel_cleared", "id": "hc_whevt_golden"}subscription.pending_change.scheduled
Section titled “subscription.pending_change.scheduled”A plan change for the next billing period was scheduled. The subscription’s
pending_ and pending_ show it.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "subscription": { "billing_time": "calendar", "cancel_at_period_end": false, "code": "acme-pro", "created_at": "2026-09-01T12:00:00Z", "current_billing_period_end": "2026-11-01T12:00:00Z", "current_billing_period_start": "2026-10-01T12:00:00Z", "customer_id": "hc_cus_golden", "display_name": "Acme Pro", "id": "hc_sub_golden", "next_billing_at": "2026-11-01T12:00:00Z", "pending_plan_effective_at": "2026-11-01T12:00:00Z", "pending_plan_id": "hc_pln_team", "plan_id": "hc_pln_pro", "started_at": "2026-09-01T12:00:00Z", "status": "active", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "subscription.pending_change.scheduled", "id": "hc_whevt_golden"}subscription.pending_change.canceled
Section titled “subscription.pending_change.canceled”A scheduled plan change was canceled. A cancel call on a subscription with
no change scheduled sends nothing. If the change took effect at the period end
before the cancel reached it, the call answers 409 and sends nothing:
subscription. says what happened.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "subscription": { "billing_time": "calendar", "cancel_at_period_end": false, "code": "acme-pro", "created_at": "2026-09-01T12:00:00Z", "current_billing_period_end": "2026-11-01T12:00:00Z", "current_billing_period_start": "2026-10-01T12:00:00Z", "customer_id": "hc_cus_golden", "display_name": "Acme Pro", "id": "hc_sub_golden", "next_billing_at": "2026-11-01T12:00:00Z", "plan_id": "hc_pln_pro", "started_at": "2026-09-01T12:00:00Z", "status": "active", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "subscription.pending_change.canceled", "id": "hc_whevt_golden"}subscription.pending_change.applied
Section titled “subscription.pending_change.applied”A scheduled plan change was applied at the period end. The subscription’s
plan_id is the new plan, old_ the one it left, and applied_ when. The
subscription is as it was just before the period closed. Closing a period
means Hardcount builds its invoice and starts the next period.
Also in data: old_, applied_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "applied_at": "2026-10-01T12:00:00Z", "old_plan_id": "hc_pln_basic", "subscription": { "billing_time": "calendar", "cancel_at_period_end": false, "code": "acme-pro", "created_at": "2026-09-01T12:00:00Z", "current_billing_period_end": "2026-11-01T12:00:00Z", "current_billing_period_start": "2026-10-01T12:00:00Z", "customer_id": "hc_cus_golden", "display_name": "Acme Pro", "id": "hc_sub_golden", "next_billing_at": "2026-11-01T12:00:00Z", "plan_id": "hc_pln_pro", "started_at": "2026-09-01T12:00:00Z", "status": "active", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "subscription.pending_change.applied", "id": "hc_whevt_golden"}Customers: data.customer
Section titled “Customers: data.customer”data. is the customer as GET / returns it.
customer.email_bounced
Section titled “customer.email_bounced”An email to a customer bounced, and Hardcount stopped emailing that address.
reason is the email provider’s.
Also in data: reason.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "customer": { "created_at": "2026-08-02T12:00:00Z", "display_name": "Acme Inc", "email": "billing@acme.example", "email_bounce_reason": "mailbox does not exist", "email_last_bounced_at": "2026-10-01T12:00:00Z", "email_status": "bounced", "external_id": "acme-1", "id": "hc_cus_golden", "status": "active", "stripe_customer_id": "cus_golden", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" }, "reason": "mailbox does not exist" }, "event_type": "customer.email_bounced", "id": "hc_whevt_golden"}customer.email_complained
Section titled “customer.email_complained”A customer marked an email from Hardcount as spam, and Hardcount stopped
emailing that address. reason is the email provider’s.
Also in data: reason.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "customer": { "created_at": "2026-08-02T12:00:00Z", "display_name": "Acme Inc", "email": "billing@acme.example", "email_bounce_reason": "mailbox does not exist", "email_last_bounced_at": "2026-10-01T12:00:00Z", "email_status": "bounced", "external_id": "acme-1", "id": "hc_cus_golden", "status": "active", "stripe_customer_id": "cus_golden", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" }, "reason": "mailbox does not exist" }, "event_type": "customer.email_complained", "id": "hc_whevt_golden"}Dunning: data.dunning_run
Section titled “Dunning: data.dunning_run”Dunning is Hardcount retrying a failed payment on a schedule.
data. is the run as GET / returns it
under run: its invoice, state, attempts and how it was resolved. Four
fields the API adds when you read a run are left out: invoice_,
invoice_, invoice_ and max_.
dunning.started
Section titled “dunning.started”Payment retries started for an invoice.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "dunning_run": { "attempt_count": 4, "created_at": "2026-09-17T12:00:00Z", "customer_id": "hc_cus_golden", "id": "hc_drun_golden", "invoice_id": "hc_inv_golden", "last_attempt_at": "2026-10-01T11:00:00Z", "paused": false, "reason": "payment_failed", "resolution": "retries_exhausted", "resolved_at": "2026-10-01T12:00:00Z", "state": "escalated", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "dunning.started", "id": "hc_whevt_golden"}dunning.escalated
Section titled “dunning.escalated”Payment retries ran out, and the final action from your policy was taken.
final_ and final_ are your policy’s;
applied is what was done to this invoice, such as
subscription_, and empty when nothing
applied.
Also in data: final_, final_,
applied.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "applied": "subscription_canceled+invoice_marked_uncollectible", "dunning_run": { "attempt_count": 4, "created_at": "2026-09-17T12:00:00Z", "customer_id": "hc_cus_golden", "id": "hc_drun_golden", "invoice_id": "hc_inv_golden", "last_attempt_at": "2026-10-01T11:00:00Z", "paused": false, "reason": "payment_failed", "resolution": "retries_exhausted", "resolved_at": "2026-10-01T12:00:00Z", "state": "escalated", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" }, "final_invoice_action": "mark_uncollectible", "final_subscription_action": "cancel" }, "event_type": "dunning.escalated", "id": "hc_whevt_golden"}dunning.resolved
Section titled “dunning.resolved”Payment retries ended early, for example because the invoice was paid or
someone resolved it by hand. The run’s resolution says why.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "dunning_run": { "attempt_count": 4, "created_at": "2026-09-17T12:00:00Z", "customer_id": "hc_cus_golden", "id": "hc_drun_golden", "invoice_id": "hc_inv_golden", "last_attempt_at": "2026-10-01T11:00:00Z", "paused": false, "reason": "payment_failed", "resolution": "retries_exhausted", "resolved_at": "2026-10-01T12:00:00Z", "state": "escalated", "tenant_id": "hc_ten_golden", "updated_at": "2026-10-01T12:00:00Z" } }, "event_type": "dunning.resolved", "id": "hc_whevt_golden"}Credit: data.credit_balance
Section titled “Credit: data.credit_balance”data. is the customer’s credit balance in one currency, as
GET / lists it, after the change that sent
the event. The balance events follow the settled balance, not usage, so do
not use them to decide whether to keep serving a customer:
why.
credit.balance_low
Section titled “credit.balance_low”The settled credit balance in one currency fell below your account’s
threshold, threshold_. reason says why the balance fell:
usage: an invoice drew the credit;expiry: credit expired;adjustment: credit was deducted by hand;refund: a credit note took back credit a top-up bought, for a refund of unused credit, a refund made in Stripe or a lost dispute. Never top up automatically on it: that credit went back because its money went back to the customer.
Also in data: reason, threshold_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "credit_balance": { "balance_cents": 900, "currency": "USD", "customer_id": "hc_cus_golden", "total_deducted": 500, "total_expired": 100, "total_granted": 10000, "total_retired": 500, "total_used": 8000 }, "reason": "usage", "threshold_cents": 1000 }, "event_type": "credit.balance_low", "id": "hc_whevt_golden"}credit.balance_depleted
Section titled “credit.balance_depleted”The settled credit balance in one currency reached zero or less. reason
says why, as on credit..
Also in data: reason.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "credit_balance": { "balance_cents": 900, "currency": "USD", "customer_id": "hc_cus_golden", "total_deducted": 500, "total_expired": 100, "total_granted": 10000, "total_retired": 500, "total_used": 8000 }, "reason": "usage" }, "event_type": "credit.balance_depleted", "id": "hc_whevt_golden"}credit.balance_recovered
Section titled “credit.balance_recovered”The settled credit balance in one currency went above zero again.
Also in data: nothing.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "credit_balance": { "balance_cents": 900, "currency": "USD", "customer_id": "hc_cus_golden", "total_deducted": 500, "total_expired": 100, "total_granted": 10000, "total_retired": 500, "total_used": 8000 } }, "event_type": "credit.balance_recovered", "id": "hc_whevt_golden"}credit.commit_retired
Section titled “credit.commit_retired”A credit note took back prepaid credit from a prepaid commit: credit the customer paid for up front.
grant_: the prepaid credit grant.id funding_: the invoice that bought it.invoice_ id credit_: the credit note that took the credit back.note_ id retired_: the credit taken back.cents refunded_: the money the credit note returns.gross_ cents remaining_: what is left on the grant.after_ cents
Also in data: grant_, funding_,
credit_, retired_, refunded_,
remaining_.
Example message
{ "created_at": "2026-10-01T12:00:00Z", "data": { "credit_balance": { "balance_cents": 900, "currency": "USD", "customer_id": "hc_cus_golden", "total_deducted": 500, "total_expired": 100, "total_granted": 10000, "total_retired": 500, "total_used": 8000 }, "credit_note_id": "hc_cn_golden", "funding_invoice_id": "hc_inv_commit", "grant_id": "hc_ccl_golden", "refunded_gross_cents": 500, "remaining_after_cents": 0, "retired_cents": 500 }, "event_type": "credit.commit_retired", "id": "hc_whevt_golden"}Stuck, or found a bug? Ask in Discussions · Open an issue