Skip to content

Connect your WooCommerce store

The WooCommerce integration brings your store’s customers and paid orders into Replifier. Customers become contacts and every paid order is recorded as a conversion event. This guide explains the REST keys, the rules for the store address, webhook signing, the statuses that count as paid and the woocommerce_* errors.

In WordPress, go to WooCommerce, Settings, Advanced, REST API and press Add key:

  1. Give it a description, for example Replifier, and choose the user who will own the key.
  2. Under Permissions choose Read/Write. Replifier reads customers and orders, and it needs write access to register the webhooks in your store.
  3. Copy the Consumer key (starts with ck_) and the Consumer secret (starts with cs_) when they are generated: WooCommerce does not show the secret again.

Replifier stores them encrypted. To connect, the key must be able to get into your store: that proves you control it.

Because you type the address, Replifier only accepts public, secure stores:

  • Only https. An address with http:// is rejected.
  • A public domain name, such as my-store.com, with at least one dot and a letters-only ending. Domains with accents go in punycode format (xn--).
  • No IP addresses, ports, users, paths, parameters or fragments. Type only the home page.
  • No internal names, such as .local, .test, .internal endings or localhost, nor wildcard DNS services such as nip.io.
  • No redirects. Replifier does not follow them: type the final address of your store, with the same www or without it as your site uses.

In the app you type the address and paste the two keys; with the API it is POST /v1/brands/{brand}/woocommerce/connect with store, consumerKey and consumerSecret, and the captures.write permission. Each brand connects one store and a store can belong to only one brand.

Customers. Every customer with a valid email becomes a contact of the brand, with email, first name and last name, with no lists and no marketing consent: you decide how to subscribe them. An email already suppressed in the brand keeps its status.

Paid orders. Every paid order is recorded as the custom event woocommerce.order_paid, with its total and currency, marked as a conversion, to attribute it to the campaign that drove it. An order counts as paid only in these WooCommerce statuses:

Counts as paid Does not count
processing and completed pending, on-hold, cancelled, refunded and failed

An order that later becomes refunded or cancelled does not delete the event already recorded. Each order counts once, even if it arrives both by webhook and by the initial sync.

When you connect, Replifier creates one webhook per topic in your store and delivers them to https://api.replifier.com/woocommerce/webhooks/<INTEGRATION_ID>:

  • order.created and order.updated: record the order if it is paid.
  • customer.created and customer.updated: create or complete the contact.

Each connection has its own webhook secret, generated by Replifier and stored encrypted. WooCommerce signs every delivery with the X-WC-Webhook-Signature header: the HMAC-SHA256 of the raw body, in base64. Replifier verifies it in constant time before reading the body and answers 401 with woocommerce_unauthorized if it does not match. A connection that does not exist or was already disconnected answers the same as a bad signature, so it does not reveal whether it exists.

The test notification WooCommerce sends when it creates the webhook is not JSON and is accepted without doing anything. The body is capped at 2 MB and, if the store sends too many requests in a row, the response is 429 with Retry-After: 60.

After you connect, Replifier brings in customers and paid orders in pages of 100 records. The cron advances pending steps; to speed them up, use POST /v1/woocommerce/{integration}/sync and repeat it until the response has done: true. If your store fails halfway, the progress is kept. If it answers 401 or 403, the app shows that the credentials were rejected: create a new key.

DELETE /v1/woocommerce/{integration} (or the button in the app) deletes the webhooks in your store and the encrypted credentials. The contacts and events you already received are kept. If the store does not confirm the webhook deletion, the credentials were already removed in Replifier: delete the Replifier … webhooks under WooCommerce, Settings, Advanced, Webhooks.

Each error has its own page in the error catalog:

Code When it happens What to do
woocommerce_store_invalid The address does not meet the rules above (400). Type the https address of your store’s home page.
woocommerce_credentials_invalid WooCommerce rejected the key or secret (401 or 403 when verifying). Create a key with Read/Write permission and paste the new one.
woocommerce_already_connected The brand already has a store connected (409). Disconnect the current one before connecting another.
woocommerce_store_in_use That store is already in another brand (409). Disconnect it from the other brand first.
woocommerce_unauthorized The webhook signature is not valid or the connection no longer exists (401). Reconnect the store; if you did not expect the notice, ignore it.
woocommerce_unavailable The secrets vault is not configured or your store did not answer (503). Check that your store is online and try again; if it persists, contact support.

Install the Replifier plugin for WordPress

Section titled “Install the Replifier plugin for WordPress”

The Replifier for WooCommerce plugin adds the abandoned cart and the consent boxes to your checkout. It needs WordPress 5.8 or later, WooCommerce 7 or later and PHP 7.4 or later, and it comes on top of the REST key from the first step.

  1. Download replifier-for-woocommerce.zip from the release and upload it under Plugins, Add New, Upload Plugin.
  2. In Replifier, connect the store under Integrations, WooCommerce. When you connect, Replifier shows the plugin secret only once. If the store was already connected, generate a new one with POST /v1/woocommerce/{integration}/plugin-secret; the previous one stops working.
  3. In WordPress, go to WooCommerce, Replifier for WooCommerce and paste the URL of the connected store and the secret. The API address is already filled in.

Every call from the plugin is signed with HMAC-SHA256 using that secret, and Replifier rejects reports that are more than 10 minutes old.

As soon as the checkout has an email or a phone number, the plugin reports the cart to Replifier: items, total, currency and recovery link. It sends at most one report per cart every 60 seconds, with the latest state.

After the cart has been idle for the configured delay, Replifier fires the custom event shopify.checkout_abandoned. It is the same event Shopify uses, so the same templates and flows work for both stores.

  • Delay. From 15 to 1440 minutes, 30 by default. Change it with PUT /v1/woocommerce/{integration}/abandoned-settings and afterMinutes (permission captures.write).
  • Recovered. A cart counts as recovered if it is paid within 7 days of its first reminder.
  • Report. GET /v1/brands/{brand}/woocommerce/abandoned-checkouts/report?days=30 (permission reports.read) returns abandoned and recovered carts, the recovery rate and the recovered value per currency.

The recovery link goes to the checkout: it restores the cart for a customer with an account or the same browser session, while a guest on another device sees an empty cart.

The checkout shows two optional boxes, unchecked: “I agree to receive messages via WhatsApp” and “I agree to receive messages via SMS”. If the customer checks one, the accepted text travels with the cart report and Replifier saves it as the consent for that channel, with the text as evidence. The reminder goes out only through channels with consent. The texts are shown in the customer’s language, in the 12 languages of Replifier.

Besides the paid order, Replifier records the life cycle of the order as custom events:

Event When it is recorded
woocommerce.order_paid The order is in the processing or completed status. It is the only one marked as a conversion.
woocommerce.order_shipped The order is in the shipped status, which shipping plugins add. It includes trackingNumber and carrier if your tracking plugin provides them.
woocommerce.order_completed The order moves to completed.
woocommerce.order_cancelled The order moves to cancelled.

They arrive by webhook and each one is recorded once per order and status. The initial sync records only the payment, so old orders do not trigger messages.

In a flow, choose a custom event as the one that starts it and type its name:

  • shopify.checkout_abandoned for an abandoned-cart reminder.
  • woocommerce.order_shipped for a shipping notice with the tracking number and the carrier.
  • woocommerce.order_completed for a thank-you or review request.
  • woocommerce.order_cancelled for a message to the customer whose order was cancelled.

Messages by WhatsApp or SMS are sent only to contacts who gave consent for that channel.

The app shows your WooCommerce store as connected, the synced customers and orders go up, and a test order in the processing status appears as the woocommerce.order_paid event.