Skip to main content

Overview

Search is the entrypoint for “browse → merchant cart → checkout” flows. Results are safe to render in product UIs.

Authentication

Requires x-commerce-api-key.

Request

const results = await pepay.commerce.search({
  q: 'headphones',
  limit: 10
});

Response

Example response (truncated):
{
  "success": true,
  "data": {
    "products": [
      {
        "productId": "B000NPYY04",
        "title": "Wireless Headphones",
        "price": 129.99,
        "image": "https://images.example.com/product.png"
      }
    ]
  }
}

Errors

  • 400 invalid search parameters
  • 401 missing/invalid commerce API key

Examples

  • Use limit and narrow queries to keep product UIs fast and predictable. Next: Merchant carts