# Card nonce not found in this application environment. Please ensure an application ID belonging to the same environment is used when generating the nonce

**URL:** <https://developer.squareup.com/forums/t/card-nonce-not-found-in-this-application-environment-please-ensure-an-application-id-belonging-to-the-same-environment-is-used-when-generating-the-nonce/7552>\
**Category:** Questions\
**Tags:** sandbox, web-payments-sdk\
**Created:** [November 12, 2022, 2:01am UTC](https://developer.squareup.com/forums/t/card-nonce-not-found-in-this-application-environment-please-ensure-an-application-id-belonging-to-the-same-environment-is-used-when-generating-the-nonce/7552 "2022-11-12T02:01:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samvps](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@samvps](https://developer.squareup.com/forums/u/samvps)\
**Post date:** [November 12, 2022, 2:01am UTC](https://developer.squareup.com/forums/t/card-nonce-not-found-in-this-application-environment-please-ensure-an-application-id-belonging-to-the-same-environment-is-used-when-generating-the-nonce/7552/1 "2022-11-12T02:01:37Z")

</div>

I’m referring [connect-examples/v2/csharp\_payment](https://github.com/square/connect-api-examples/tree/master/connect-examples/v2/csharp_payment) example and creating a solution for .net framework 4.8 web application.

I was able to create the card payment form in .net 4.8 app and created separate api to handle to server side payment process using .net 6.  
And I’m getting an error when executing this “**await PaymentsApi.CreatePaymentAsync(createPaymentRequest)**”

Error: “ **Card nonce not found in this application environment. Please ensure an application ID belonging to the same environment is used when generating the nonce.** ”

Why am I getting this error? Do I have to implement the sever side in the same application?

Thanks.

---

<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:** [November 14, 2022, 4:51pm UTC](https://developer.squareup.com/forums/t/card-nonce-not-found-in-this-application-environment-please-ensure-an-application-id-belonging-to-the-same-environment-is-used-when-generating-the-nonce/7552/2 "2022-11-14T16:51:11Z")

</div>

That error happens when something isn’t configured correctly. You may have productions credentials configured but are calling sandbox. You’ll want to make sure you’ve configured your application to the environment you want to charge in. 🙂
