> ## 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.

# Get detailed product information

> Retrieve comprehensive details for a specific product including full description,
specifications, images, pricing, availability, and customer reviews.

This endpoint provides more detailed information than the search results.




## OpenAPI

````yaml /api-reference/openapi.json get /api/commerce/products/{productId}
openapi: 3.0.0
info:
  title: Pepay API (SDK-scoped)
  version: 1.0.0
  description: API documentation for Pepay API
servers:
  - url: https://api-beta.pepay.io
    description: Beta server
  - url: http://localhost:3000
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Events
    description: Events API (history + debugging) for canonical notification envelopes.
  - name: Metrics
    description: Internal Prometheus metrics (restricted).
  - name: WebSockets
    description: WebSocket streams (upgrade endpoints) and message schemas.
  - name: Commerce - Devnet Simulator
    description: >
      Deterministic devnet-only endpoints for simulating Commerce V2 order state
      transitions.


      Use this when integrating as a merchant on devnet to test your backend/UI
      against realistic order lifecycle changes

      (payment confirmation, settlement gating, placement, tracking,
      cancellation, refunds) without placing real retailer

      orders or sending real on-chain refunds.


      How it works:

      - Requires a devnet `X-Commerce-Api-Key` (merchant-scoped).

      - Only operates on orders created in `networkEnvironment=devnet`.

      - Updates the order using the same reducer/persistence paths used in
      mainnet (provider snapshots are simulated).

      - After each simulation, Pepay emits the normal `commerce.order.updated`
      merchant webhook event.
  - name: Merchant Checkout
    description: >
      Merchant-scoped **three-step** checkout flow:

      1) `POST /api/commerce/merchant/checkout/estimate` — validate items
      against current eligible offers and return `validItems[]` +
      `invalidItems[]`.

      2) `POST /api/commerce/merchant/checkout/address` — attach and validate a
      shipping address for the estimate.

      3) `POST /api/commerce/merchant/checkout/invoice` — create the final
      invoice + commerce order.


      Cart behavior (when `useCart: true`):

      - The estimate call **reads** the saved cart but does **not** remove or
      modify cart items.

      - Items with no eligible offers are returned in `invalidItems[]`.

      - To remove items from the saved cart, call the Merchant Cart APIs (`PUT
      /api/commerce/merchant/carts/items/:itemId` with `quantity: 0`, or `DELETE
      /api/commerce/merchant/carts/items/:itemId`).

      - To exclude items for *this checkout attempt* without mutating the cart,
      use `itemOverrides[]` with `quantity: 0`.
  - name: Payment Sessions
    description: >
      Payor-facing APIs used by the hosted payment page and other embedded
      checkout clients.


      Canonical base path:

      - All documented endpoints are under `/api/v1/payments/*`.


      Authentication:

      - These endpoints do **not** accept merchant API keys or bearer JWTs.

      - Send `x-session-token` and `x-signature` headers on every request (both
      are returned when creating an invoice).


      Typical flow:

      1) Create an invoice (`POST /api/v1/invoices`) → receive `payment_url`,
      `session_token`, `signature`.

      2) Render/open the `payment_url` for the payor.

      3) Fetch invoice context (`GET /api/v1/payments/session-details`).

      4) List supported tokens (`GET /api/v1/payments/available-tokens`).

      5) Allocate a payment address (`POST /api/v1/payments/payment-addresses`)
      → use `ws_connection` for `/ws/payment`.

      6) Track progress via polling (`GET /api/v1/payments/payment-status`)
      and/or websocket (`/ws/payment`).


      Security notes:

      - Treat `session_token` and `signature` as sensitive values (anyone with
      them can read the invoice/payment status).

      - Do not store them in long-lived browser storage; prefer in-memory usage
      on the payment page.
  - name: Quotes
    description: Token settlement quotes and rate calculations
  - name: Webhooks
    description: >
      Webhook endpoint management and delivery history for canonical
      notifications.


      Delivery model:

      - At-least-once delivery; receivers must dedupe by `event.id` (also sent
      as `X-Pepay-Event-ID`).

      - Payloads are canonical `PepayEvent` objects and match websocket
      `event_v1` frames for the same event type.


      Security:

      - Endpoints must be HTTPS.

      - Deliveries are signed using `HMAC_SHA256("${timestamp_ms}.${raw_body}")`
      and sent in `X-Pepay-Signature`.
