<?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: Issue trying to use PaymentLinks API to create subscriptions from a website in Payments Troubleshooting</title>
    <link>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-trying-to-use-PaymentLinks-API-to-create-subscriptions/m-p/825689#M65440</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/750897"&gt;@JeffSmith&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this question is API related, I recommend that you post it in our &lt;A href="https://developer.squareup.com/forums/" target="_blank"&gt;Developer Forums&lt;/A&gt;. I am confident you will find the right audience to assist with this issue there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're more than welcome to leave this post here in case any of our Sellers have experience with the Payment Links API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you have any other questions!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Nov 2025 00:28:44 GMT</pubDate>
    <dc:creator>JJ_</dc:creator>
    <dc:date>2025-11-19T00:28:44Z</dc:date>
    <item>
      <title>Issue trying to use PaymentLinks API to create subscriptions from a website</title>
      <link>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-trying-to-use-PaymentLinks-API-to-create-subscriptions/m-p/825391#M65364</link>
      <description>&lt;DIV class=""&gt;Created a paymentlink via API for a subscription.&lt;/DIV&gt;&lt;DIV class=""&gt;Got link.&lt;/DIV&gt;&lt;DIV class=""&gt;Redirected user to the URL&lt;/DIV&gt;&lt;DIV class=""&gt;Filled in / paid for it ($1 test subscription since sandbox sucks and can't test in sandbox)&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Square Support has told me multiple times that I probably have invalid card data.&amp;nbsp; It's the right card, it works, I even get the preauth approval notices from my bank.&lt;/DIV&gt;&lt;DIV class=""&gt;If I do the subscription manually through the square dashboard, it works and goes through with the same exact card.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;So user gets this message on the screen:&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffSmith_0-1763324025994.png" style="width: 400px;"&gt;&lt;img src="https://community.squareup.com/t5/image/serverpage/image-id/53838iF648A4765EBA449B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffSmith_0-1763324025994.png" alt="JeffSmith_0-1763324025994.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;SPAN&gt;"Sorry.&amp;nbsp; Your order didn't go through.&amp;nbsp; Please try again".&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;Trying again doesn't work.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;In Chrome developer tools, I can see this error appearing:&lt;/DIV&gt;&lt;DIV class=""&gt;Failed to load resource:&amp;nbsp; the&amp;nbsp; &amp;lt;url here&amp;gt; server responded with a status of 422&lt;/DIV&gt;&lt;DIV class=""&gt;Full URL:&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;A class="" title="https://checkout.square.site/api/soc-platform/merchant/MLSPSW5W3D426/location/LT4VF416JF6EP/order/i2yKSGUgmtIhTVoVN1EfwNSzLSZZY/subscribe" href="https://checkout.square.site/api/soc-platform/merchant/MLSPSW5W3D426/location/LT4VF416JF6EP/order/i2yKSGUgmtIhTVoVN1EfwNSzLSZZY/subscribe" target="_blank" rel="noopener"&gt;https://checkout.square.site/api/soc-platform/merchant/&amp;lt;removed&amp;gt;/location/&amp;lt;removed&amp;gt;/order/&amp;lt;removed&amp;gt;/subscribe&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffSmith_1-1763324025995.png" style="width: 400px;"&gt;&lt;img src="https://community.squareup.com/t5/image/serverpage/image-id/53839iF236E5E02E842AB3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffSmith_1-1763324025995.png" alt="JeffSmith_1-1763324025995.png" /&gt;&lt;/span&gt;&lt;P&gt;Again - note that I am not calling that endpoint, I've redirected the user to the paymentlink URL, so this is all hosted/happening on Square's servers at this point.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Digging further into it, it appears to be getting this response from the subscribe endpoint.&amp;nbsp; This is the CHECKOUT page calling this and generating this error, so I have no idea what I did wrong to get this to not work right....&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;{&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; "error": "Client error: `POST https:\/\/connect.squareup.com\/v2\/subscriptions` resulted in a `400 Bad Request` response:\n{\"errors\": [{\"code\": \"CONFLICTING_PARAMETERS\",\"detail\": \"Phases with RELATIVE pricing type must have phases on the subsc (truncated...)\n"&lt;/DIV&gt;&lt;DIV class=""&gt;}&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Can anyone explain what RELATIVE pricing type and phases on the subscription is?&amp;nbsp; The subscription plan works fine when I manually create a subscription through the website, so what am I supposed to pass into the payment link API to create a checkout for the subscription?&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Yes, I'm sure the itemvariationcatalogid variable is set properly.&lt;/DIV&gt;&lt;DIV class=""&gt;price variable is 1 ($1 for a testing since we have to test this in production since the sandbox sucks and can't do this)&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;.NET Code:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create Order Lines&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var lineItem = new OrderLineItem&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Quantity = "1",&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CatalogObjectId = itemvariationcatalogid,&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BasePriceMoney = new Money { Amount = (long)price * 100, Currency = square.SquareCurrency }&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var lineItems = new List&amp;lt;OrderLineItem&amp;gt;();&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lineItems.Add(lineItem);&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create Order&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var orderMetadata = new Dictionary&amp;lt;string, string?&amp;gt;();&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orderMetadata.Add("UserId", vm.User.Id);&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orderMetadata.Add("UserName", vm.User.UserName);&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orderMetadata.Add("UserEmail", vm.User.Email);&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orderMetadata.Add("SubscriptionTier", vm.Tier);&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orderMetadata.Add("SubscriptionPrice", vm.Price.ToString());&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orderMetadata.Add("SubscriptionCredits", vm.Credits.ToString());&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string referenceId = System.Guid.NewGuid().ToString();&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var order = new Order&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CustomerId = squareCustomer.Id,&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LocationId = square.SquareLocationId,&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LineItems = lineItems,&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Metadata = orderMetadata,&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ReferenceId = referenceId&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create Payment Link&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string redirectUrl = String.Format("{0}://{1}/Credits/PaymentProcessed/{2}", Request.Scheme, Request.Host, referenceId);&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var paymentRequest = new CreatePaymentLinkRequest&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IdempotencyKey = squareIdempotencyKey,&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Order = order,&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CheckoutOptions = new CheckoutOptions&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SubscriptionPlanId = planccatalogid,&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RedirectUrl = redirectUrl, &amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MerchantSupportEmail = SundaySolved.Constants.kSupportEmail&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var response = await squareClient.Checkout.PaymentLinks.CreateAsync(paymentRequest);&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return Redirect(response.PaymentLink.Url);&lt;/DIV&gt;</description>
      <pubDate>Sun, 16 Nov 2025 20:19:51 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-trying-to-use-PaymentLinks-API-to-create-subscriptions/m-p/825391#M65364</guid>
      <dc:creator>JeffSmith</dc:creator>
      <dc:date>2025-11-16T20:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Issue trying to use PaymentLinks API to create subscriptions from a website</title>
      <link>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-trying-to-use-PaymentLinks-API-to-create-subscriptions/m-p/825689#M65440</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/750897"&gt;@JeffSmith&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this question is API related, I recommend that you post it in our &lt;A href="https://developer.squareup.com/forums/" target="_blank"&gt;Developer Forums&lt;/A&gt;. I am confident you will find the right audience to assist with this issue there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're more than welcome to leave this post here in case any of our Sellers have experience with the Payment Links API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you have any other questions!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 00:28:44 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Payments-Troubleshooting/Issue-trying-to-use-PaymentLinks-API-to-create-subscriptions/m-p/825689#M65440</guid>
      <dc:creator>JJ_</dc:creator>
      <dc:date>2025-11-19T00:28:44Z</dc:date>
    </item>
  </channel>
</rss>

