<?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 Squareup Webhook - Send duplicate request in Archived Discussions (Read Only)</title>
    <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Squareup-Webhook-Send-duplicate-request/m-p/328835#M7199</link>
    <description>&lt;P&gt;I am using squareup APIs .. i setup the notification URL to my application correctlly and setup it for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;PAYMENT_UPDATED&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;// setup notifications&lt;/SPAN&gt;
&lt;SPAN class=""&gt;$data&lt;/SPAN&gt; = &lt;SPAN class=""&gt;array&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"PAYMENT_UPDATED"&lt;/SPAN&gt;);
&lt;SPAN class=""&gt;$data_json&lt;/SPAN&gt; = json_encode(&lt;SPAN class=""&gt;$data&lt;/SPAN&gt;);
&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt; = curl_init();

curl_setopt (&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_URL, &lt;SPAN class=""&gt;"https://connect.squareup.com/v1/me/webhooks"&lt;/SPAN&gt;);
curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_RETURNTRANSFER, &lt;SPAN class=""&gt;1&lt;/SPAN&gt;);
curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_SSL_VERIFYPEER, &lt;SPAN class=""&gt;FALSE&lt;/SPAN&gt;);
curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_SSL_VERIFYHOST, &lt;SPAN class=""&gt;FALSE&lt;/SPAN&gt;);
curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_CUSTOMREQUEST, &lt;SPAN class=""&gt;"PUT"&lt;/SPAN&gt;);

curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_HTTPHEADER, &lt;SPAN class=""&gt;array&lt;/SPAN&gt;(
    &lt;SPAN class=""&gt;'Content-Type: application/json'&lt;/SPAN&gt;,
    &lt;SPAN class=""&gt;'Content-Length: '&lt;/SPAN&gt; . strlen(&lt;SPAN class=""&gt;$data_json&lt;/SPAN&gt;),
    &lt;SPAN class=""&gt;'Authorization: Bearer XXXXXXXXXXXXXXXXXX'&lt;/SPAN&gt;)
);

curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_POSTFIELDS,&lt;SPAN class=""&gt;$data_json&lt;/SPAN&gt;);

&lt;SPAN class=""&gt;echo&lt;/SPAN&gt; &lt;SPAN class=""&gt;$response&lt;/SPAN&gt;  = curl_exec(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;);
curl_close(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;);
&lt;SPAN class=""&gt;echo&lt;/SPAN&gt; &lt;SPAN class=""&gt;"&amp;lt;pre&amp;gt;"&lt;/SPAN&gt;;
print_r(json_decode(&lt;SPAN class=""&gt;$response&lt;/SPAN&gt;,&lt;SPAN class=""&gt;true&lt;/SPAN&gt;));
&lt;SPAN class=""&gt;echo&lt;/SPAN&gt; &lt;SPAN class=""&gt;"&amp;lt;/pre&amp;gt;"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;P&gt;and i make a payment from a mobile device then, i got a duplicate requests for the single payment withe the same &lt;A href="https://frontiertechnologyinstitute.com/data-engineering/" target="_self"&gt;data&lt;/A&gt; like that:&lt;/P&gt;&lt;PRE&gt;     {&lt;SPAN class=""&gt;"entity_id"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;"xxxxxxxxxxxx"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;"event_type"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;"PAYMENT_UPDATED"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;"merchant_id"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;"xxxxxxxxxxxx"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;"subunit_id"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;"xxxxxxxx"&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;any help ?!&lt;/P&gt;</description>
    <pubDate>Thu, 23 Dec 2021 08:12:22 GMT</pubDate>
    <dc:creator>george364</dc:creator>
    <dc:date>2021-12-23T08:12:22Z</dc:date>
    <item>
      <title>Squareup Webhook - Send duplicate request</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Squareup-Webhook-Send-duplicate-request/m-p/328835#M7199</link>
      <description>&lt;P&gt;I am using squareup APIs .. i setup the notification URL to my application correctlly and setup it for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;PAYMENT_UPDATED&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;// setup notifications&lt;/SPAN&gt;
&lt;SPAN class=""&gt;$data&lt;/SPAN&gt; = &lt;SPAN class=""&gt;array&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"PAYMENT_UPDATED"&lt;/SPAN&gt;);
&lt;SPAN class=""&gt;$data_json&lt;/SPAN&gt; = json_encode(&lt;SPAN class=""&gt;$data&lt;/SPAN&gt;);
&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt; = curl_init();

