<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Giorgi Kakabadze</title>
    <description>The latest articles on DEV Community by Giorgi Kakabadze (@trongio).</description>
    <link>https://dev.to/trongio</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4259026%2F4b072d5a-ae31-4b75-bb6a-2c0edd844c27.jpg</url>
      <title>DEV Community: Giorgi Kakabadze</title>
      <link>https://dev.to/trongio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/trongio"/>
    <language>en</language>
    <item>
      <title>Accepting TBC, Bank of Georgia and Flitt card payments in Laravel</title>
      <dc:creator>Giorgi Kakabadze</dc:creator>
      <pubDate>Sun, 22 Nov 2026 18:51:37 +0000</pubDate>
      <link>https://dev.to/trongio/accepting-tbc-bank-of-georgia-and-flitt-card-payments-in-laravel-1i51</link>
      <guid>https://dev.to/trongio/accepting-tbc-bank-of-georgia-and-flitt-card-payments-in-laravel-1i51</guid>
      <description>&lt;p&gt;A Laravel store in Georgia usually takes cards through a bank or provider's &lt;strong&gt;hosted payment page&lt;/strong&gt;: TBC Bank (TBC Checkout, its API is called tpay), Bank of Georgia (BOG Payments) or Flitt. Your shop creates a payment, sends the shopper to the provider's page and learns the result afterwards. Card numbers never touch your server.&lt;/p&gt;

&lt;p&gt;The redirect is the easy part. The hard part is marking an order paid exactly when the money really arrived, and never twice. This post walks through how I handle that, using Tetri, the Laravel package I wrote for these three providers. The principles hold whether you use it or write your own integration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Honest status first.&lt;/strong&gt; Tetri's TBC, BOG and Flitt drivers are tested against each provider's documented API and against local stub banks. Live production payments have not yet run through it. Every buyer gets personal setup help from me for their first live payments.&lt;/p&gt;

&lt;h2&gt;
  
  
  The redirect flow
&lt;/h2&gt;

&lt;p&gt;Five steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The shopper clicks Pay. Your app records a payment attempt &lt;strong&gt;before&lt;/strong&gt; calling the bank, so nothing the bank sends later can arrive for a payment you have no record of.&lt;/li&gt;
&lt;li&gt;Your app asks the provider to create a payment and gets back the URL of its payment page.&lt;/li&gt;
&lt;li&gt;You redirect the shopper there. They pay with a card, Apple Pay or Google Pay.&lt;/li&gt;
&lt;li&gt;The provider posts a callback to your server and sends the shopper back to your site.&lt;/li&gt;
&lt;li&gt;Your app confirms the payment with the provider and marks the order paid, once.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Guard against double clicks: a second click should reuse the page that is already open, and an order that is already paid should not open a new one. With Tetri the first half is one call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Hackerman&lt;/span&gt;\&lt;span class="nc"&gt;Tetri&lt;/span&gt;\&lt;span class="nc"&gt;Facades&lt;/span&gt;\&lt;span class="nc"&gt;Tetri&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;pay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Tetri&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;returnUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'orders.show'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'bank'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// 'tbc', 'bog', 'flitt'; null uses TETRI_DRIVER&lt;/span&gt;
        &lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;app&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getLocale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;// the bank page language (ka, en; Flitt also ru)&lt;/span&gt;
        &lt;span class="n"&gt;shopperIp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;expiresInMinutes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;              &lt;span class="c1"&gt;// optional: how long the bank page stays payable&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$result&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;alreadyPaid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'orders.show'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;successful&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;back&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;withErrors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'payment'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// translated, en and ka included&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;toRedirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 303 to the bank page&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your &lt;code&gt;Order&lt;/code&gt; tells Tetri what to charge by implementing &lt;code&gt;Payable&lt;/code&gt;. Amounts are integers in minor units (tetri), never floats: 123.45 GEL is &lt;code&gt;12345&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Model&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="nc"&gt;Payable&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;IsPayable&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;payableReference&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;'#'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;   &lt;span class="c1"&gt;// shown on the bank page&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;payableAmountMinor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;total_minor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;   &lt;span class="c1"&gt;// 123.45 GEL = 12345&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;payableCurrency&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;'GEL'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Callbacks are hints, not the truth
