Blog

WooCommerce order stuck on Pending after a crypto payment

CoinStackUpdated 11 min read
Integrations

When a customer has paid in crypto but the WooCommerce order still says Pending payment, either the checkout was not actually paid in full or your store never learned that it was. Check in this order: the checkout's status in your gateway dashboard, a Site Address that starts with https:// and has a valid certificate, any firewall or security plugin blocking POST requests to /wc-api/coinstack/, WordPress's outbound requests and background tasks, then the coinstack log under WooCommerce > Status > Logs.

Did the checkout really complete?

A Pending order is sometimes correct. With the CoinStack plugin, every order has a checkout, the hosted page where the customer paid. A note on the order gives the checkout ID, and the checkout's reference is WC- followed by the order number. Open it in the dashboard and read its status.

Checkout statusWhat it means for the order
pendingNothing has been detected. The order is right to say Pending payment
confirmingA payment is being processed. The order should be On hold
partialLess than the total arrived. The order should be On hold
expired with nothing receivedThe customer did not pay this checkout. The order stays Pending payment
completed or resolvedPaid. If the order still says Pending payment, the problem is on your store's side

If the checkout says pending but the customer insists they paid, ask for the transaction hash and look it up on a block explorer. The usual findings are a transfer still waiting at the customer's exchange, a payment sent on a different network from the one the checkout showed, or a payment to an address from an older order. How to verify a crypto payment walks through the lookup, and what happens when a customer pays on the wrong network covers the second case.

An order sitting in On hold is a different question. It normally means a payment was seen and is still confirming, or that a partial payment is waiting for the rest. The order's latest note says which, and WooCommerce order statuses for crypto payments explains each one. The rest of this guide is for a completed checkout whose order did not move.

How does the order find out about a payment?

On the WordPress.org forums of other crypto plugins, support for this problem usually starts with the webhook. A NOWPayments user whose order stayed on Pending payment was asked for the site's webhook URL, and a Coinbase Commerce plugin user with orders stuck On hold was told to "click on test webhook". Neither thread states the fix publicly.

The CoinStack plugin has 3 ways to learn about a payment, according to its documentation:

RouteWhen it runsWhat it depends on
Payment update (webhook)The moment the checkout changesCoinStack's POST request reaching /wc-api/coinstack/ on your site
Customer returnsWhen the customer lands back on your order confirmation pageThat page running fresh PHP, not coming from a cache
Background checkEvery few minutes, for recent unpaid ordersWordPress's scheduled tasks running

Each route ends the same way: the plugin asks the CoinStack API for the checkout's current status and updates the order from that. So all 3 also depend on your server being able to make outbound requests to https://coinstack.net/api/v1.

If paid orders do update, but minutes late or only after someone visits the store, the payment update is being blocked and the background check is catching up. If they never update at all, look at outbound requests, the API key and scheduled tasks.

Is your site address HTTPS with a valid certificate?

The plugin builds the address CoinStack sends updates to from the Site Address (URL) under Settings > General. With pretty permalinks that is your site address followed by /wc-api/coinstack/. With permalinks set to Plain, WooCommerce builds it as ?wc-api=coinstack on the home page instead.

If the Site Address starts with http://, the plugin will not connect. The settings page shows the error instead of Connected, and the log records: "Your site address must start with https:// so CoinStack can send payment updates to it." The certificate has to be valid as well, and here the settings page will not warn you. The plugin only checks that the address starts with https://, so a store with an expired certificate, or one issued for a different hostname, can still show Connected while CoinStack's updates fail to get through.

Redirects matter too. CoinStack's webhook guide says your server must answer with a 2xx status within 10 seconds, and "Anything else, including a redirect, counts as a failure." A Site Address of https://example.com on a server that redirects to https://www.example.com fails this way. Make the Site Address match the hostname your store really answers on.

If you moved the store to a new domain or switched it to HTTPS, open WooCommerce > Settings > Payments > CoinStack and save. The plugin registers its address with CoinStack when you save, and checks it again every few minutes, so saving just makes the change take effect straight away.

Is a firewall or security plugin blocking the callback?

This is the first place to look. The documentation states the requirement: "Your firewall or security plugin must allow POST requests from outside to /wc-api/coinstack/." Three layers can block it:

  • A WordPress security plugin with rules for unknown clients, request throttling or country blocks.
  • A web application firewall run by your host in front of WordPress.
  • A CDN or proxy with bot protection.

Cloudflare has a trap. Its Bot Fight Mode documentation says it "may challenge API or mobile app traffic", and that "You cannot bypass or skip Bot Fight Mode using WAF custom rules or Page Rules." An allow rule for /wc-api/coinstack/ therefore does nothing while it is on. The same page notes that Super Bot Fight Mode "supports Skip rules", so on plans that have it you can exempt the path. Otherwise turn Bot Fight Mode off.

To test the path, open Developers in the CoinStack dashboard and use Send test on your store's webhook. The webhook guide says this "sends a sample checkout.completed event and shows whether your server accepted it." The sample is not one of your orders, so the plugin simply acknowledges it. A pass means the route is open. A failure means something between the internet and WordPress is refusing the request, and your host's access log or firewall log will show it. Look for POST requests to /wc-api/coinstack/: a 403 or a challenge page points to a firewall, and a 301 or 302 points to the redirect problem above.

Once it passes, nothing is lost. CoinStack retries a failed update after 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 8 hours and 8 hours, 8 attempts over about a day, and Recent events in the dashboard lets you send any event again. Reliable payment webhooks explains why a repeated update is harmless.

Can WordPress reach the CoinStack API?

