<?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 Issue with Viewing Invoice PDFs in Square Without Authentication in Payments Troubleshooting</title>
    <link>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779381#M1483</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am implementing a "View Invoice PDF" feature on my webpage, allowing users to access their invoice PDFs via the following Square Sandbox URL:&lt;/P&gt;&lt;P&gt;&lt;A href="https://app.squareupsandbox.com/invoices/{invoiceId}/attachments/pdf?inline=true" target="_blank" rel="noopener"&gt;https://app.squareupsandbox.com/invoices/{invoiceId}/attachments/pdf?inline=true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Currently, this functionality works if I am logged into the Square Dashboard on the same browser. However, when accessed from a different browser or by an unauthenticated user, the following authentication error occurs:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{
  &lt;SPAN class=""&gt;"errors"&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;[
    &lt;SPAN class=""&gt;{
      &lt;SPAN class=""&gt;"category"&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"AUTHENTICATION_ERROR"&lt;SPAN class=""&gt;,
      &lt;SPAN class=""&gt;"code"&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"UNAUTHORIZED"&lt;SPAN class=""&gt;,
      &lt;SPAN class=""&gt;"detail"&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"This request could not be authorized."
    &lt;SPAN class=""&gt;}
  &lt;SPAN class=""&gt;]
&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This prevents users from viewing and downloading their invoice PDFs unless they are logged into Square. Is there a way to resolve this issue, or is authentication a strict requirement for accessing invoice attachments?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Best regards,&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Sep 2025 06:55:42 GMT</pubDate>
    <dc:creator>aZticot</dc:creator>
    <dc:date>2025-09-20T06:55:42Z</dc:date>
    <item>
      <title>Issue with Viewing Invoice PDFs in Square Without Authentication</title>
      <link>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779381#M1483</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am implementing a "View Invoice PDF" feature on my webpage, allowing users to access their invoice PDFs via the following Square Sandbox URL:&lt;/P&gt;&lt;P&gt;&lt;A href="https://app.squareupsandbox.com/invoices/{invoiceId}/attachments/pdf?inline=true" target="_blank" rel="noopener"&gt;https://app.squareupsandbox.com/invoices/{invoiceId}/attachments/pdf?inline=true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Currently, this functionality works if I am logged into the Square Dashboard on the same browser. However, when accessed from a different browser or by an unauthenticated user, the following authentication error occurs:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{
  &lt;SPAN class=""&gt;"errors"&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;[
    &lt;SPAN class=""&gt;{
      &lt;SPAN class=""&gt;"category"&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"AUTHENTICATION_ERROR"&lt;SPAN class=""&gt;,
      &lt;SPAN class=""&gt;"code"&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"UNAUTHORIZED"&lt;SPAN class=""&gt;,
      &lt;SPAN class=""&gt;"detail"&lt;SPAN class=""&gt;: &lt;SPAN class=""&gt;"This request could not be authorized."
    &lt;SPAN class=""&gt;}
  &lt;SPAN class=""&gt;]
&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This prevents users from viewing and downloading their invoice PDFs unless they are logged into Square. Is there a way to resolve this issue, or is authentication a strict requirement for accessing invoice attachments?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Best regards,&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Sep 2025 06:55:42 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779381#M1483</guid>
      <dc:creator>aZticot</dc:creator>
      <dc:date>2025-09-20T06:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Viewing Invoice PDFs in Square Without Authentication</title>
      <link>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779627#M1484</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/712722"&gt;@aZticot&lt;/a&gt;&amp;nbsp;!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My recommendation would be to ask this question over in the &lt;A href="https://developer.squareup.com/forums/" target="_self"&gt;Square Developer's Forum&lt;/A&gt;. Most of the moderators here are not super familiar with coding or APIs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think one of my friends&amp;nbsp;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/308043"&gt;@JTPets&lt;/a&gt;&amp;nbsp;may have some insight, but not sure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry i could not be of more assistance, but the developer's forum will probably get you set in the right direction.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 15:01:24 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779627#M1484</guid>
      <dc:creator>Summer2024</dc:creator>
      <dc:date>2025-02-27T15:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Viewing Invoice PDFs in Square Without Authentication</title>
      <link>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779629#M1485</link>
      <description>&lt;P&gt;I am not a developer and I have very little code skill myself. However it appears that you are using the sandbox which is for testing and not live production.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Change your urls and ensure you use a production api key and url&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 15:03:25 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779629#M1485</guid>
      <dc:creator>JTPets</dc:creator>
      <dc:date>2025-02-27T15:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Viewing Invoice PDFs in Square Without Authentication</title>
      <link>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779637#M1486</link>
      <description>&lt;P&gt;I use AI for a lot of my own Square API issues, here is what the AI says as an additional reply:&lt;/P&gt;&lt;P&gt;The issue here is that Square's invoice PDF URLs are &lt;STRONG&gt;not publicly accessible&lt;/STRONG&gt; and require authentication to view. This means:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Authentication Required&lt;/STRONG&gt;: The URL only works if the user is logged into Square with an account that has permission to view the invoice.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Sandbox vs. Production&lt;/STRONG&gt;: Even in the Square Sandbox environment, authentication is enforced.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;No Public Sharing&lt;/STRONG&gt;: Unlike some other platforms that generate temporary public links, Square's invoice PDFs are restricted to authorized users.&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Possible Solutions:&lt;/H3&gt;&lt;H4&gt;1. &lt;STRONG&gt;Use Square's API to Fetch the Invoice PDF&lt;/STRONG&gt;&lt;/H4&gt;&lt;UL&gt;&lt;LI&gt;Instead of relying on a direct URL, use Square’s API to fetch the invoice details and generate a downloadable PDF.&lt;/LI&gt;&lt;LI&gt;You may need to proxy the request through your server if you want to offer the PDF to non-authenticated users.&lt;/LI&gt;&lt;/UL&gt;&lt;H4&gt;2. &lt;STRONG&gt;Generate a Temporary Link&lt;/STRONG&gt;&lt;/H4&gt;&lt;UL&gt;&lt;LI&gt;If public sharing is required, consider using a cloud storage service (AWS S3, Google Drive, etc.) to store and serve the PDFs after fetching them via Square’s API.&lt;/LI&gt;&lt;/UL&gt;&lt;H4&gt;3. &lt;STRONG&gt;Embed a Secure Login Mechanism&lt;/STRONG&gt;&lt;/H4&gt;&lt;UL&gt;&lt;LI&gt;If your users should have access, authenticate them via OAuth to allow them to fetch their invoices.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 27 Feb 2025 15:46:05 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779637#M1486</guid>
      <dc:creator>JTPets</dc:creator>
      <dc:date>2025-02-27T15:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Viewing Invoice PDFs in Square Without Authentication</title>
      <link>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779673#M1487</link>
      <description>&lt;P&gt;I appreciate you&amp;nbsp;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/308043"&gt;@JTPets&lt;/a&gt;&amp;nbsp;!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 16:56:16 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-with-Viewing-Invoice-PDFs-in-Square-Without-Authentication/m-p/779673#M1487</guid>
      <dc:creator>Summer2024</dc:creator>
      <dc:date>2025-02-27T16:56:16Z</dc:date>
    </item>
  </channel>
</rss>