&lt;/h2&gt;

&lt;p&gt;The callback is the server-to-server notification from the provider. It is how your store learns about a payment even when the shopper closes the tab. But it arrives at a public URL, and anyone can post to a public URL. Three rules keep it safe:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verify signatures where the provider signs.&lt;/strong&gt; BOG signs callbacks with RSA: SHA256withRSA over the &lt;strong&gt;raw request body&lt;/strong&gt;, checked against BOG's published public key. Verify against the raw bytes, not a re-encoded array, or the check fails. Flitt signs its callbacks with your payment key. TBC's callbacks are not signed and only name a payment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask the provider anyway.&lt;/strong&gt; Even a valid signature only tells you something happened. Before recording anything, read the payment's status back from the provider's API. For TBC, that read-back is the only check there is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process each outcome exactly once.&lt;/strong&gt; Providers may resend the same callback, and a callback and the shopper's return can land together. Use a lock, and only ever move the status forward.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The callback route must sit outside Laravel's &lt;code&gt;web&lt;/code&gt; middleware group, because the bank has no session and no CSRF token. Tetri registers its routes there and sends their URLs, built on &lt;code&gt;APP_URL&lt;/code&gt;, with every payment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="no"&gt;POST&lt;/span&gt;     &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tetri&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;callback&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;   &lt;span class="c1"&gt;# /tetri/callback/tbc, /bog, /flitt&lt;/span&gt;
&lt;span class="no"&gt;GET&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="no"&gt;POST&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tetri&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;    &lt;span class="c1"&gt;# where the bank sends the shopper back (Flitt uses a POST)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;BOG may rotate its signing key. If it does, paste the new PEM into &lt;code&gt;TETRI_BOG_CALLBACK_PUBLIC_KEY&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When a payment is confirmed, your code hears about it through an outcome handler (or the &lt;code&gt;PaymentSucceeded&lt;/code&gt;, &lt;code&gt;PaymentFailed&lt;/code&gt; and &lt;code&gt;PaymentRefunded&lt;/code&gt; events). Keep it idempotent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderPayments&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="nc"&gt;PaymentOutcomeHandler&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;paymentSucceeded&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Payable&lt;/span&gt; &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;PaymentAttempt&lt;/span&gt; &lt;span class="nv"&gt;$attempt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;markPaid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// your code&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;paymentFailed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Payable&lt;/span&gt; &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;PaymentAttempt&lt;/span&gt; &lt;span class="nv"&gt;$attempt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// The shopper may still pay again through a new attempt. Cancel only by your own rules.&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;paymentRefunded&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Payable&lt;/span&gt; &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;PaymentAttempt&lt;/span&gt; &lt;span class="nv"&gt;$attempt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nv"&gt;$amountMinor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;recordRefund&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$amountMinor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Status sync, not the return URL
&lt;/h2&gt;

&lt;p&gt;The shopper landing back on your site proves nothing. A return URL with &lt;code&gt;?status=success&lt;/code&gt; can be typed by hand. Your return page should read the payment state, not the query string. Tetri asks the bank before it redirects the shopper to your &lt;code&gt;$returnUrl&lt;/code&gt;, so the state is already current there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Tetri&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;state&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$state&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;isPaid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$state&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;canPay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;      &lt;span class="c1"&gt;// show a pay / try again button&lt;/span&gt;
&lt;span class="nv"&gt;$state&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;cardMask&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;      &lt;span class="c1"&gt;// e.g. 411111******1111&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Callbacks also get lost: a deploy, a timeout, a firewall. Without a safety net, a shopper who paid sees an unpaid order. So schedule a sweep, and ask the bank one last time before cancelling anything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// routes/console.php&lt;/span&gt;
&lt;span class="nc"&gt;Schedule&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;command&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'tetri:sweep'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;everyMinute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;withoutOverlapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// before you cancel an unpaid order&lt;/span&gt;
&lt;span class="nv"&gt;$state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Tetri&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;sync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nv"&gt;$state&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;isPaid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nv"&gt;$state&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;livePage&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;cancel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sweep reconciles attempts nobody checked for two minutes (a lost callback is caught here), follows refunds the bank has not settled, and checks abandoned pages for 24 hours in case a late payment comes in before closing them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Refunds and partial refunds
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nc"&gt;Tetri&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;refund&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                                   &lt;span class="c1"&gt;// everything left&lt;/span&gt;
&lt;span class="nc"&gt;Tetri&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;refund&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2_500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Damaged box'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'staff:7'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// 25.00 GEL, with a reason and who asked&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Providers accept a refund and settle it later. Until the bank confirms, treat the amount as pending and held, so the same money can never be sent back twice. Never refund more than was captured minus what was already returned, and never refund blind when the provider cannot be reached. Tetri does all three, and a refusal throws &lt;code&gt;RefundRefused&lt;/code&gt; with a staff-safe message (the bank's own words when the bank said no).&lt;/p&gt;

