Failed-payment reasons in Klaviyo, Omnisend and webhooks

The Billing attempt failure event that Kaching sends to Klaviyo, Omnisend and your webhooks now says why the payment failed, which attempt failed and whether it was the last one. You can send an "update your card" email when the card was declined, a "we'll try again" email when there wasn't enough money, and a last-chance email before the subscription is skipped, paused or cancelled. There's nothing new to switch on.

  • `billingAttemptErrorCode` is the reason, as Shopify reports it. For example: payment_method_declined, insufficient_funds, expired_payment_method or insufficient_inventory.
  • `billingAttemptErrorMessage` is the payment provider's own message, such as "Your card was declined." It is often in the customer's language, so split your flows on the code, not the message.
  • `billingAttemptNumber` says which attempt at this order failed. 1 is the scheduled charge, 2 the first retry, and so on.
  • `isFinalBillingAttempt` is true when this was the last attempt your Payment Recovery settings allow. Next comes the action you chose for when all retry attempts have failed. An out-of-stock failure uses the retry count under Not enough inventory.

In Klaviyo and Omnisend, all four are top-level properties, so you can use them in flow splits, trigger filters and segments. In webhooks, they are in each event's data. Every other event has them too, set to null.

You don't have to wait for a real payment to fail to see the new properties in Klaviyo's or Omnisend's pickers. Send the Billing attempt failure test event from Settings → Integrations: it carries sample values.