Title: API Error #412 &#8220;invalid_token&#8221;: Invalid token
Last modified: May 17, 2023

---

# API Error #412 “invalid_token”: Invalid token

 *  [johnback9](https://wordpress.org/support/users/johnback9/)
 * (@johnback9)
 * [3 years ago](https://wordpress.org/support/topic/api-error-412-invalid_token-invalid-token/)
 * Hi team, we’ve been having some issues with the Afterpay plugin showing some 
   errors in the logs.
 * We’ve identified this when we stopped receiving confirmation emails for new orders.
 * Upon checking the logs we get the following:
 *     ```wp-block-code
       05-10-2023 @ 13:19:04 - Afterpay order token: 001.k3nuspkv04202otrb6je9a0rf366q7bvc7pkhjfrefbarn1u
       05-10-2023 @ 13:19:52 - Payment APPROVED for WooCommerce Order #24271 (Afterpay Order #363446195).
       05-10-2023 @ 13:20:12 - API Error #412 "invalid_token": Invalid token (Error ID: 49b2e536bb0c733f)
       ```
   
 * WooCommerce version: 6.6.0
 * Afterpay plugin version: 3.4.1
 * I’m aware we’re not using the latest version, however, I was wondering if this
   is a known issue and if it was addressed before upgrading. I also tried to search
   the web for this error code but couldn’t find any helpful information.
 * Any help would be appreciated.
 * John

Viewing 1 replies (of 1 total)

 *  Plugin Author [Afterpay](https://wordpress.org/support/users/afterpayit/)
 * (@afterpayit)
 * [3 years ago](https://wordpress.org/support/topic/api-error-412-invalid_token-invalid-token/#post-16770096)
 * Hi [@johnback9](https://wordpress.org/support/users/johnback9/),
 * Thank you for your message.
 * There is a general recommendation to keep the plugin updated in order to benefit
   from security patches and improvements as quickly as reasonably possible.
 * Regarding the “412” responses, API network logs indicate that these are occurring
   as a result of attempting to reprocess a checkout that has already been processed.
   Possibly, the end user has attempted to resubmit the order form after their payment
   has already been received. This could just be an unusual consumer behaviour, 
   refreshing or navigating back and resubmitting, or having the checkout open in
   two tabs and attempting to place the order in both.
 * If the challenge seems to occur regularly or for a suspiciously high percentage
   of orders, the team would be happy to assist with an investigation. To facilitate
   this, please submit a support request including a link to this post using the
   following web form: [https://afterpay.formstack.com/forms/global_merchant_technical_support](https://afterpay.formstack.com/forms/global_merchant_technical_support)
 * A member of the team will then reach out to you within 1 business day.
 * Thank you.

Viewing 1 replies (of 1 total)

The topic ‘API Error #412 “invalid_token”: Invalid token’ is closed to new replies.

 * ![](https://ps.w.org/afterpay-gateway-for-woocommerce/assets/icon.svg?rev=3261877)
 * [Afterpay Gateway for WooCommerce](https://wordpress.org/plugins/afterpay-gateway-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/afterpay-gateway-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/afterpay-gateway-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/afterpay-gateway-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/afterpay-gateway-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/afterpay-gateway-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Afterpay](https://wordpress.org/support/users/afterpayit/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/api-error-412-invalid_token-invalid-token/#post-16770096)
 * Status: not resolved