&lt;p&gt;Partial refunds work on all three, with caveats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TBC:&lt;/strong&gt; yes, but TBC's own rules apply (for example same-day limits), and its refusal is shown verbatim.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BOG:&lt;/strong&gt; yes for card, Apple Pay and Google Pay; other BOG methods refund in full only, and Tetri refuses before sending.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flitt:&lt;/strong&gt; yes, as a reversal per refund request. Flitt shows no reversal in flight, so a held Flitt refund is never released by time. You check the Flitt portal, then release it with &lt;code&gt;Tetri::releaseRefundHold()&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing without bank credentials
&lt;/h2&gt;

&lt;p&gt;You can build the whole integration before a bank signs anything. Each driver has a local stub: the bank's API plus a bare hosted page with Pay, Decline and Let it expire buttons.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APP_ENV=local
APP_URL=http://localhost:8000
TETRI_DRIVER=bog
TETRI_BOG_ENABLED=true
TETRI_BOG_STUB=true          # also TETRI_TBC_STUB, TETRI_FLITT_STUB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The driver calls the stub over HTTP on your own app, so the server must handle two requests at once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;PHP_CLI_SERVER_WORKERS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4 php artisan serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The stubs sign BOG callbacks with a key of their own, sign Flitt answers like Flitt, and honour BOG's &lt;code&gt;Idempotency-Key&lt;/code&gt;, so callbacks and refunds run the way they will against the bank. They answer only in &lt;code&gt;local&lt;/code&gt; and &lt;code&gt;testing&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For your test suite there is a &lt;code&gt;fake&lt;/code&gt; driver that needs no network:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Tetri&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'orders.show'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$result&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;redirectUrl&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                &lt;span class="c1"&gt;// the fake "bank page" is the return route: paid&lt;/span&gt;

&lt;span class="nc"&gt;FakeGateway&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;simulate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$attempt&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;reference&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;PaymentStatus&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nc"&gt;Failed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Going live
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;APP_ENV=production&lt;/code&gt;, an &lt;code&gt;https&lt;/code&gt; &lt;code&gt;APP_URL&lt;/code&gt;, the queue worker and the scheduler running.&lt;/li&gt;
&lt;li&gt;Real credentials in &lt;code&gt;.env&lt;/code&gt;, stub flags off.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;php artisan tetri:status&lt;/code&gt;: every driver you enabled must read &lt;code&gt;ready: yes&lt;/code&gt;. It also prints the callback URL to give a bank during onboarding.&lt;/li&gt;
&lt;li&gt;Send yourself a small real payment, refund it, and watch &lt;code&gt;PaymentSucceeded&lt;/code&gt; and &lt;code&gt;PaymentRefunded&lt;/code&gt; arrive.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of this replaces the merchant agreement. Each provider sets its own requirements and fees, and no package can sign that for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Status, again
&lt;/h2&gt;

