<?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 Re: createCustomerCard: Customer with ID not found in Archived Discussions (Read Only)</title>
    <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78889#M44517</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/34011"&gt;@Chad&lt;/a&gt;, I'll do that.&lt;/P&gt;</description>
    <pubDate>Sun, 22 Apr 2018 08:13:29 GMT</pubDate>
    <dc:creator>LocalAK</dc:creator>
    <dc:date>2018-04-22T08:13:29Z</dc:date>
    <item>
      <title>createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76730#M44496</link>
      <description>&lt;P&gt;I'm using PHP and&amp;nbsp;Sandbox credentials. I can charge a card ( but with no customer info )&amp;nbsp;and&amp;nbsp;create a new&amp;nbsp;customer.&amp;nbsp;Although, when I try to add a card to a customer, I get this :&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Exception when calling customersApi-&amp;gt;createCustomerCard: [HTTP/1.1 404 Not Found] {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Customer with ID `The-Customers-Id` not found."}]}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Can anyone point me tords a solution or an example of adding a card to a customer in PHP?&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a newly created&amp;nbsp;nonce for this transaction, the postal code used on the customer, the square customer id created on a previous transaction. Still get this error. Checked everything bazillion times,&amp;nbsp;what am I overlooking?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 01:56:02 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76730#M44496</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-06T01:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76811#M44497</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/101342"&gt;@LocalAK&lt;/a&gt;! The only way to see customers through the API is if the customer is added through the API with the customer_id (&lt;A href="https://docs.connect.squareup.com/api/connect/v2#endpoint-charge" target="_blank"&gt;https://docs.connect.squareup.com/api/connect/v2#endpoint-charge&lt;/A&gt;) parameter enabled.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Before you can attach a customer_id to a transaction, you’ll need to use the CreateCustomer (&lt;A href="https://docs.connect.squareup.com/api/connect/v2#endpoint-createcustomer" target="_blank"&gt;https://docs.connect.squareup.com/api/connect/v2#endpoint-createcustomer&lt;/A&gt;) endpoint to generate a customer_id.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Sorry for the frustration this caused! If you have any other questions, please let us know.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 23:29:34 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76811#M44497</guid>
      <dc:creator>Helen</dc:creator>
      <dc:date>2018-04-05T23:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76825#M44499</link>
      <description>&lt;P&gt;I'm not sure what happened to my last post, it was here for a few minutes. Then gone.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank you for your time &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/107"&gt;@Helen&lt;/a&gt;,&lt;BR /&gt; &lt;BR /&gt; I am able to create a customer id with CreateCustomer.&lt;BR /&gt; &lt;BR /&gt; * I am unable to add a card to the customer with createCustomerCard ( original see post ), I'm following the information on this page : &lt;A href="https://docs.connect.squareup.com/api/connect/v2#endpoint-createcustomercard" target="_blank"&gt;&lt;FONT color="#0066cc"&gt; https://docs.connect.squareup.com/api/connect/v2#endpoint-createcustomercard&lt;/FONT&gt;&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt; This is the full debug output :&lt;BR /&gt; &lt;BR /&gt; ( I CHANGED THE NONCE, CUSTOMER ID AND OTHER "SENSITIVE" INFORMATION.&amp;nbsp; )&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;[DEBUG] HTTP Request body ~BEGIN~ {"card_nonce":"CBASEEheG_zYgedwCckfcogAQ","billing_address":{"postalCode":"99710"}} ~END~ [DEBUG] HTTP Response body ~BEGIN~ {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Customer with ID `P1E9NGSCEVSEPBSCWNK4` not found."}]} ~END~ * Trying 74.122.190.85... * Connected to connect.squareup.com (74.122.190.85) port 443 (#0) * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 * ALPN, server did not agree to a protocol * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=Square, Inc.; CN=*.squareup.com * start date: Nov 18 22:01:28 2017 GMT * expire date: Dec 15 22:31:28 2018 GMT * subjectAltName: connect.squareup.com matched * issuer: C=US; O=Entrust, Inc.; OU=See &lt;A href="http://www.entrust.net/legal-terms" target="_blank"&gt;www.entrust.net/legal-terms&lt;/A&gt;; OU=(c) 2012 Entrust, Inc. - for authorized use only; CN=Entrust Certification Authority - L1K * SSL certificate verify ok.&amp;gt; POST /v2/customers/P1E9NGSCEVSEPBSCWNK4/cards HTTP/1.1 Host: connect.squareup.com User-Agent: Square-Connect-PHP/2.5.1 Accept: application/json Content-Type: application/json Authorization: Bearer sandbox-sq0atb-aUgdfsrFgQ_s-bfgDASF1 Content-Length: 88 * upload completely sent off: 88 out of 88 bytes&amp;lt; HTTP/1.1 404 Not Found&amp;lt; Content-Type: application/json&amp;lt; Vary: Origin, Accept-Encoding&amp;lt; X-Content-Type-Options: nosniff&amp;lt; X-Download-Options: noopen&amp;lt; X-Frame-Options: SAMEORIGIN&amp;lt; X-Permitted-Cross-Domain-Policies: none&amp;lt; X-Xss-Protection: 1; mode=block&amp;lt; Date: Fri, 06 Apr 2018 01:15:24 GMT&amp;lt; keep-alive: timeout=60&amp;lt; Strict-Transport-Security: max-age=631152000&amp;lt; content-length: 136&amp;lt; * Connection #0 to host connect.squareup.com left intact &lt;BR /&gt; CustomerId : P1E9NGSCEVSEPBSCWNK4&lt;BR /&gt; &amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Exception when calling $CustomersApi-&amp;gt;createCustomerCard: [HTTP/1.1 404 Not Found] {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Customer with ID `P1E9NGSCEVSEPBSCWNK4` not found."}]}&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*&amp;nbsp; The Customer Id was created on the preveous page by the user and saved to a local database and used to add a card to "this" customer.&lt;BR /&gt; &lt;BR /&gt; Do you have another idea?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 01:37:48 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76825#M44499</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-06T01:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76827#M44500</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/107"&gt;@Helen&lt;/a&gt;&amp;nbsp;for your time.&lt;BR /&gt;&lt;BR /&gt;I've posted two responces and they are deleted when I get back, so I am just "testing" with this message.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 01:41:34 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76827#M44500</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-06T01:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76828#M44501</link>
      <description>&lt;P&gt;I am able to create a customer id with CreateCustomer.&lt;BR /&gt; &amp;nbsp;&lt;BR /&gt; &amp;nbsp;* I am unable to add a card to the customer with createCustomerCard ( original see post ), I'm following the information on this page : &lt;A href="https://docs.connect.squareup.com/api/connect/v2#endpoint-createcustomercard" target="_blank"&gt;&lt;FONT color="#0066cc"&gt; https://docs.connect.squareup.com/api/connect/v2#endpoint-createcustomercard&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 01:42:17 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76828#M44501</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-06T01:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76829#M44504</link>
      <description>&lt;P&gt;[DEBUG] HTTP Request body ~BEGIN~ {"card_nonce":"VALID NONCE","billing_address":{"postalCode":"VALID POSTAL CODE"}} ~END~ [DEBUG] HTTP Response body ~BEGIN~ {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Customer with ID `CUSTOMER ID FROM SQUARE` not found."}]} ~END~ * Trying AN IP ADDRESS... * Connected to connect.squareup.com (AN IP ADDRESS) port 443 (#0) * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * SSL connection using TLSv1.2 / SSL CONNECT CERTIFICATE * ALPN, server did not agree to a protocol * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=Square, Inc.; CN=*.squareup.com * start date: Nov 18 22:01:28 2017 GMT * expire date: Dec 15 22:31:28 2018 GMT * subjectAltName: connect.squareup.com matched * issuer: C=US; O=Entrust, Inc.; OU=See &lt;A href="http://www.entrust.net/legal-terms" target="_blank"&gt;www.entrust.net/legal-terms&lt;/A&gt;; OU=(c) 2012 Entrust, Inc. - for authorized use only; CN=Entrust Certification Authority - L1K * SSL certificate verify ok.&amp;gt; POST /v2/customers/CUSTOMER ID FROM SQUARE/cards HTTP/1.1 Host: connect.squareup.com User-Agent: Square-Connect-PHP/2.5.1 Accept: application/json Content-Type: application/json Authorization: Bearer sandbox&amp;nbsp;Content-Length: 88 * upload completely sent off: 88 out of 88 bytes&amp;lt; HTTP/1.1 404 Not Found&amp;lt; Content-Type: application/json&amp;lt; Vary: Origin, Accept-Encoding&amp;lt; X-Content-Type-Options: nosniff&amp;lt; X-Download-Options: noopen&amp;lt; X-Frame-Options: SAMEORIGIN&amp;lt; X-Permitted-Cross-Domain-Policies: none&amp;lt; X-Xss-Protection: 1; mode=block&amp;lt; Date: Fri, 06 Apr 2018 01:15:24 GMT&amp;lt; keep-alive: timeout=60&amp;lt; Strict-Transport-Security: max-age=631152000&amp;lt; content-length: 136&amp;lt; * Connection #0 to host connect.squareup.com left intact &amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Exception when calling $CustomersApi-&amp;gt;createCustomerCard: [HTTP/1.1 404 Not Found] {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Customer with ID `CUSTOMER ID FROM SQUARE` not found."}]}&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*&amp;nbsp; The Customer Id was created on the preveous page by the user and saved to a local database and used to add a card to "this" customer.&lt;BR /&gt; &lt;BR /&gt; Do you have any more ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 01:48:28 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76829#M44504</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-06T01:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76888#M44505</link>
      <description>&lt;P&gt;Hi again! I'm sorry,&amp;nbsp;it looks like a few of your posts were marked as spam. I've unmarked them and tidied up this thread but if anything is missing let me know!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;What you're seeing may be caused by the delay that occurs when creating a customer with the CreateCustomer endpoint. On average, the delay is about .4 seconds. Please&amp;nbsp;wait a second before using the CreateCutomerCard endpoint.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 16:54:21 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76888#M44505</guid>
      <dc:creator>Helen</dc:creator>
      <dc:date>2018-04-06T16:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76994#M44503</link>
      <description>&lt;P&gt;New Info : &lt;BR /&gt; &amp;nbsp;&lt;BR /&gt; &amp;nbsp;The customer shows in the Dashboard. But no reference to a customer id.&lt;BR /&gt; &amp;nbsp;&lt;BR /&gt; &amp;nbsp;So, I don't know what else to do but conclude that the createCustomer api is not giving me the correct customer id. The given customer does not match a customer?&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;** How can I verify a customer id in the Dashboard?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Apr 2018 06:50:01 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/76994#M44503</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-07T06:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77371#M44506</link>
      <description>&lt;P&gt;Your solution was to another problem.&lt;BR /&gt; &lt;BR /&gt; Do you have any additional advice on my question or where I could find a working example of how to add a Card Nonce to a Customer&amp;nbsp;ID in PHP?&lt;BR /&gt; &lt;BR /&gt; The Square API docs and Github examples do not have an example of how to&amp;nbsp;add a card&amp;nbsp;to a customer in PHP.&lt;BR /&gt;The&amp;nbsp;url other&amp;nbsp;laguages use for square just gives me a 404 ( explained everything in&amp;nbsp;this tread ).&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt; Thanks again &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/107"&gt;@Helen&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 22:30:52 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77371#M44506</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-10T22:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77374#M44507</link>
      <description>&lt;P&gt;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/107"&gt;@Helen&lt;/a&gt;,&lt;BR /&gt; &lt;BR /&gt; I have my visitors create a customer id with square, then I have them chose account type, billing type (single payment or reoccurring) before they are asked to provide card information. They are assigned a Square customer ID "long" before I attempt to add the card nonce to the&amp;nbsp;customer id.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; Then I get the output I have posted here before. &lt;BR /&gt; &lt;BR /&gt; Any ideas?&lt;BR /&gt; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time on fixing my "spam". I was VERY confusing and didn't want to post duplicate information.&lt;BR /&gt; &lt;BR /&gt; But I was unaware you knew something was wrong.&lt;BR /&gt; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 17:48:26 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77374#M44507</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-12T17:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77714#M44508</link>
      <description>&lt;DIV class="lia-page"&gt;&lt;CENTER&gt;
&lt;DIV class="MinimumWidthContainer"&gt;
&lt;DIV class="min-width-wrapper"&gt;
&lt;DIV class="min-width"&gt;
&lt;DIV class="lia-content"&gt;
&lt;DIV class="lia-quilt lia-quilt-forum-topic-page lia-quilt-layout-one-column lia-top-quilt"&gt;
&lt;DIV class="lia-quilt-row lia-quilt-row-main"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-main-content"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV class="lia-component-reply-list"&gt;
&lt;DIV class="linear-message-list message-list"&gt;
&lt;DIV class="lia-linear-display-message-view" id="lineardisplaymessageviewwrapper"&gt;
&lt;DIV class="first-message"&gt;
&lt;DIV class="lia-panel-message message-uid-77714" id="messageview" data-lia-message-uid="77714"&gt;
&lt;DIV class="custom-reply custom-reply-indent custom-reply-indent-3"&gt;
&lt;DIV class="lia-message-view-wrapper lia-js-data-messageUid-77714 lia-component-forums-widget-message-view-two" id="messageView2_1" data-lia-message-uid="77714"&gt;
&lt;DIV class="MessageView lia-message-view-forum-message lia-message-view-display lia-row-standard-read lia-thread-reply lia-message-authored-by-you"&gt;
&lt;DIV class="lia-quilt lia-quilt-forum-message lia-quilt-layout-one-column-message"&gt;
&lt;DIV class="lia-quilt-row lia-quilt-row-main"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-main"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV class="lia-message-body lia-component-body-signature-highlight-escalation" id="messageBodySimpleDisplay"&gt;
&lt;DIV class="lia-message-body-content"&gt;Hello again everyone!&lt;BR /&gt; &lt;BR /&gt; Update : I've been doing lots of research and I'm&amp;nbsp;not able to find how to add a card to a customer with&amp;nbsp;Square &amp;amp; PHP.&lt;BR /&gt; &lt;BR /&gt; To further explain what I'm trying to do, this link shows how to do my objective manually from within the Dashboard : &lt;BR /&gt; &lt;BR /&gt; &lt;A href="https://www.sellercommunity.com/t5/Professional-Services-Group/Invoices-Update-Recurring-Invoices-amp-Card-On-File/m-p/7433#cof" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;https://www.sellercommunity.com/t5/Professional-Services-Group/Invoices-Update-Recurring-Invoices-am...&lt;/FONT&gt;&lt;/A&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't think the correct customer ID is being sent to&amp;nbsp;PHP via the API and I can't find a way to confirm a customer ID.&lt;BR /&gt; &lt;BR /&gt; When I add a card nonce to a customer, I get the same 404 I stated in my first post.&lt;BR /&gt; &lt;BR /&gt; Any ideas?&lt;BR /&gt; &lt;BR /&gt; &lt;A href="https://www.sellercommunity.com/t5/user/viewprofilepage/user-id/107" target="_blank"&gt;&lt;FONT color="#0066cc"&gt;@Helen&lt;/FONT&gt;&lt;/A&gt;?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/CENTER&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Apr 2018 17:46:18 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77714#M44508</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-12T17:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77717#M44509</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/101342"&gt;@LocalAK&lt;/a&gt;, sorry for the delay—I'm stepping in for Helen today.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I had the chance to run this by our API Team and they've suggested the following: it sounds like you may be calling the CreateCustomer&amp;nbsp;endpoint with your production API credentials; however, when you call the CreateCustomerCard endpoint, you're using your sandbox credentials. You'll need to be sure that you're using the same credentials for both endpoints (whether it be in sandbox or production).&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hope this helps get you in the right direction—please let us know if anything&amp;nbsp;else comes up.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 18:00:13 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77717#M44509</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-12T18:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77793#M44510</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/97"&gt;@Tom&lt;/a&gt;,&lt;BR /&gt; &amp;nbsp;&lt;BR /&gt; &amp;nbsp;I felt hopeful while I replaced the access token with my sandbox token.&lt;BR /&gt; &amp;nbsp;&lt;BR /&gt; But,&amp;nbsp;I get a 404 on create customer card.&lt;/P&gt;
&lt;P&gt;CustomersApi-&amp;gt;createCustomerCard: [HTTP/1.1 404 Not Found] {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Customer with ID `CBASEHQSDFSFFxCrEgAQ` not found."}]} &lt;BR /&gt;&lt;BR /&gt;This is with sandbox createing the customer id and sandbox trying to create customers card.&lt;BR /&gt;&lt;BR /&gt;Any thoughts?&lt;BR /&gt;&lt;BR /&gt;Thanks again for your time Tom.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 10:30:55 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77793#M44510</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-13T10:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77860#M44511</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/101342"&gt;@LocalAK&lt;/a&gt;! I'm stepping in for &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/97"&gt;@Tom&lt;/a&gt;. This is really turning into a team effort now.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;It looks like you're missing an underscore for the customer_id. Try using&amp;nbsp;CBASEHQtwK_ZknPv5OgAd6MxCrEgAQ instead of&amp;nbsp;CBASEHQtwKZknPv5OgAd6MxCrEgAQ to use the CreateCustomerCard endpoint with no errors!&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Let me know how it goes!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 18:14:15 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77860#M44511</guid>
      <dc:creator>Chad</dc:creator>
      <dc:date>2018-04-13T18:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77911#M44512</link>
      <description>&lt;P&gt;Hey Chad,&lt;BR /&gt; &lt;BR /&gt; I changed the customer id.&lt;BR /&gt; &lt;BR /&gt; I am able&amp;nbsp;to get a customer id from the Square API&amp;nbsp;and&amp;nbsp;PHP&amp;nbsp;saves it for&amp;nbsp;the customer and they have an option to setup reoccurring payment. When my server tries to add a card to&amp;nbsp;the customer,&amp;nbsp;I get a 404 error.&lt;BR /&gt; I'm using the Sandbox access token when creating the customer id ( with no issues and I can make a charge to it).&lt;/P&gt;
&lt;P&gt;But, When I try&amp;nbsp; ( also using sandbox ) :&lt;/P&gt;
&lt;PRE&gt;&amp;lt;?php

// Code removed for forum

$defaultApiConfig = new \SquareConnect\Configuration();
$defaultApiConfig-&amp;gt;setAccessToken($access_token);

$defaultApiClient = new \SquareConnect\ApiClient($defaultApiConfig);
$CustomersApi = new SquareConnect\Api\CustomersApi($defaultApiClient);

try {
 $result = $CustomersApi-&amp;gt;createCustomerCard(
  $customer_id,
  array(
   "card_nonce"=&amp;gt;$nonce,
   "billing_address"=&amp;gt;array(
    'postalCode' =&amp;gt; $postal_code
    )
   )
  );
 $customer_card = $result-&amp;gt;getCard();

}catch(Exception $e){
echo "Customer Id : $customer_id&amp;lt;br&amp;gt;";
  echo "Exception when calling CustomersApi-&amp;gt;createCustomerCard: ', $e-&amp;gt;getMessage(), PHP_EOL;
}
?&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I get this error when running above code.&lt;BR /&gt;&lt;BR /&gt; ( Please Note :&amp;nbsp;Customer ID was&amp;nbsp;changed for the&amp;nbsp;forum )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;CustomersApi-&amp;gt;createCustomerCard: [HTTP/1.1 404 Not Found] {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"NOT_FOUND","detail":"Customer with ID `CBASEHQSDFSFFxCrEgAQ` not found."}]} &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;There are no example of adding a card to a customer id in&amp;nbsp;PHP and this page might help someone else using the language on the page:&lt;BR /&gt;&lt;A href="https://docs.connect.squareup.com/articles/processing-recurring-payments-ruby?q=add%20card" target="_blank"&gt;https://docs.connect.squareup.com/articles/processing-recurring-payments-ruby?q=add%20card&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt; But it does not help php developers and I dislike shooting in the dark.&lt;BR /&gt;&lt;BR /&gt;I've been working on this issue every day for about two weeks. &lt;BR /&gt;&lt;BR /&gt;Can you offer a url with an example in PHP to add a card to a customer?&lt;BR /&gt;Is the above code correct? &lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 22:40:24 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/77911#M44512</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-13T22:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78449#M44513</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/101342"&gt;@LocalAK&lt;/a&gt;, sorry for the delayed response. Chad and I checked in with our API Team and they took another look. As far as they can tell, it appears that you're not including the underscore&amp;nbsp;"_". You should be able to see the customer by including the underscore&amp;nbsp;"_". Hope this clears things up!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 22:02:43 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78449#M44513</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-18T22:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78661#M44514</link>
      <description>&lt;P&gt;[SOLVED]... then not solved.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Hey Tom, &lt;BR /&gt; &lt;BR /&gt; Thanks for your patience.&lt;/P&gt;
