Facing this issue when i payment via card on production mode

“{"errors":[{"code":"NOT_FOUND","detail":"Card nonce not found","category":"INVALID_REQUEST_ERROR"}]}”
}

:waving_hand: 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:

Additional Documentation

Manage Customer Cards on File
Cards API
Handling Errors

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.

The error message you’re encountering, {"errors":[{"code":"NOT_FOUND","detail":"Card nonce not found","category":"INVALID_REQUEST_ERROR"}]}, indicates that the card nonce you are trying to use in your request is not found or is invalid. This typically happens when the payment token (nonce) is either expired, not generated correctly, or not passed correctly in the request.

Here are a few things you can check or try:

  1. Ensure the Nonce is Valid: Make sure that the nonce you are using is a valid, unexpired payment token. Payment tokens are typically single-use and have a short lifespan.

  2. Correct SDK Usage: Ensure that you are using the Web Payments SDK or In-App Payments SDK to generate the nonce. These SDKs are responsible for securely collecting payment information and generating the nonce.

  3. Check the Source ID: Verify that the source_id in your CreatePayment request is correctly set to the nonce you received from the SDK.

  4. Sandbox Environment: If you are testing in the Square Sandbox, ensure you are using the correct test values and that the nonce is generated in the Sandbox environment.

  5. Network Issues: Ensure there are no network issues that might be causing the nonce to not be sent or received properly.

If the issue persists, you may need to regenerate the nonce and try the request again.

This answer was reviewed by @Bryan-Square.