An event can be true and still be old

Recurly sends webhook notifications about activity such as payment and subscription changes. A notification can truthfully describe a decline that happened earlier even though the same invoice has since been paid. Billing notifications can also describe different objects associated with one purchase. When the business reacts to the notice without looking at current records, a delayed failure message can replace a more recent successful outcome in a local support or product system.

Recurly recommends treating notifications as prompts and reading the current object state before making a business decision. The distinction is useful outside engineering. A person inspecting a ticket should know whether its status describes the original event or the last verified snapshot. People tend to treat a recent-looking notification as the latest truth even when it was received late.

Design for duplicate deliveries and multiple views

Treat a repeated notification as a common possibility, not automatic evidence of two financial operations. Keep an internal record of processed notification identifiers where provided and separate it from payment and invoice identifiers. The same invoice can legitimately generate several different events; ignoring all future events for an invoice would hide meaningful changes. Conversely, clearing a single delivery retry should not result in an extra email, access change, or accounting entry.

Make responsibilities explicit. An event receiver records a notice. A reconciliation step compares it to the latest relevant billing record. A business policy decides whether a message, entitlement action or review ticket is appropriate. Use documented authenticity checks for the product and event format you actually integrate. Do not place shared secrets, credentials, or card details in support notes or operational reports. Where a notice is incomplete or can't be verified, defer customer-facing changes until a trusted record is available.

A fictional order-of-events incident

A media service receives notification of a failed $18 renewal shortly after a payment success notice for the same invoice. The failure genuinely happened first; the delivery order reversed. A customer shouldn’t receive a fresh warning demanding payment based solely on the ordering in one local inbox. If the invoice already reflects the successful attempt, a support view should show that confirmed result and retain the older failure only as historical context.

Suppose instead the notice cites an invoice the support view hasn’t seen and the billing platform is temporarily unreachable. A sensible response is to mark the local record as awaiting verification and retry the lookup on the business’s normal schedule. Do not infer failure from a network error. Avoid sending the subscriber through both a payment update and an escalation for the same unverified event.

Acceptance criteria for a calm integration

Review test cases for duplicate delivery, out-of-order receipt, missing references and temporary lookup failures. In each case check that the final internal status reflects verified current information and that no duplicate business action was applied. Record which product documentation applies, because Recurly Subscriptions and other Recurly products can expose different event formats and terms. Use fictitious identifiers in tests that will be shared outside an approved environment. The result you want is a system that can be surprised by delivery timing without surprising the subscriber.

Read next

Sources