paths:
  /api/commerce/products/{productId}:
    get:
      tags:
        - Commerce - Products
      summary: Get detailed product information
      description: >
        Retrieve comprehensive details for a specific product including full
        description,

        specifications, images, pricing, availability, and customer reviews.


        This endpoint provides more detailed information than the search
        results.
      operationId: getProductDetails
      parameters:
        - name: productId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9\-_]+$
            minLength: 1
            maxLength: 100
          description: Product identifier (e.g., ASIN for Amazon)
          example: B08N5WRWNW
        - name: retailer
          in: query
          required: false
          schema:
            type: string
            enum:
              - amazon
              - walmart
            default: amazon
          description: Retailer to fetch from
      responses:
        '200':
          description: Detailed product information
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetapicommerceproductsproductIdResponse200
        '400':
          description: Bad request - Invalid product ID format
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetapicommerceproductsproductIdResponse400
        '401':
          description: Unauthorized - Missing or invalid commerce API key
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetapicommerceproductsproductIdResponse401
        '403':
          description: Forbidden - API key suspended or expired
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetapicommerceproductsproductIdResponse403
        '404':
          description: Product not found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetapicommerceproductsproductIdResponse404
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetapicommerceproductsproductIdResponse429
        '503':
          description: Service unavailable - Commerce disabled or API error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetapicommerceproductsproductIdResponse503
      security:
        - commerceApiKey: []
        - merchantApiKey: []
