Subscription webhooks
PaymentsAI dispatches webhook events for subscription lifecycle activity, the transactions those subscriptions generate, and related disputes and offsite payments. Subscribe to the events you need and react server-side rather than polling.
For the registration mechanism, payload schemas, and delivery guarantees, see Webhooks overview and Webhooks schemas.
All event names use hyphens (for example subscription-activated, not subscription.activated).
Subscription events
| Event | When it fires |
|---|---|
subscription-activated | The subscription has moved to active — typically after the first payment succeeds. |
subscription-renewed | A scheduled renewal has been processed. |
subscription-canceled | The subscription has been canceled (immediately or at a scheduled date). |
subscription-churned | The subscription has churned (final cancellation after retries exhausted, end of contracted term, or similar terminal state). |
subscription-upgraded | The subscription has been upgraded to a higher-priced plan. See Upgrade and downgrade. |
subscription-downgraded | The subscription has been downgraded to a lower-priced plan. |
subscription-modified | The subscription has been modified (changes other than upgrade or downgrade). |
subscription-items-changed | The line items on the subscription have changed. |
subscription-reactivated | A scheduled cancellation has been reversed and the subscription continues. See Subscription reactivation. |
subscription-trial-changed | The trial configuration on the subscription has changed. |
subscription-trial-ended | A trial period has ended. |
subscription-trial-end-reminder | Dispatched ahead of trial end. See the dedicated reference page. |
subscription-renewal-reminder | Dispatched 7 days before a scheduled renewal. See the dedicated reference page. |
Transaction events
| Event | When it fires |
|---|---|
transaction-processed | A transaction has been processed by the gateway. This is the standard "transaction completed" signal. |
transaction-declined | A transaction has been declined. See the dedicated reference page. Fires for each declined attempt during subscription dunning. |
Order and payment events
| Event | When it fires |
|---|---|
order-delinquency-reached | The order (subscription) has reached delinquency — payment retries have exhausted and the customer is past due. |
offsite-payment-completed | The customer has completed a payment on the offsite hosted form. See Hosted payment form. |
Dispute events
| Event | When it fires |
|---|---|
dispute-created | A new dispute (chargeback or inquiry) has been opened on a transaction. |
dispute-updated | An existing dispute has been updated (status, evidence, deadline). |
dispute-lost | A dispute has been lost — funds have been debited from your account. |
dispute-comments | A new comment has been added to a dispute thread. |
See Dispute process for how to respond to disputes.
Dedicated webhook reference pages
Three events have their own reference pages with full payload examples — these are the canonical source for the payload shape:
For the other events, register your endpoint and observe the delivered payloads to confirm the exact shape.
Webhook registration
You register webhook endpoints with PaymentsAI and pick which events to receive via the eventTypes array. See Webhook setup for the registration flow, including HMAC signature verification.
Delivery guarantees
From the Webhooks overview:
- Out-of-order delivery — PaymentsAI does not guarantee event ordering. Your endpoint must handle events that arrive out of sequence.
- At-least-once delivery — events may be delivered more than once. Use the
deduplicationIdon every payload to drop duplicates server-side. - Live and test mode — a single registered endpoint can receive both live and test mode events. Use the payload contents (and your own routing) to separate them.
Typical sequence — first subscription with inactive instrument
For a subscription created against a new (inactive) payment instrument:
- The subscription is created in
pending. - The customer is redirected to the hosted payment form and completes the first payment.
offsite-payment-completedfires when the customer finishes the hosted-form step.transaction-processedfires for the first payment.subscription-activatedfires when the subscription moves toactive.
From here, each renewal fires transaction-processed and subscription-renewed once the renewal charge succeeds.
For a subscription created against an already-active payment instrument, transaction-processed and subscription-activated follow creation without an intermediate hosted-form step.
Typical sequence — failed renewal and recovery
- The scheduled renewal charge fails. PaymentsAI dispatches
transaction-declinedfor the failed attempt. - Dunning retries fire further
transaction-declinedevents on each failed attempt. - Either the renewal eventually succeeds (
transaction-processed,subscription-renewed), or the retries are exhausted (order-delinquency-reached) and the subscription is canceled or churned (subscription-canceledorsubscription-churned).
See Dunning and retries for what happens between the first failure and the final outcome.