&lt;p&gt;TBC, BOG and Flitt drivers are complete and tested against each provider's documented API and local stubs. Live production transactions have not yet run, and some behaviour is only documented, not yet observed on a live merchant account (for example the exact encoding of BOG's callback signature and TBC's partial refund rules). Tetri reads these defensively, any surprise from the first live payments gets fixed for every buyer, and every buyer gets personal help from me for their first live payments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Full guide (English): &lt;a href="https://plugins.hackerman.ge/guides/laravel-card-payments" rel="noopener noreferrer"&gt;https://plugins.hackerman.ge/guides/laravel-card-payments&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Full guide (Georgian): &lt;a href="https://plugins.hackerman.ge/ka/guides/laravel-card-payments" rel="noopener noreferrer"&gt;https://plugins.hackerman.ge/ka/guides/laravel-card-payments&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Provider pages: &lt;a href="https://plugins.hackerman.ge/tetri/tbc" rel="noopener noreferrer"&gt;TBC&lt;/a&gt;, &lt;a href="https://plugins.hackerman.ge/tetri/bog" rel="noopener noreferrer"&gt;Bank of Georgia&lt;/a&gt;, &lt;a href="https://plugins.hackerman.ge/tetri/flitt" rel="noopener noreferrer"&gt;Flitt&lt;/a&gt; (Georgian: &lt;a href="https://plugins.hackerman.ge/ka/tetri/tbc" rel="noopener noreferrer"&gt;TBC&lt;/a&gt;, &lt;a href="https://plugins.hackerman.ge/ka/tetri/bog" rel="noopener noreferrer"&gt;BOG&lt;/a&gt;, &lt;a href="https://plugins.hackerman.ge/ka/tetri/flitt" rel="noopener noreferrer"&gt;Flitt&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Pricing: &lt;a href="https://plugins.hackerman.ge/#pricing" rel="noopener noreferrer"&gt;https://plugins.hackerman.ge/#pricing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Questions: &lt;a href="mailto:support@plugins.hackerman.ge"&gt;support@plugins.hackerman.ge&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>payments</category>
      <category>georgia</category>
    </item>
    <item>
      <title>I put my Laravel store inside AI assistants. Here's what I learned (and the free package)</title>
      <dc:creator>Giorgi Kakabadze</dc:creator>
      <pubDate>Sun, 22 Nov 2026 16:18:33 +0000</pubDate>
      <link>https://dev.to/trongio/i-put-my-laravel-store-inside-ai-assistants-heres-what-i-learned-and-the-free-package-n0d</link>
      <guid>https://dev.to/trongio/i-put-my-laravel-store-inside-ai-assistants-heres-what-i-learned-and-the-free-package-n0d</guid>
      <description>&lt;p&gt;Shoppers have started asking AI assistants what to buy. "I need four outdoor cameras for a small shop, around 1500 lari." The assistant answers something. The question is whether that answer comes from your store, with your real prices and stock, or from a guess.&lt;/p&gt;

&lt;p&gt;I run the platform behind a security-equipment store in Georgia, built on Laravel. Recently I put an MCP server on top of it, using the official &lt;a href="https://github.com/laravel/mcp" rel="noopener noreferrer"&gt;&lt;code&gt;laravel/mcp&lt;/code&gt;&lt;/a&gt; package, so an assistant can search our live catalogue, compare products and hand the shopper a cart that opens on our own site. It runs in production today.&lt;/p&gt;

&lt;p&gt;This post covers what worked, what I would do differently, and the free package I extracted from it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch it first (50 seconds)
&lt;/h2&gt;

&lt;p&gt;There's a short video on &lt;a href="https://plugins.hackerman.ge" rel="noopener noreferrer"&gt;plugins.hackerman.ge&lt;/a&gt;: a shopper asks for cameras on a budget, compares two recorders, and gets a cart on the real store.&lt;/p&gt;

&lt;p&gt;You can also point any assistant that supports remote MCP servers at a demo store I host:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://demo.plugins.hackerman.ge/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's an invented outdoor gear shop with 61 products, so you can poke at it without touching anything real.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape of it
&lt;/h2&gt;

