Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-alpha.pepay.io/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Search returns product results you can use to build discovery and browsing experiences. Results typically include enough metadata to render a product card (title, image, price) and a productId you can use for product details and checkout flows.

Authentication

Requires x-commerce-api-key.

Request

Endpoint:
  • GET /api/commerce/search
Playground (interactive reference): Example:
BASE_URL=${PEPAY_API_URL}

curl "$BASE_URL/api/commerce/search?q=headphones&limit=10" \
  -H "x-commerce-api-key: ck_live_..."

Response

{
  "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 auth

Examples

Next: Checkout