Title: INTERNAL_SERVER_ERROR issues + Duplicate Charges Created
Last modified: March 30, 2020

---

# INTERNAL_SERVER_ERROR issues + Duplicate Charges Created

 *  Resolved [richak](https://wordpress.org/support/users/richak/)
 * (@richak)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/internal_server_error-issues-duplicate-charges-created/)
 * We have a few isolated cases on the 19th and 21st of March where multiple customers
   received the following error in their order notes (internal):
 * “Square Payment Failed (Status code INTERNAL_SERVER_ERROR: An internal error 
   has occurred, and the API was unable to service your request.) Order status changed
   from Pending payment to Failed.”
 * After the error, the Square charge was approved within a minute or so and also
   logged into the customer’s order notes (internal).
 * We noticed this week that those failed server error charges were actually charged
   to Square, and we had to refund the duplicate transactions that occurred. Wondering
   if this has happened to anyone else, or if there’s anything we can do from our
   end to prevent this from happening again. We aren’t sure if this is an issue 
   with our website or if this was an issue with the Square platform. The duplicate
   charge was generally processed between 0-2 minutes after the initial charge/failed
   payment.
 * [@royho](https://wordpress.org/support/users/royho/) [@bor0](https://wordpress.org/support/users/bor0/)

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

 *  [TimBHowe](https://wordpress.org/support/users/timbhowe/)
 * (@timbhowe)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/internal_server_error-issues-duplicate-charges-created/#post-12625701)
 * Hell, We have been running into the same issue
 * It is a 2 part problem where
 * 1. Square is charging the card and but sending a 500 error as a response. We 
   have opened a ticket with them and they are aware of the issue but we haven’t
   had much movement on a solution.
 * 2. The WooCommerce Square plugin will send a second request thinking the first
   field and send the same request with a different idempotency_key which cases 
   Square to see this as a different request.
 * Here is our Issue: [https://wordpress.org/support/topic/idempotency_key-increment-causing-double-charging-in-case-of-false-error-respons/](https://wordpress.org/support/topic/idempotency_key-increment-causing-double-charging-in-case-of-false-error-respons/)
 * I’m going to try and make a pull request to the [https://github.com/skyverge/wc-plugin-framework](https://github.com/skyverge/wc-plugin-framework)
   which this plugin uses for the payment gateway code to generate the idempotency_key.
 * But we would love some help on this issue and to get it resolved as soon as possible.
 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [6 years, 2 months ago](https://wordpress.org/support/topic/internal_server_error-issues-duplicate-charges-created/#post-12654392)
 * Hey there [@richak](https://wordpress.org/support/users/richak/) – thanks for
   reporting this!
 * Was this an intermittent error a few weeks ago, or is it still happening?
 *  Thread Starter [richak](https://wordpress.org/support/users/richak/)
 * (@richak)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/internal_server_error-issues-duplicate-charges-created/#post-12680509)
 * [@fernashes](https://wordpress.org/support/users/fernashes/) Hey Hannah, this
   happened intermittently for a few days in a row from the 19th to the 21st of 
   March
 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [6 years, 1 month ago](https://wordpress.org/support/topic/internal_server_error-issues-duplicate-charges-created/#post-12701031)
 * Okay, so it happened briefly and then seems to have resolved itself.
 * Did you have any luck with the pull request here? [https://github.com/skyverge/wc-plugin-framework](https://github.com/skyverge/wc-plugin-framework)
 * Otherwise, without being able to replicate it, this is going to be very difficult
   to troubleshoot. The best thing that I can suggest is to try that PR, or watch
   the logs to see if it happens again.
 *  [TimBHowe](https://wordpress.org/support/users/timbhowe/)
 * (@timbhowe)
 * [6 years ago](https://wordpress.org/support/topic/internal_server_error-issues-duplicate-charges-created/#post-12833786)
 * [https://github.com/skyverge/wc-plugin-framework/pull/492#event-3319860795](https://github.com/skyverge/wc-plugin-framework/pull/492#event-3319860795)

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

The topic ‘INTERNAL_SERVER_ERROR issues + Duplicate Charges Created’ is closed to
new replies.

 * ![](https://ps.w.org/woocommerce-square/assets/icon-256x256.png?rev=3234354)
 * [WooCommerce Square](https://wordpress.org/plugins/woocommerce-square/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-square/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-square/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-square/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-square/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-square/reviews/)

## Tags

 * [duplicate](https://wordpress.org/support/topic-tag/duplicate/)
 * [payment](https://wordpress.org/support/topic-tag/payment/)

 * 5 replies
 * 3 participants
 * Last reply from: [TimBHowe](https://wordpress.org/support/users/timbhowe/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/internal_server_error-issues-duplicate-charges-created/#post-12833786)
 * Status: resolved