curl_setopt (&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_URL, &lt;SPAN class=""&gt;"https://connect.squareup.com/v1/me/webhooks"&lt;/SPAN&gt;);
curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_RETURNTRANSFER, &lt;SPAN class=""&gt;1&lt;/SPAN&gt;);
curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_SSL_VERIFYPEER, &lt;SPAN class=""&gt;FALSE&lt;/SPAN&gt;);
curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_SSL_VERIFYHOST, &lt;SPAN class=""&gt;FALSE&lt;/SPAN&gt;);
curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_CUSTOMREQUEST, &lt;SPAN class=""&gt;"PUT"&lt;/SPAN&gt;);

curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_HTTPHEADER, &lt;SPAN class=""&gt;array&lt;/SPAN&gt;(
    &lt;SPAN class=""&gt;'Content-Type: application/json'&lt;/SPAN&gt;,
    &lt;SPAN class=""&gt;'Content-Length: '&lt;/SPAN&gt; . strlen(&lt;SPAN class=""&gt;$data_json&lt;/SPAN&gt;),
    &lt;SPAN class=""&gt;'Authorization: Bearer XXXXXXXXXXXXXXXXXX'&lt;/SPAN&gt;)
);

curl_setopt(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;, CURLOPT_POSTFIELDS,&lt;SPAN class=""&gt;$data_json&lt;/SPAN&gt;);

&lt;SPAN class=""&gt;echo&lt;/SPAN&gt; &lt;SPAN class=""&gt;$response&lt;/SPAN&gt;  = curl_exec(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;);
curl_close(&lt;SPAN class=""&gt;$curl&lt;/SPAN&gt;);
&lt;SPAN class=""&gt;echo&lt;/SPAN&gt; &lt;SPAN class=""&gt;"&amp;lt;pre&amp;gt;"&lt;/SPAN&gt;;
print_r(json_decode(&lt;SPAN class=""&gt;$response&lt;/SPAN&gt;,&lt;SPAN class=""&gt;true&lt;/SPAN&gt;));
&lt;SPAN class=""&gt;echo&lt;/SPAN&gt; &lt;SPAN class=""&gt;"&amp;lt;/pre&amp;gt;"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;P&gt;and i make a payment from a mobile device then, i got a duplicate requests for the single payment withe the same &lt;A href="https://frontiertechnologyinstitute.com/data-engineering/" target="_self"&gt;data&lt;/A&gt; like that:&lt;/P&gt;&lt;PRE&gt;     {&lt;SPAN class=""&gt;"entity_id"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;"xxxxxxxxxxxx"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;"event_type"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;"PAYMENT_UPDATED"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;"merchant_id"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;"xxxxxxxxxxxx"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;"subunit_id"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;"xxxxxxxx"&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;any help ?!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 08:12:22 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Squareup-Webhook-Send-duplicate-request/m-p/328835#M7199</guid>
      <dc:creator>george364</dc:creator>
      <dc:date>2021-12-23T08:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Squareup Webhook - Send duplicate request</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Squareup-Webhook-Send-duplicate-request/m-p/329128#M7200</link>
      <description>&lt;P&gt;Hey there &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/418277"&gt;@george364&lt;/a&gt; and welcome to the Seller Community!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;While our forums are open for everyone, you may have more success looking for API support under our &lt;A href="https://developer.squareup.com/" target="_blank"&gt;Developer Portal&lt;/A&gt;. Once there you may click on Support and I am pretty confident you will have better luck finding an answer there.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;P.S.&amp;nbsp;&lt;/STRONG&gt;&lt;EM&gt;Welcome&lt;/EM&gt; to the &lt;A href="https://www.sellercommunity.com/t5/Orientation-Etiquette/Orientation-Welcome-to-the-Seller-Community/m-p/190104#M152" target="_blank"&gt;Seller Community&lt;/A&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":sparkles:"&gt;✨&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Dec 2021 21:59:33 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/Squareup-Webhook-Send-duplicate-request/m-p/329128#M7200</guid>
      <dc:creator>JJ_</dc:creator>
      <dc:date>2021-12-24T21:59:33Z</dc:date>
    </item>
  </channel>
</rss>

