Webhook events
The events that your organization's webhook endpoint receives, and how to apply them.
Each change to a subscription, an invoice, a payment, a saved card or an e-CF sends an event to your organization's webhook endpoint. An owner or admin sets the endpoint in the Webhooks section of the dashboard. The WebhookEvent schema of the API reference declares every event type and its data.
The envelope
Each event is a POST with this JSON body.
{
"id": "9b2e7c41-5d8a-4f3e-b6c1-0a4d2e8f7b19:created",
"type": "subscription.created",
"createdAt": "2026-10-15T14:02:11.000Z",
"data": {}
}idis the event ID. The service builds it from the fact that the event reports, so every delivery of one event carries the same ID.typeis one of the event types below.createdAtis the time of the change.datais the object that the event type lists.
The x-hub-signature header carries the HMAC-SHA256 hex digest of the raw body, keyed with your organization's webhook secret, as for the payment notice. Verify the signature before you trust the event.
Event rules
- Answer with a
2xxstatus within 10 seconds. Any other answer, or no answer, is a failed try. - The service tries the delivery right after the change. After a failed try, it tries again 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours later, then every 12 hours. An event that is not delivered 3 days after its
createdAtis no longer sent. - A delivery can come more than once, and events can come in a different order than their changes. Store the
idof each event that you applied, and ignore an event whoseidyou already applied. - Apply the subscription in an event only when its
versionis newer than theversionthat you hold. A lower or equalversionis an older state of the subscription. - Apply an invoice by its
status. An invoice that ispaid,voidoruncollectibledoes not change again. - Apply an e-CF by its
status,buyerDeliveryandcommercialApproval. A final status and the end of a delivery do not change again, and a commercial approval changes only toconflicting. - After release
5.0.0, a new event type of a surface that your organization already receives is a major change of the API. The event types of a new surface, such as electronic invoicing, arrive with that surface in a minor release.
Event types
| Type | Event ID | data |
|---|---|---|
subscription.created | {subscriptionId}:created | The subscription |
subscription.activated | The ID of the status change | The subscription |
subscription.past-due | The ID of the status change | The subscription |
subscription.paused | The ID of the status change | The subscription |
subscription.canceled | The ID of the status change | The subscription |
subscription.updated | {subscriptionId}:v{version} | The subscription |
subscription.trial-will-end | {subscriptionId}:trial-will-end:{trialEnd} | The subscription |
invoice.paid | {invoiceId}:paid | The invoice |
invoice.payment-failed | {checkoutId}:declined, the checkout of the declined sale | The invoice |
checkout.expired | {checkoutId}:expired | The checkout |
payment.refunded | {refundId}:succeeded | The refund |
payment-method.expiring | {paymentMethodId}:expiring:{expiration} | The saved card |
ecf.accepted | {ecfId}:accepted or {ecfId}:conditionally-accepted | The e-CF |
ecf.rejected | {ecfId}:rejected | The e-CF |
ecf.errored | {ecfId}:errored | The e-CF |
ecf.delivered | {ecfId}:delivery | The e-CF |
ecf.delivery-refused | {ecfId}:delivery | The e-CF |
ecf.delivery-failed | {ecfId}:delivery | The e-CF |
ecf.commercial-approval-received | {ecfId}:commercial-approval:{decision} | The e-CF |
received-ecf.created | {receivedEcfId}:created | The received e-CF |
received-ecf.not-verified | {receivedEcfId}:not-verified | The received e-CF |
received-ecf.commercial-approval-sent | {receivedEcfId}:commercial-approval | The received e-CF |
received-ecf.commercial-approval-failed | {receivedEcfId}:commercial-approval | The received e-CF |
ecf-cancellation.accepted | {cancellationId}:accepted | The cancellation |
ecf-cancellation.partially-accepted | {cancellationId}:partially-accepted | The cancellation |
ecf-cancellation.rejected | {cancellationId}:rejected | The cancellation |
ecf-issuer.certificate-expiring | {issuerId}:certificate-expiring:{serialNumber}:{days} | The issuer |
ecf-sequence.running-low | {sequenceId}:running-low | The range |
ecf-sequence.expiring | {sequenceId}:expiring | The range |
A paid sign-up sends subscription.created and invoice.paid, and no subscription.activated. Each later status change sends the event of the new status, a change of statusReason inside past-due included. Every other change of a field that the subscription shows sends subscription.updated.
The subscription
data is the subscription as GET /subscription/{id} returns it, at the version that the change produced.
status:trialing,active,past-due,pausedorcanceled.canceledis final.statusReasonandendReason:payment-approved,trial-started,payment-declined,payment-method-invalid,payment-method-missing,processor-setup,dunning-exhausted,hard-decline,trial-ended-without-payment-method,cancel-requested,pause-requestedorsign-up-abandoned.endInitiator:customer,merchantorsystem.cancellationReason:too-expensive,missing-features,switched-service,unused,customer-service,low-quality,too-complexorother.recurringInterval:week,monthoryear.onDunningExhaustedandtrialEndBehavior:cancelorpause.paymentMethod: null, or the default card withid,brand,maskedPan,expiration(YYYYMM) andstatus(active,invalidordeleted).
The invoice
data is the invoice as GET /invoice/{id} returns it, with its subscriptionId, its lines and its payments. It carries no version.
reason:subscription-start,trial-end,renewal,updateorresume.status:open,paid,voidoruncollectible.heldReason: null,unknown-saleorprocessor-setup. A held invoice staysopen.- Amounts are in cents of the subscription currency, ITBIS included.
chargedAmountis in DOP cents. - Each payment carries
paymentId,processorReference,chargedAmount,approvedAtand itsrefunds. Each refund carriesid,amount,itbis,kind(refundorvoid),status(pending,succeeded,failedorunknown) andcreatedAt.
The checkout
data of checkout.expired is the checkout's id, status (expired), customer, items, amount, currency, metadata and subscriptionIntent. Nobody paid the checkout, and no card was charged.
subscriptionIntent is null for a one-off checkout. For a sign-up, it is the subscription that the payment would have started (recurringInterval, externalId, onDunningExhausted, metadata, trialDays and trialEndBehavior).
The refund
data of payment.refunded is the refund with its paymentId and its processorReference.
The saved card
data of payment-method.expiring is the card with its customerId and the subscriptionIds that it pays.
The e-CF
data of an ecf.* event is the e-CF as GET /ecf/{id} returns it (see Follow an e-CF).
status:pending,signed,submitted,accepted,conditionally-accepted,rejectedorerrored. The last four are final.ecf.acceptedcovers both acceptances, andstatustells them apart.buyerDelivery.status:pending,not-applicable,not-electronic,acknowledged,refusedorfailed.ecf.delivery-refusedcarries the receptor's code inbuyerDelivery.reason.commercialApproval: the buyer'sdecision(approved,rejectedorconflicting), itsreasonandreceivedAt.conflictingmeans that two approvals with different decisions arrived.- Amounts are in DOP cents.
The received e-CF
data of a received-ecf.* event is the received e-CF as GET /received-ecf/{id} returns it (see Receive e-CF).
dgiiVerification:pending,verified,rejected,not-foundornot-available. Only averifiede-CF counts as the e-CF that the DGII holds.commercialApproval.status: null before your decision, thenpending,sent,failedornot-required.