Chai PointDemo store
Pay with your email

Tea worth waiting for the kettle.

Small-batch tea and clay cups from Mumbai. There's no wallet to install and nothing to set up.

Masala chai blend

Assam leaf, cardamom and clove. 250 g tin.

1.50 USDT

Clay kulhad cups

Hand-thrown in Khurja. Set of 6.

2.50 USDT

Ginger tulsi tea

Whole-leaf and caffeine free. 50 tea bags.

1.25 USDT

How this store takes payment

Chai Point is a separate website that installed @akhr2405/settle-pay. These 22 lines take a payment, and 6 more get it told by webhook. They are read from its own source files when the site is built. Every order lands in the merchant's Settle dashboard, where it can be refunded and exported.

AI agents shop here too. The last 7 lines let an agent buy with no account and no API key, paying over x402. It can read the catalog at /api/agent/catalog.

Your keys, on your serverlib/settle.ts
import Settle from "@akhr2405/settle-pay";

export const settle = () =>
  new Settle({
    keyId: process.env.SETTLE_KEY_ID as string,
    keySecret: process.env.SETTLE_KEY_SECRET as string,
    businessName: "Chai Point",
  });
Create the orderapp/api/orders/route.ts
const order = await settle().orders.create({
  amount: item.price,
  description: item.name,
  receipt: `chai-${Date.now()}`,
  callbackUrl: new URL("/thanks", request.url).href,
});
return Response.json({ id: order.id });
Load checkoutapp/layout.tsx
<Script src={`${process.env.SETTLE_BASE_URL}/checkout.js`} />
Open checkout from the Buy buttoncomponents/buy-button.tsx
new window.Settle.Checkout({
  orderId: () => createOrder(product),
  handler: (response: Record<string, string>) =>
    router.push(`/thanks?${new URLSearchParams(response)}`),
  onError: () => setProblem("We couldn't start your order. Try again."),
}).open();
Verify the payment before confirmingapp/thanks/page.tsx
const payment = await settle().payments.verify(response).catch(() => null);
Optional: get told by webhookapp/api/webhooks/settle/route.ts
const event = settle().webhooks.verify(
  await request.text(),
  request.headers.get("x-settle-signature"),
  process.env.SETTLE_WEBHOOK_SECRET,
);
if (event.type === "order.paid") console.log("Ship order", event.data.receipt);
Sell to AI agents over x402app/api/agent/buy/route.ts
const sale = await settle().agents.charge(request, {
  amount: (Number(item.price) * quantity).toFixed(2),
  description: `${quantity} x ${item.name}`,
  receipt: `chai-${requestId}`,
});
if (!sale.paid) return sale.response;
return sale.respond({ order: sale.receipt, proof: sale.proofUrl });