Pointbasin Agentic Commerce API

Build agentic shopping into your mobile app.

The same backend that powers ChatGPT, Google AI Mode, Copilot and Pointbasin's native concierge, exposed as a clean REST + SSE API. Browse the catalog, stream the shopping agent, and place orders on the user's behalf.

Demo API key
payvory_demo_key

Send as x-payvory-key header.

Base URL
(loading)/api/v1

CORS open. iOS, Android, React Native, web all work.

OpenAPI spec
/api/v1/openapi.json

Generate iOS/Android clients with openapi-generator.

1. List products

bash
curl -H "x-payvory-key: payvory_demo_key" \
  https://your-app.lovable.app/api/v1/products?q=backpack&limit=5

2. Stream the shopping agent (SSE)

POST a user message; the response is text/event-stream with JSON events: token, tool_call, tool_result, done, error.

bash
curl -N -X POST https://your-app.lovable.app/api/v1/agent/chat \
  -H "Content-Type: application/json" \
  -H "x-payvory-key: payvory_demo_key" \
  -d '{ "message": "Find me an ultralight tent" }'
Live SSE playground
Response will stream here…

3. Place an order on behalf of the user

Returns a deep_link (payvory://order/<id>) and a web fallback web_url for mobile handoff.

bash
curl -X POST https://your-app.lovable.app/api/v1/orders \
  -H "Content-Type: application/json" \
  -H "x-payvory-key: payvory_demo_key" \
  -d '{
    "items": [{ "product_id": "<uuid>", "quantity": 1 }],
    "customer_name": "Isaac",
    "agent_surface": "mobile"
  }'

Manage your API keys

Create, rotate, or revoke keys. Send the value as the x-payvory-key header.

Loading…

Mobile snippets

swift
// iOS (Swift) — call the Pointbasin API
let url = URL(string: "https://your-app.lovable.app/api/v1/products?q=backpack")!
var req = URLRequest(url: url)
req.setValue("payvory_demo_key", forHTTPHeaderField: "x-payvory-key")
let (data, _) = try await URLSession.shared.data(for: req)
let json = try JSONSerialization.jsonObject(with: data)
kotlin
// Android (Kotlin) — stream the Pointbasin agent
val client = OkHttpClient()
val req = Request.Builder()
  .url("https://your-app.lovable.app/api/v1/agent/chat")
  .header("x-payvory-key", "payvory_demo_key")
  .post("""{"message":"Find me wireless earbuds under \$300"}"""
    .toRequestBody("application/json".toMediaType()))
  .build()
client.newCall(req).execute().use { res ->
  res.body?.source()?.use { src ->
    while (!src.exhausted()) println(src.readUtf8Line())
  }
}
ts
// React Native — stream tokens from /api/v1/agent/chat
const res = await fetch(`${BASE}/api/v1/agent/chat`, {
  method: "POST",
  headers: { "Content-Type": "application/json", "x-payvory-key": "payvory_demo_key" },
  body: JSON.stringify({ message: "Find me a desk lamp" }),
});
const reader = res.body!.pipeThrough(new TextDecoderStream()).getReader();
while (true) {
  const { value, done } = await reader.read();
  if (done) break;
  // value contains "data: { ... }\n\n" SSE frames
}