<?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 service charges with checkout api in Payments Troubleshooting</title>
    <link>https://community.squareup.com/t5/Payments-Troubleshooting/service-charges-with-checkout-api/m-p/206500#M62180</link>
    <description>&lt;P&gt;hi -- I'm using checkout api and wanted to add shipping charges, but see an old post that it needed to be a line item.&amp;nbsp; I tried instead to make it a service charge, but despite appearing in the debug logging I was doing (and early errors due to bad input data), the generated checkout page never showed the service charge.&amp;nbsp; am I doing something wrong?&amp;nbsp; here's a snippet from my php code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping = new \SquareConnect\Model\OrderServiceCharge();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setName($shipping_details['name']);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_money = new \SquareConnect\Model\Money();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_money-&amp;gt;setAmount($shipping_details['cost'] * 100);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_money-&amp;gt;setCurrency("CAD");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setAmountMoney($shipping_money);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setCalculationPhase("SUBTOTAL_PHASE");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setTaxable(true);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_tax = new \SquareConnect\Model\OrderLineItemAppliedTax();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_tax-&amp;gt;setTaxUid($taxUid);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setAppliedTaxes([$shipping_tax]);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order-&amp;gt;setServiceCharges([$order_shipping]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 21 Sep 2025 17:19:13 GMT</pubDate>
    <dc:creator>rrrecords</dc:creator>
    <dc:date>2025-09-21T17:19:13Z</dc:date>
    <item>
      <title>service charges with checkout api</title>
      <link>https://community.squareup.com/t5/Payments-Troubleshooting/service-charges-with-checkout-api/m-p/206500#M62180</link>
      <description>&lt;P&gt;hi -- I'm using checkout api and wanted to add shipping charges, but see an old post that it needed to be a line item.&amp;nbsp; I tried instead to make it a service charge, but despite appearing in the debug logging I was doing (and early errors due to bad input data), the generated checkout page never showed the service charge.&amp;nbsp; am I doing something wrong?&amp;nbsp; here's a snippet from my php code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping = new \SquareConnect\Model\OrderServiceCharge();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setName($shipping_details['name']);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_money = new \SquareConnect\Model\Money();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_money-&amp;gt;setAmount($shipping_details['cost'] * 100);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_money-&amp;gt;setCurrency("CAD");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setAmountMoney($shipping_money);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setCalculationPhase("SUBTOTAL_PHASE");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setTaxable(true);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_tax = new \SquareConnect\Model\OrderLineItemAppliedTax();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $shipping_tax-&amp;gt;setTaxUid($taxUid);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order_shipping-&amp;gt;setAppliedTaxes([$shipping_tax]);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $order-&amp;gt;setServiceCharges([$order_shipping]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Sep 2025 17:19:13 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Payments-Troubleshooting/service-charges-with-checkout-api/m-p/206500#M62180</guid>
      <dc:creator>rrrecords</dc:creator>
      <dc:date>2025-09-21T17:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: service charges with checkout api</title>
      <link>https://community.squareup.com/t5/Payments-Troubleshooting/service-charges-with-checkout-api/m-p/207407#M62181</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.squareup.com/t5/user/viewprofilepage/user-id/321463"&gt;@rrrecords&lt;/a&gt; and welcome to the Community!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I checked in with our API team and unfortunately, service charges won't show as line items with the Checkout API.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;They will be added to the total but won't show in the checkout itemization that the customer sees.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 11:57:36 GMT</pubDate>
      <guid>https://community.squareup.com/t5/Payments-Troubleshooting/service-charges-with-checkout-api/m-p/207407#M62181</guid>
      <dc:creator>ashc</dc:creator>
      <dc:date>2020-10-02T11:57:36Z</dc:date>
    </item>
  </channel>
</rss>