&lt;p&gt;MCP gives an assistant a list of tools it can call. For a store, the useful ones turned out to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;search_products&lt;/code&gt;: words, model numbers, category, brand, price range, in-stock only, spec filters&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_product&lt;/code&gt;: one product as its page shows it: specs, stock, warranty, documents&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;compare_products&lt;/code&gt;: a side-by-side table&lt;/li&gt;
&lt;li&gt;cart tools: add, update, remove, view&lt;/li&gt;
&lt;li&gt;delivery options and store info (branches, hours, contacts)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cart is the interesting part. The assistant never takes payment. It builds a cart under a token, and the answer includes a link like &lt;code&gt;/cart/claim/{token}&lt;/code&gt;. The shopper clicks it, lands on your site with the cart filled, and checks out the normal way. Your checkout, your payment provider, your customer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things that mattered more than I expected
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Answer like your product page, not like your database.&lt;/strong&gt; Early versions returned raw attributes. Assistants did fine with them, but shoppers saw odd wording. Returning what a visitor would see (the formatted price with VAT, the stock line your site shows, the spec table with units) made answers match the site exactly, which builds trust when the shopper clicks through.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Never let the assistant invent a price.&lt;/strong&gt; Every product card carries the guest price from the same price resolver the storefront uses. When a product has no public price, the answer says so explicitly instead of leaving a gap the model might fill.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Keep it read-only until the cart.&lt;/strong&gt; Search and product tools can't change anything. The cart tools only write to an anonymous cart with an expiry. Nothing is ordered and no customer data leaves the store unless the shopper signs in on the site.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mapping it onto any catalogue
&lt;/h2&gt;

&lt;p&gt;The store-specific part is a contract. In the free version it's one interface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Hackerman&lt;/span&gt;\&lt;span class="nc"&gt;StorewireLite&lt;/span&gt;\&lt;span class="nc"&gt;Contracts&lt;/span&gt;\&lt;span class="nc"&gt;CatalogRepository&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;CatalogRepository&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// An id from an earlier answer, a product URL or slug, a model number or SKU.&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$reference&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$locale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// One product as its page shows it; null when a visitor may not see it.&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;product&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$locale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="nc"&gt;ProductDetail&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;SearchQuery&lt;/span&gt; &lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;SearchResult&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bind your implementation, switch it on, and the server answers &lt;code&gt;POST /mcp&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require hackerman/storewire-lite
php artisan vendor:publish --tag=storewire-lite-config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;STOREWIRE_LITE_ENABLED=true
STOREWIRE_LITE_SERVER_NAME="Your Store"
STOREWIRE_LITE_CURRENCY=USD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Test it with curl before you connect an assistant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s http://localhost:8000/mcp \
  -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; -H &lt;span class="s1"&gt;'Accept: application/json, text/event-stream'&lt;/span&gt; \
  -H &lt;span class="s1"&gt;'MCP-Protocol-Version: 2025-06-18'&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_products","arguments":{"query":"tent"}}}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It doesn't care whether you run Lunar, a custom schema or something else, as long as you can answer those three methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  Free and paid
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Storewire Lite&lt;/strong&gt; (MIT): &lt;code&gt;search_products&lt;/code&gt; and &lt;code&gt;get_product&lt;/code&gt;. &lt;a href="https://github.com/trongio/storewire-lite" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, &lt;code&gt;composer require hackerman/storewire-lite&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storewire&lt;/strong&gt;: the full set (compare, cart handoff, delivery quotes, store info, product and cart widgets for assistants that render them, an app manifest command). It's 40% off from 27 Nov to 2 Dec at &lt;a href="https://plugins.hackerman.ge" rel="noopener noreferrer"&gt;plugins.hackerman.ge&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you build shops for clients and want this set up, or need other Laravel e-commerce work, I take that on too.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd love feedback on
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;How are you exposing your catalogue to assistants today, if at all?&lt;/li&gt;
&lt;li&gt;Would you want write tools beyond the cart (wishlists, quotes), or is read-only plus cart the right line?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy to answer questions in the comments.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>mcp</category>
      <category>ecommerce</category>
    </item>
  </channel>
</rss>
