# TokenizationErrors in card tokenize method

**URL:** <https://developer.squareup.com/forums/t/tokenizationerrors-in-card-tokenize-method/20187>\
**Category:** Questions\
**Tags:** web-payments-sdk\
**Created:** [December 19, 2024, 8:45pm UTC](https://developer.squareup.com/forums/t/tokenizationerrors-in-card-tokenize-method/20187 "2024-12-19T20:45:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrevels](https://avatars.discourse-cdn.com/v4/letter/n/b77776/32.png) [@nrevels](https://developer.squareup.com/forums/u/nrevels)\
**Post date:** [December 19, 2024, 8:45pm UTC](https://developer.squareup.com/forums/t/tokenizationerrors-in-card-tokenize-method/20187/1 "2024-12-19T20:45:17Z")

</div>

I’m having intermittent issues with the .tokenize() method when using the webpayments SDK. The error it’s returning is: {“message”:“the tokenization request is already in process”,“type”:“TOKENIZATION\_IN\_PROCESS”} but I can’t find any documentation on what would be causing this. It only happens intermittently and is not always reproducible in either the sandbox or production environments

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [December 19, 2024, 8:45pm UTC](https://developer.squareup.com/forums/t/tokenizationerrors-in-card-tokenize-method/20187/2 "2024-12-19T20:45:31Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Troubleshoot In-App Payments SDK Problems](https://developer.squareup.com/docs/in-app-payments-sdk/troubleshooting)**
>
> Troubleshoot problems with the Square In-App Payments SDK.

[https://developer.squareup.com/docs/app-marketplace/requirements/web-payments-sdk](https://developer.squareup.com/docs/app-marketplace/requirements/web-payments-sdk)

> **Additional Documentation**
>
> [Troubleshoot the Payments API](https://developer.squareup.com/docs/payments-api/error-codes)  
> [In-App Payments SDK: How It Works](https://developer.squareup.com/docs/in-app-payments-sdk/how-it-works)  
> [Sandbox Payments](https://developer.squareup.com/docs/devtools/sandbox/payments)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [December 19, 2024, 9:56pm UTC](https://developer.squareup.com/forums/t/tokenizationerrors-in-card-tokenize-method/20187/3 "2024-12-19T21:56:26Z")

</div>

The error message “TOKENIZATION\_IN\_PROCESS” indicates that a tokenization request is already in progress. This error can occur if the .tokenize() method is called multiple times concurrently. The Web Payments SDK is designed to handle one tokenization request at a time. If you’re seeing this error intermittently, it might be due to a race condition in your code where .tokenize() is being called more than once before the first call has completed. To resolve this issue, ensure that .tokenize() is not called again until the first tokenization request has completed.

_This answer was reviewed by @Bryan-Square._

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [December 19, 2024, 9:57pm UTC](https://developer.squareup.com/forums/t/tokenizationerrors-in-card-tokenize-method/20187/4 "2024-12-19T21:57:28Z")

</div>

Is it possible that something triggered tokenization inadvertently? 🙂