If the log shows Could not reach CoinStack: followed by an error, the problem is outbound. WordPress itself can block outgoing requests. Its wp-config documentation describes WP_HTTP_BLOCK_EXTERNAL, which "will only allow localhost and your blog to make requests", and WP_ACCESSIBLE_HOSTS, which "will allow additional hosts to go through". If wp-config.php sets the first, add the API host to the second:

define( 'WP_HTTP_BLOCK_EXTERNAL', true );
define( 'WP_ACCESSIBLE_HOSTS', 'coinstack.net' );

Some hosts filter outbound traffic at the server, which no WordPress setting changes. In that case ask the host to allow HTTPS to coinstack.net.

The API key fails in its own ways, and the settings page shows it instead of Connected. "This API key was not recognized" means the key was mistyped or deleted in the dashboard. "This API key is read only" means it was created without write access, which the plugin needs to register its webhook and create checkouts. Create a key with Read and write access under Developers and save it in the plugin settings.

Are WordPress background tasks running?

The background check is a scheduled action. WooCommerce runs those through Action Scheduler, and its FAQ says "By default, Action Scheduler is initiated by WP-Cron (and the 'shutdown' hook on admin requests)." WP-Cron is not a real timer. The WordPress plugin handbook says "it is only triggered on page load", and gives the example of a task due at 2:00PM that waits until 5:00PM because no page loads happen in between.

Two setups starve it. A quiet store with few visitors runs its checks only when someone loads a page. A site with DISABLE_WP_CRON set to true in wp-config.php, but no server cron job calling wp-cron.php in its place, only runs them when someone uses the admin. On such a site, orders can appear to update only when someone signs in to the admin.

To check, open WooCommerce > Status > Scheduled Actions and search for coinstack_sync. A recurring action listed under Pending with a time in the future is healthy. One long past due means scheduled tasks are not running. Ask your host for a real cron job that loads wp-cron.php every few minutes.

The background check covers CoinStack orders placed in the last 3 days that are still Pending payment or On hold. It backs up the payment update, so fix the callback route as well.

Is caching getting in the way?

The payment update itself is a POST request to the WooCommerce API, not a page view. WooCommerce's caching guide has a Varnish example in its troubleshooting section with a rule marked "Pass through the WooCommerce API". If you run a custom server cache or a CDN rule that caches everything, make sure /wc-api/ (and ?wc-api= on plain permalinks) is excluded the same way.

The order confirmation page is the other place caching bites. When the customer returns from the checkout, the plugin refreshes the order as that page loads. If a cache serves the page instead, that refresh never runs and the order waits for the payment update or the background check. The same guide says to exclude the Cart, Checkout and My Account pages from any cache that does not skip them already, because "These pages need to stay dynamic". The confirmation page is an endpoint of Checkout: its address is the Checkout page's address plus /order-received/ and the order ID, so a rule that excludes Checkout and everything under it covers it. A rule that matches only the exact Checkout URL does not.

Why does the crypto option not appear at checkout?

Sometimes no crypto order is ever placed because the method is missing. The plugin hides itself when your store currency is not one of the 146 currencies CoinStack accepts. On the page where a customer pays for an existing order, it checks that order's currency rather than the store's. A multi-currency plugin can therefore hide it for some visitors only. Crypto payments and the WooCommerce block checkout covers the other causes, including script optimization and theme conflicts.

What do the coinstack log entries mean?

Errors are recorded under WooCommerce > Status > Logs with the source coinstack, and every payment update is noted on the order itself. These are the entries you are most likely to see:

Log entry containsMeaningFix
Could not reach CoinStackAn outbound request failed or timed outOutbound filtering, DNS or WP_HTTP_BLOCK_EXTERNAL
This API key was not recognizedWrong or deleted keyPaste a current key
This API key is read onlyThe key lacks write accessCreate a Read and write key
Your site address must start with https://The Site Address uses http://Change it under Settings > General
CoinStack does not acceptThe order's currency is not supportedUse a supported store currency
is busyAnother update for the same order was still runningNothing; the next update or check picks it up
could not be expiredA cancelled order's checkout was not closedWatch for a late payment on that order

Order notes tell the other half of the story. A note saying a checkout "was paid, but this order is already" in some status, "so it was not marked paid again", means the order was changed by hand or paid twice before the update arrived. A note saying the order total "is now" different means the order was edited after checkout, so the plugin put it On hold instead of Processing.

If none of this finds it, email [email protected] with your WooCommerce version, the order number and the related log entries. A support playbook for crypto payment tickets has the questions to ask the customer while you wait.

Frequently asked questions

Should I mark a stuck crypto order as paid by hand?

Only after the checkout shows completed or resolved in your dashboard, since the USDC is then in your wallet. Changing the status yourself is safe: when the update arrives later, the plugin sees the order is no longer unpaid, adds a note and does not mark it paid a second time. Fix the cause anyway, or the next order will stick too.

Will orders catch up once I fix the firewall?

Yes, for updates still within their retry window. CoinStack retries each failed update 8 times over about a day, the background check looks at recent unpaid orders every few minutes, and Recent events in the dashboard lets you resend anything older. Each time, the plugin reads the checkout's current status, so a late or repeated update cannot mark an order paid twice.

Why did a cancelled order move to Processing?

Because the customer paid after it was cancelled. Cancelling closes the checkout, but a payment that arrives after expiry is still recorded, and if it covers the total the checkout completes and is flagged late. The plugin then marks the order paid and adds a note that the payment arrived late. Ship it, or refund it if the item is gone. Overpaid and late crypto payments covers the options.

More posts