DEV Community

Meena
Meena

Posted on

Cartling: one desk, one cart, one total. No more 10 tabs.

Buying two things from two stores means three tabs and none of them shows the total. The cheap one can miss the day you need it. The fast one can break the ceiling. A chat that writes its own price makes that worse. Ask it for the total and it will often invent a number that no store is charging.

Cartling is that decision, made before the payment.

You name a thing, a ceiling and a day. The cheap store and the fast store stay on the same card. Anything over the ceiling is refused. PayPal stays closed until you say yes and the amount it charges is the amount on the row.

The model does not get a price field

Grok, through the xAI API, picks a store that is already on the card and writes one sentence.

The tools take a product and a store, or a Channel3 id. They have no price field. A dollar amount that is not already on a row is dropped. The server fills the PayPal amount from that row and checks the ceiling before the order can be created.

The model is not asked to behave. The number is not available to it.

PayPal only sees the server total

Checkout is PayPal Orders v2 in the sandbox.

Cartling creates the order. A sandbox buyer approves it. Cartling captures it, then reads the captured amount back. The id on the receipt is the id PayPal returned. A later question about the order asks PayPal again and a refund goes back through the same order. The webhook asks PayPal for the order before it changes a status. It does not trust the amount in the body.

No real PayPal account is used and no real money moves.

Two ways to find the thing

BudgetBuy, GadgetHub and TechStore are a sample aisle. The server owns those prices and each row has a handoff day. That is what makes a day and a ceiling repeatable. A live merchant page is a price, not a day you can count on.

If you name a brand or a model, or you ask for something that is not in the aisle, the search goes to Channel3. Those cards are live merchants. PayPal charges the price printed on the button you press.

Use the aisle when the day matters. Use Channel3 when the item is not in the file.

Try it

The desk is at https://cartling.onrender.com

The code is at https://github.com/meenanoolu/Cartling

Start with earbuds and a cable in 3 days under 80. Then ask for a keyboard.

Top comments (0)