&lt;P&gt;So, if the customer id needs an underscore. That was part of the problem.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I had this for the customer id :&lt;/P&gt;
&lt;PRE&gt;$customerId = preg_replace('/[^\w]/', '', $squareOutput);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With "\w", I was thinking it was leaving the underscores alone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was missing a "-" after "w" in preg_replace. The line should have read :&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$customerId = preg_replace('/[^\w-]/', '', $squareOutput); &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With that changed. IT WORKED! Once. &lt;BR /&gt;Square does not give underscores every time and errors when it doesn't.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;When&amp;nbsp;this solution was pointed out, I thought it was because of my edits for this&amp;nbsp;forum.&amp;nbsp;&amp;nbsp;Special thanks &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/34011"&gt;@Chad&lt;/a&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt; Many Thanks To &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/97"&gt;@Tom&lt;/a&gt;, &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/34011"&gt;@Chad&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/107"&gt;@Helen&lt;/a&gt;, thanks Team!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thanks @Square!&lt;BR /&gt;&lt;BR /&gt;I'll be processing cards&amp;nbsp;after....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 04:32:16 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78661#M44514</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-20T04:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78667#M44515</link>
      <description>&lt;P&gt;False Hope.&lt;BR /&gt; &lt;BR /&gt; After the problem was "fixed", an hour or so later I noticed&amp;nbsp;the underscores are not always provided by square.&amp;nbsp;Hyphens and underscores are random in customer ids.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some customer id's don't have any at all. I was happy this problem was solved, but it wasn't. Is&amp;nbsp;this normal?&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt; What am I doing wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I now getting these two errors randomly : &lt;BR /&gt; &lt;BR /&gt; Exception when calling CustomersApi-&amp;gt;createCustomerCard: [HTTP/1.1 301 Moved Permanently]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AND&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Exception when calling CustomersApi-&amp;gt;createCustomerCard: [HTTP/1.1 400 Bad Request] {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"BAD_REQUEST","detail":"The postal code in billing address doesn't match the one used for card nonce creation."}]}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have deleted the customer id and started over many times, with the same customer info every time. Same two errors randomly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to check sandbox customer info &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/97"&gt;@Tom&lt;/a&gt;?&lt;BR /&gt;&lt;BR /&gt;It says my postal code does not match, but I typed them the same many times. &lt;BR /&gt;Any thoughts?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 19:51:56 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78667#M44515</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-23T19:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78744#M44516</link>
      <description>&lt;P&gt;Oh no &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/101342"&gt;@LocalAK&lt;/a&gt;!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I'm sorry to hear about the trouble I'm kind of at my whits end for this issue. I recommend reaching out to our &lt;A href="https://squareup.com/help/us/en/contact" target="_blank"&gt;API Support Team&lt;/A&gt;, they will be able to take a closer look into this. We can only help so much on the Seller Community since we don't have access to your account.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 21:55:48 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78744#M44516</guid>
      <dc:creator>Chad</dc:creator>
      <dc:date>2018-04-20T21:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: createCustomerCard: Customer with ID not found</title>
      <link>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78889#M44517</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/34011"&gt;@Chad&lt;/a&gt;, I'll do that.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Apr 2018 08:13:29 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Archived-Discussions-Read-Only/createCustomerCard-Customer-with-ID-not-found/m-p/78889#M44517</guid>
      <dc:creator>LocalAK</dc:creator>
      <dc:date>2018-04-22T08:13:29Z</dc:date>
    </item>
  </channel>
</rss>

