Integration guide

Recovering failed WooCommerce payments

WooCommerce stores every failed order, but the follow-up is usually left to a plugin running inside WordPress on the same host as the store. Moving the recovery logic outside WordPress keeps queues, retries and messaging alive independently of site traffic or plugin conflicts.

Quick answer

WooCommerce recovery is built on order status transitions — failed, pending and on-hold — captured through webhooks and followed up outside WordPress so recovery keeps running even when the site is under load.

Events that matter

order.updated → failed
The gateway declined the payment.
order.updated → pending
Checkout started but payment never completed.
order.updated → processing
Payment succeeded; stop any queued outreach.

Setting it up

  1. 1

    Add the webhook

    WooCommerce → Settings → Advanced → Webhooks, topic Order updated, delivery URL set to your RRLabs endpoint.

  2. 2

    Secure it

    Set the webhook secret so the payload signature can be verified before processing.

  3. 3

    Map statuses

    failed and pending enter the recovery queue; processing and completed close it.

  4. 4

    Retry off-site

    Queued follow-ups run on RRLabs infrastructure, not on a WordPress cron.

React to order status transitions

// WooCommerce → Settings → Advanced → Webhooks, topic "Order updated"
const order = JSON.parse(rawBody); // verify X-WC-Webhook-Signature first

if (order.status === "failed" || order.status === "pending") {
  await rrlabs.enqueueRecovery({
    provider: "woocommerce",
    externalId: String(order.id),
    customerEmail: order.billing?.email,
    customerPhone: order.billing?.phone,
    amountCents: Math.round(Number(order.total) * 100),
    currency: order.currency,
  });
} else if (order.status === "processing" || order.status === "completed") {
  await rrlabs.closeRecovery({ provider: "woocommerce", externalId: String(order.id) });
}

Manual recovery vs. automated recovery

CapabilityWooCommerce aloneWith RRLabs
Where recovery runsWordPress cron on the store hostExternal queue, unaffected by site load
Retry reliabilityDepends on site traffic triggering cronScheduled independently with retries
ChannelsEmail via the site's mailerEmail, WhatsApp, SMS where consented
DeliverabilityShared host IP reputationDedicated transactional sending
Source of truthWooCommerceWooCommerce — orders stay in WordPress

Frequently asked questions

Do I need a plugin?

No. The native WooCommerce webhook is enough to send order status changes to RRLabs.

Will it work with WooCommerce Subscriptions?

Yes. Renewal orders that move to failed enter the same recovery queue as one-off orders.

What about GDPR?

Only the contact details needed to send the follow-up are stored, with configurable retention.

Other platforms

Estimate your recoverable revenue

Calculate now