# Card nonce not found

**URL:** <https://developer.squareup.com/forums/t/card-nonce-not-found/2321>\
**Category:** Questions\
**Tags:** payments-api, payment-form\
**Created:** [April 15, 2021, 7:32am UTC](https://developer.squareup.com/forums/t/card-nonce-not-found/2321 "2021-04-15T07:32:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoDoze](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@NoDoze](https://developer.squareup.com/forums/u/NoDoze)\
**Post date:** [April 15, 2021, 7:32am UTC](https://developer.squareup.com/forums/t/card-nonce-not-found/2321/1 "2021-04-15T07:32:04Z")

</div>

In Sandbox the payment api works without issue.  
In production, after I change the Application ID, Access Token, and URLs to both [https://connect.squareup.com/v2/payments](https://connect.squareup.com/v2/payments) and [https://js.squareup.com/v2/paymentform](https://js.squareup.com/v2/paymentform), I get the “Card nonce not found” error.  
What is odd, is that this worked with no errors for 12 hours, and CC payments were completed without issue.  
Nothing was changed on the website, it suddenly stopped working!?!  
I’m pulling my hair out!  
Any help is appreciated, Thank You!

---

<div class="post-metadata">

**Author:** ![NoDoze](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@NoDoze](https://developer.squareup.com/forums/u/NoDoze)\
**Post date:** [April 15, 2021, 8:55am UTC](https://developer.squareup.com/forums/t/card-nonce-not-found/2321/2 "2021-04-15T08:55:09Z")

</div>

OK, changing this from:  
“source\_id” =\> “cnon:card-nonce-ok”  
to  
“source\_id” =\> $nonce  
fixed my issue.  
Not sure why this would suddenly make a difference…???

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [April 15, 2021, 3:44pm UTC](https://developer.squareup.com/forums/t/card-nonce-not-found/2321/3 "2021-04-15T15:44:46Z")

</div>

`cnon:card-nonce-ok` is not a valid card nonce in production, so you would get that error in production. It’s only valid in sandbox, so when you made the change to production URLs, it suddenly would throw that error.

---

<div class="post-metadata">

**Author:** ![NoDoze](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@NoDoze](https://developer.squareup.com/forums/u/NoDoze)\
**Post date:** [April 15, 2021, 6:53pm UTC](https://developer.squareup.com/forums/t/card-nonce-not-found/2321/4 "2021-04-15T18:53:01Z")

</div>

Ahhh I see, I didn’t see that anywhere in the documentation.

Is there any difference between? :  
“card\_nonce” =\> $nonce  
“source\_id” =\> $nonce \<–This is what I am currently using.  
Which is the correct one?  
I’ve seen both in two separate examples, on one forum page, and they too had no idea what the difference is. It was the ONLY place I’ve seen this mentioned, no where on square documentation, square forums or square stackoverflow.  
Thank you

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [April 15, 2021, 8:15pm UTC](https://developer.squareup.com/forums/t/card-nonce-not-found/2321/5 "2021-04-15T20:15:26Z")

</div>

`source_id` is definitely the correct one. `card_nonce` was used in the deprecated [Charge](https://developer.squareup.com/reference/square/transactions-api/charge) endpoint (Payments API has replaced this API, just linking for referencing but please do not use). If you attempted to use it with `CreatePayment`, it would fail due to missing the required `source_id` field. You can see the list of body parameters here: [POST /v2/payments - Square API Reference](https://developer.squareup.com/reference/square/payments-api/create-payment)
