Skip to main content

Overview

Use product endpoints to:
  • fetch full product details for a productId
  • fetch offers (price + seller + shipping) before checkout

Authentication

Requires x-commerce-api-key.

Request

Endpoints:
  • GET /api/commerce/products/{productId}
  • GET /api/commerce/products/{productId}/offers
Example (offers):
BASE_URL=${PEPAY_API_URL}

curl "$BASE_URL/api/commerce/products/B08N5WRWNW/offers" \
  -H "x-commerce-api-key: ck_..."

Response

Representative offers response:
{
  "success": true,
  "data": {
    "productId": "B08N5WRWNW",
    "retailer": "amazon",
    "offers": [
      {
        "offerId": "offer_123",
        "sellerId": "ATVPDKIKX0DER",
        "sellerName": "Amazon.com",
        "price": 99.99,
        "shipping": 0,
        "totalCost": 99.99,
        "prime": true,
        "primeOnly": false,
        "condition": "New",
        "handlingDays": { "min": 0, "max": 2 },
        "international": false,
        "available": true
      }
    ]
  },
  "meta": { "timestamp": "2025-12-21T12:34:56.000Z" }
}

Errors

  • 401 missing/invalid commerce API key
  • 404 product not found

Examples

Use product offers to confirm pricing before you generate a Checkout invoice. Next: Checkout