components:
  schemas:
    GetapicommerceproductsproductIdResponse200:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            productId:
              type: string
              description: Product identifier
              example: B00KFP6NHO
            asin:
              type: string
              description: Amazon Standard Identification Number
              example: B00KFP6NHO
            title:
              type: string
              description: Product title
              example: Nuby Garden Fresh Fruitsicle Frozen Pop Tray
            price:
              type: number
              format: decimal
              description: Current price in USD (converted from cents)
              example: 7.99
            originalPrice:
              type: number
              format: decimal
              nullable: true
              description: Original retail price before discount
              example: 8.99
            images:
              type: array
              description: All product images
              items:
                type: string
                format: uri
              example:
                - >-
                  https://images-na.ssl-images-amazon.com/images/I/61K0YbuLi-L.jpg
                - >-
                  https://images-na.ssl-images-amazon.com/images/I/81KtOn8ddTL.jpg
            mainImage:
              type: string
              format: uri
              description: Primary product image
              example: https://images-na.ssl-images-amazon.com/images/I/61K0YbuLi-L.jpg
            description:
              type: string
              description: Full product description
              example: Size:1  Nuby's Garden Fresh Fruitsicle Frozen Popsicle Tray...
            bullets:
              type: array
              description: Feature bullet points
              items:
                type: string
              example:
                - >-
                  Includes four freeze-and-feed popsicle molds with handles
                  shaped perfectly for little hands
                - Perfect for fresh homemade puree popsicles
            productDetails:
              type: array
              description: Detailed product specifications
              items:
                type: string
              example:
                - 'Product Dimensions: 5.8 x 5.8 x 4 inches ; 7.8 ounces'
                - 'Item model number: 5438'
            brand:
              type: string
              description: Product brand
              example: Nuby
            categories:
              type: array
              description: Product category hierarchy
              items:
                type: string
              example:
                - Home & Kitchen
                - Kitchen & Dining
                - Ice Pop Molds
            rating:
              type: number
              format: decimal
              description: Average rating (numeric value from stars)
              example: 4.4
            reviewCount:
              type: integer
              description: Number of customer reviews
              example: 829
            questionCount:
              type: integer
              description: Number of customer questions
              example: 44
            variants:
              type: array
              description: All available product variants
              items:
                type: object
                properties:
                  variant_specifics:
                    type: array
                    items:
                      type: object
                      properties:
                        dimension:
                          type: string
                        value:
                          type: string
                  product_id:
                    type: string
              example:
                - variant_specifics:
                    - dimension: Size
                      value: '2'
                  product_id: B00Q3H18EQ
            variantSpecifics:
              type: array
              description: Current variant specifications
              items:
                type: object
              example:
                - dimension: Size
                  value: '1'
            dimensions:
              type: object
              description: Package dimensions
              properties:
                weight:
                  type: object
                  properties:
                    amount:
                      type: number
                    unit:
                      type: string
                size:
                  type: object
                  properties:
                    width:
                      type: object
                    depth:
                      type: object
                    length:
                      type: object
              example:
                weight:
                  amount: 8.5
                  unit: ounces
                size:
                  width:
                    amount: 4
                    unit: inches
                  depth:
                    amount: 5.8
                    unit: inches
                  length:
                    amount: 5.8
                    unit: inches
            epids:
              type: array
              description: Electronic Product IDs
              items:
                type: object
                properties:
                  type:
                    type: string
                  value:
                    type: string
              example:
                - type: UPC
                  value: '048526054381'
                - type: EAN
                  value: '0048526054381'
            epidsMap:
              type: object
              description: Map of electronic product identifiers
              example:
                MPN: '5438'
                UPC: '048526054381'
                EAN: '0048526054381'
            retailer:
              type: string
              description: Retailer name
              example: amazon
            shipPrice:
              type: number
              format: decimal
              description: Shipping price in USD
              example: 0
            fresh:
              type: boolean
              description: Whether data is recently updated
              example: false
            pantry:
              type: boolean
              description: Amazon Pantry product
              example: false
            handmade:
              type: boolean
              description: Handmade product
              example: false
            digital:
              type: boolean
              description: Digital product
              example: false
            buyapiHint:
              type: boolean
              description: Buy API hint flag
              example: true
            availability:
              type: string
              enum:
                - available
                - unavailable
              description: Availability status based on API response
              example: available
            numSales:
              type: integer
              description: Estimated number of sales
              example: 10000
            numOffers:
              type: integer
              description: Number of available offers
              example: 10
            giftCard:
              type: boolean
              description: Whether this is a gift card product
              example: false
            addon:
              type: boolean
              description: Whether this is an add-on item
              example: false
            parentAsin:
              type: string
              nullable: true
              description: Parent ASIN for variant products
              example: B0DGLW52K5
            customizable:
              type: boolean
              description: Whether product is customizable
              example: false
            digitalSubscription:
              type: boolean
              description: Whether this is a digital subscription
              example: false
            blankBox:
              type: boolean
              description: Whether product ships in blank box
              example: false
        meta:
          type: object
          properties:
            timestamp:
              type: integer
              example: 1738240496
    GetapicommerceproductsproductIdResponse400:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - VALIDATION_ERROR
              example: VALIDATION_ERROR
            message:
              type: string
              example: Invalid request parameters
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: productId
                  message:
                    type: string
                    example: Invalid product ID format
    GetapicommerceproductsproductIdResponse401:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - COMMERCE_API_KEY_MISSING
                - INVALID_COMMERCE_API_KEY
              example: COMMERCE_API_KEY_MISSING
            message:
              type: string
              example: Commerce API key required
    GetapicommerceproductsproductIdResponse403:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - COMMERCE_API_KEY_SUSPENDED
                - COMMERCE_API_KEY_EXPIRED
              example: COMMERCE_API_KEY_SUSPENDED
            message:
              type: string
              example: Commerce API key suspended
    GetapicommerceproductsproductIdResponse404:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - PRODUCT_NOT_FOUND
              example: PRODUCT_NOT_FOUND
            message:
              type: string
              example: Product not found
    GetapicommerceproductsproductIdResponse429:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - RATE_LIMIT_EXCEEDED
              example: RATE_LIMIT_EXCEEDED
            message:
              type: string
              example: Too many product requests. Please wait before trying again.
            retryAfter:
              type: integer
              description: Seconds to wait before retrying
              example: 60
    GetapicommerceproductsproductIdResponse503:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - COMMERCE_DISABLED
                - COMMERCE_API_ERROR
              example: COMMERCE_API_ERROR
            message:
              type: string
              example: Unable to retrieve product details
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for wallet authentication
    commerceApiKey:
      type: apiKey
      in: header
      name: x-commerce-api-key
      description: >-
        Legacy alias for commerce-scoped API keys. Prefer `x-api-key` with
        scope=commerce.
    merchantApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for server-to-server operations (scope=merchant or commerce)

````