<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>thread Card nonce not found in charge api. in Archived Discussions (Read Only)</title>
    <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Card-nonce-not-found-in-charge-api/m-p/119426#M96057</link>
    <description>&lt;P&gt;Whenever we are calling the charge API we are getting the error "Card nonce not found in this `sandbox` application environment. Please ensure an application ID belonging to the same environment is used to generate the nonce.".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone tell me what should I used as card nonce in the sandbox account.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the following code:&lt;/P&gt;
&lt;P&gt;public function charge()&lt;BR /&gt;{&lt;BR /&gt;$transcation = Square::charge([&lt;BR /&gt;'amount' =&amp;gt; 500,&lt;BR /&gt;'card_nonce' =&amp;gt; '62229[Redacted]0',&lt;BR /&gt;'location_id' =&amp;gt; 'CBASEO-z9geAh6VET0JNph6vi6xxxx&lt;SPAN style="font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;'currency' =&amp;gt; 'USD'&lt;BR /&gt;]);&lt;BR /&gt;&lt;BR /&gt;return response()-&amp;gt;json(compact('transcation'));&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2019 13:00:30 GMT</pubDate>
    <dc:creator>nimapatel</dc:creator>
    <dc:date>2019-04-30T13:00:30Z</dc:date>
    <item>
      <title>Card nonce not found in charge api.</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Card-nonce-not-found-in-charge-api/m-p/119426#M96057</link>
      <description>&lt;P&gt;Whenever we are calling the charge API we are getting the error "Card nonce not found in this `sandbox` application environment. Please ensure an application ID belonging to the same environment is used to generate the nonce.".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone tell me what should I used as card nonce in the sandbox account.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the following code:&lt;/P&gt;
&lt;P&gt;public function charge()&lt;BR /&gt;{&lt;BR /&gt;$transcation = Square::charge([&lt;BR /&gt;'amount' =&amp;gt; 500,&lt;BR /&gt;'card_nonce' =&amp;gt; '62229[Redacted]0',&lt;BR /&gt;'location_id' =&amp;gt; 'CBASEO-z9geAh6VET0JNph6vi6xxxx&lt;SPAN style="font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;'currency' =&amp;gt; 'USD'&lt;BR /&gt;]);&lt;BR /&gt;&lt;BR /&gt;return response()-&amp;gt;json(compact('transcation'));&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 13:00:30 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Card-nonce-not-found-in-charge-api/m-p/119426#M96057</guid>
      <dc:creator>nimapatel</dc:creator>
      <dc:date>2019-04-30T13:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Card nonce not found in charge api.</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Card-nonce-not-found-in-charge-api/m-p/119636#M96058</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/169260"&gt;@nimapatel&lt;/a&gt;, welcome to the Seller Community!&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;This can happen if you're using mismatched production and sandbox access token and application ids. To fix it, you should make sure that:&lt;/P&gt;

&lt;OL&gt;
 &lt;LI&gt;&amp;nbsp; Your `sqpaymentform.js` is using your sandbox application id (if you want to use sandbox).&lt;/LI&gt;
 &lt;LI&gt;Wherever you're creating the `Transaction API` and calling the `Charge` endpoint, you need make sure you're using your sandbox access token.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Also remember when you want to change to production, you also need to change in both places as well.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;This doc includes where to set the application id for the `sqpaymentform.js`:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.connect.squareup.com/payments/sqpaymentform/setup#step-5-set-your-application-and-location-id" target="_blank"&gt;https://docs.connect.squareup.com/payments/sqpaymentform/setup#step-5-set-your-application-and-location-id&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 19:31:13 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Card-nonce-not-found-in-charge-api/m-p/119636#M96058</guid>
      <dc:creator>Chad</dc:creator>
      <dc:date>2019-05-01T19:31:13Z</dc:date>
    </item>
  </channel>
</rss>

