Title: ACH Failed Payment Bug
Last modified: February 7, 2024

---

# ACH Failed Payment Bug

 *  Resolved [Joe](https://wordpress.org/support/users/joesrocha/)
 * (@joesrocha)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/ach-failed-payment-bug/)
 * I’m testing in sandbox ACH and regardless if I choose a valid or bad payment 
   method, the order completes with no error.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/ach-failed-payment-bug/#post-17407580)
 * Hi [@joesrocha](https://wordpress.org/support/users/joesrocha/)
 * This isn’t a bug, it’s supposed to work that way. ACH payments are asynchronous,
   meaning it takes some time between when the payment is initiated and when it’s
   actually complete/failed.
 * If you have your webhook setup correctly, you should see that a webhook event
   is received and the order’s status is updated to `failed` or `processing/complete`
   based on the selection you made in the ACH popup.
 * Example of an order where “Failure” was chosen in the ACH popup:
 *     ```wp-block-code
       The customer’s bank account could not be located. Order status changed from On hold to Failed.
       ```
   
 * Kind Regards,
    -  This reply was modified 2 years, 4 months ago by [Clayton R](https://wordpress.org/support/users/mrclayton/).
 *  Thread Starter [Joe](https://wordpress.org/support/users/joesrocha/)
 * (@joesrocha)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/ach-failed-payment-bug/#post-17407700)
 * Hey [@mrclayton](https://wordpress.org/support/users/mrclayton/)
 * Understood. I connected my local via ngrok. Verified sk updated. Stripe webhook
   attempts succeeded in connecting to my ngrok, however the order status sits in
   pending payment despite success pay. I do see this in debug.log:
   [08-Feb-2024
   _01:03:53_ UTC] PHP Notice: Function register_rest_route was called incorrectly.
   The REST API route definition for wqc/v1/query is missing the required permission_callback
   argument. For REST API routes that are intended to be public, use __return_true
   as the permission callback. Please see <a>Debugging in WordPress</a> for more
   information. (This message was added in version 5.5.0.) in /var/www/html/wp-includes/
   functions.php on line 6031Thanks, Joe
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/ach-failed-payment-bug/#post-17407705)
 * > [08-Feb-2024 _01:03:53_ UTC] PHP Notice: Function register_rest_route was called
   > incorrectly. The REST API route definition for wqc/v1/query is missing the 
   > required permission_callback argument. 
 * That route is unrelated to the Stripe plugin. Localhost testing can be tricky,
   I wouldn’t take issues with localhost as indicating there is a plugin issue.
 * I’d recommend using Stripe’s CLI which allows you to setup a webhook listener.
   It’s what we use internally for testing.
 * [https://stripe.com/docs/stripe-cli](https://stripe.com/docs/stripe-cli)
 * [https://stripe.com/docs/webhooks#local-listener](https://stripe.com/docs/webhooks#local-listener)
 * Kind Regards
 *  Thread Starter [Joe](https://wordpress.org/support/users/joesrocha/)
 * (@joesrocha)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/ach-failed-payment-bug/#post-17409767)
 * Ok, CLI worked much better. The order status changes properly to Failed when 
   using bad card, but a successful card does not update to Completed. I’ve tried
   both default and completed under order status of ACH settings. 
   I’m going to 
   need to trigger some custom actions when successful anyways, so I can handle 
   status change there. If you can help point me to a hook I can use.Thanks [@mrclayton](https://wordpress.org/support/users/mrclayton/)
   Joe
    -  This reply was modified 2 years, 4 months ago by [Joe](https://wordpress.org/support/users/joesrocha/).
    -  This reply was modified 2 years, 4 months ago by [Joe](https://wordpress.org/support/users/joesrocha/).
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/ach-failed-payment-bug/#post-17410208)
 * > If you can help point me to a hook I can use.
 * The best filter to use for changing the order status after payment completion
   is:
 * **`woocommerce_payment_complete_order_status`**
 * Example:
 *     ```wp-block-code
       add_filter('woocommerce_payment_complete_order_status', function($status, $order_id, $order){
           // your custom logic here
           return $status;
       }, 10, 3);
       ```
   
 * Kind Regards
 *  Thread Starter [Joe](https://wordpress.org/support/users/joesrocha/)
 * (@joesrocha)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/ach-failed-payment-bug/#post-17410684)
 * Ok, I was able to do my success actions and update status on `wc_stripe_webhook_payment_intent_succeeded`
   Appreciate your help!
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/ach-failed-payment-bug/#post-17410914)
 * [@joesrocha](https://wordpress.org/support/users/joesrocha/)
 * You’re welcome. If you have a moment we always appreciate a good review. [https://wordpress.org/support/plugin/woo-stripe-payment/reviews/](https://wordpress.org/support/plugin/woo-stripe-payment/reviews/)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘ACH Failed Payment Bug’ is closed to new replies.

 * ![](https://ps.w.org/woo-stripe-payment/assets/icon-256x256.png?rev=2611337)
 * [Payment Plugins for Stripe WooCommerce](https://wordpress.org/plugins/woo-stripe-payment/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-stripe-payment/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-stripe-payment/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-stripe-payment/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-stripe-payment/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-stripe-payment/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/ach-failed-payment-bug/#post-17410914)
 * Status: resolved