Developers Guides Product Catalog

Product Catalog

Create and manage product catalogs, products, variants, inventory levels, and analytics through the Catalog API.

Online API Products Catalog Inventory

Overview

The Product Catalog API lets you build a structured product hierarchy for your stores. You can create catalogs, add products with pricing and tax configuration, define variants (such as sizes and colours), manage stock levels, and pull sales statistics — all through a single set of REST endpoints.

This guide walks through every operation in the catalog lifecycle, from creating an empty catalog to pulling performance analytics.

Prerequisites

  • A configured store with a valid storeId
  • API credentials (API key, API secret)

Step 1: Create a Product Catalog

A catalog is the top-level container that groups products for a store. Each store can have one or more catalogs.

Create catalog

POST /catalog
{
  "storeId": "8136a645a2c2d1bb0f"
}

Response:

{
  "status": "SUCCESS",
  "data": {
    "productcatalogId": "cat_91a3f..."
  },
  "message": "Product catalog created successfully"
}

List catalogs

Retrieve all catalogs that exist under the store:

GET /catalog

The response returns data.productcatalogId as an array of catalog IDs associated with the store.

Step 2: Add Products

With a catalog in place, add products to it. Each product requires a name, type, pricing, tax, and descriptive metadata.

POST /catalog/:catalogId/products
{
  "storeId": "8136a645a2c2d1bb0f",
  "name": "SurfPad Purple Logo",
  "type": "PRODUCT",
  "unitType": "FIXED",
  "costPrice": 20,
  "sellingPrice": 45,
  "currencyCode": "752",
  "tax": [
    {
      "type": "VAT",
      "percentage": "3"
    }
  ],
  "description": "SurfPad Payment Terminal in Purple",
  "category": "electronics",
  "unit": "nos",
  "productImages": [
    "https://example.com/images/surfpad-purple.png"
  ],
  "hsnCode": "723453",
  "barCode": "7812123454323"
}

Response:

{
  "status": "SUCCESS",
  "data": {
    "productId": "prod_82f4a..."
  },
  "message": "Product created successfully"
}

Product types and unit types

FieldValuesDescription
typePRODUCT, SERVICEWhether the item is a physical product or a service
unitTypeFIXED, VARIABLE, FREE_AMOUNTHow quantity and pricing are determined

Fetch a single product

GET /catalog/:catalogId/products/:productId

Pass storeId as a query parameter. The response includes the full product object with pricing, tax, attributes, and inventory status.

List all products in a catalog

GET /catalog/:catalogId/products

Returns an array of products including their variants, inventory, billing plans, campaign info, and tax breakdown.

Step 3: Add Product Variants

Variants represent different versions of a product, such as colour or size options. Attach them to an existing product.

POST /catalog/:catalogId/products/:productId/variants
{
  "storeId": "8136a645a2c2d1bb0f",
  "variants": [
    {
      "name": "SurfPad Blue Variant",
      "description": "Blue variant of SurfPad",
      "costPrice": 10,
      "sellingPrice": 12,
      "currencyCode": "752",
      "productImages": [
        "https://example.com/images/surfpad-blue.png"
      ],
      "hsnCode": "123453",
      "barCode": "1212123454323",
      "attributeValues": [
        {
          "attributeKey": "colour",
          "displayName": "blue",
          "value": "#0000FF"
        },
        {
          "attributeKey": "size",
          "displayName": "medium",
          "value": "M"
        }
      ]
    }
  ]
}

Response:

{
  "status": "SUCCESS",
  "data": {
    "variants": ["var_73b1c..."]
  },
  "message": "Variants added successfully"
}

Each variant in the attributeValues array uses an attributeKey (e.g. colour, size) paired with a displayName and value so the storefront can render selectable options.

Drive cross-sell and upsell opportunities by associating related products with a primary product.

POST /catalog/:catalogId/products/:productId/related-products
{
  "storeId": "8136a645a2c2d1bb0f",
  "relatedProducts": [
    {
      "productId": "prod_82f4a...",
      "relatedProductId": "prod_55d2b..."
    }
  ]
}

The API returns a SUCCESS status when the association is saved.

Step 5: Update Products and Variants

Update a product

Use PATCH to modify any product field. Only the fields you include will be changed.

PATCH /catalog/:catalogId/products/:productId
{
  "storeId": "8136a645a2c2d1bb0f",
  "name": "SurfPad Black Logo",
  "sellingPrice": 15,
  "description": "SurfPad Payment Terminal in Black"
}

Update a variant

The same partial-update approach works for variants:

PATCH /catalog/:catalogId/products/:productId/variants/:variantId
{
  "storeId": "8136a645a2c2d1bb0f",
  "name": "SurfPad Black Logo - Large",
  "sellingPrice": 18,
  "description": "SurfPad Payment Terminal in Black - Large Size"
}

Both endpoints return { "status": "SUCCESS" } on success.

Step 6: Manage Inventory

Track stock at both the product level and the individual variant level.

Update product inventory

PATCH /catalog/:catalogId/products/:productId/inventory
{
  "storeId": "8136a645a2c2d1bb0f",
  "inventory": {
    "productId": "prod_82f4a...",
    "inventory": {
      "quantity": 10,
      "reorderLevel": 5,
      "reorderQuantity": 10
    }
  }
}

Update variant inventory

PATCH /catalog/:catalogId/products/:productId/variants/:variantId/inventory
{
  "storeId": "8136a645a2c2d1bb0f",
  "operation": "STOCK_UP",
  "quantity": 15,
  "unit": "nos"
}

The operation field controls how stock is modified (e.g. STOCK_UP to add inventory). The unit field accepts standard measurement units such as nos, kg, l, m, and many others.

Step 7: View Statistics

Product statistics

Get sales performance, inventory levels, and VAT breakdowns for a single product:

GET /catalog/:catalogId/products/:productId/statistics

Optionally pass startDate and endDate query parameters in YYYY-MM-DD format to filter by date range. The response includes:

  • Sales by currency — units sold, units returned, revenue, VAT, campaign discounts, order count, and average order value
  • Inventory status — current stock, stock in, stock out
  • VAT breakdown — amount and taxable total per VAT percentage
  • Variant-level stats — the same metrics broken down per variant

Catalog statistics

Get an aggregate view across the entire catalog:

GET /catalog/:catalogId/products/statistics

This returns:

  • Summary — total products, total variants, and aggregated sales metrics by currency
  • VAT breakdown — catalog-wide tax totals
  • Top-selling products — ranked by units sold and revenue, with per-currency breakdowns

Both endpoints support optional startDate and endDate query parameters.

API Quick Reference

OperationMethodEndpoint
Create catalogPOST/catalog
List catalogsGET/catalog
Create productPOST/catalog/:catalogId/products
Fetch product by IDGET/catalog/:catalogId/products/:productId
List all productsGET/catalog/:catalogId/products
Update productPATCH/catalog/:catalogId/products/:productId
Add variantsPOST/catalog/:catalogId/products/:productId/variants
Update variantPATCH/catalog/:catalogId/products/:productId/variants/:variantId
Add related productsPOST/catalog/:catalogId/products/:productId/related-products
Update product inventoryPATCH/catalog/:catalogId/products/:productId/inventory
Update variant inventoryPATCH/catalog/:catalogId/products/:productId/variants/:variantId/inventory
Product statisticsGET/catalog/:catalogId/products/:productId/statistics
Catalog statisticsGET/catalog/:catalogId/products/statistics

Other Guides

in-store

Tap to Pay on iPhone SDK

Accept contactless payments directly on iPhone. Complete integration guide for Surfboard's iOS SoftPOS SDK -- from setup to production.

in-store

Android SoftPOS SDK

Turn Android devices into payment terminals with the Surfboard Android SoftPOS SDK. Complete integration guide from setup to production.

in-store

EMV Terminal Integration

Integrate traditional card-present terminals through Surfboard's unified API. From account setup to live payments in one guide.

online

Payment Page

Redirect customers to a Surfboard-hosted checkout page. The fastest way to accept online payments with minimal integration effort.

in-store

Inter-App Integration

Integrate your POS app with CheckoutX using native app switch. Register terminals, process payments, and scan NFC tags through a bi-directional deep link flow.

online

Self-Hosted Checkout

Embed a payment form directly in your web app with the Surfboard Online SDK. Full UI control with Surfboard handling PCI compliance.

online

Server-to-Server API

Process online payments entirely from your backend with Merchant Initiated Transactions. Full control over recurring payments, subscriptions, and tokenized card flows.

online

Create an Order

Learn how to create orders with line items, tax, customer details, and control functions. The starting point for accepting payments with the Surfboard API.

online

Merchant Onboarding

Set up merchants and stores on the Surfboard platform. Walk through the full onboarding flow from merchant creation to KYB completion and store setup.

online

Payment Lifecycle

Manage the full payment lifecycle from order creation through capture, void, cancel, and refund operations using the Surfboard Payments API.

online

Capture a Payment

Finalize a previously authorized payment by capturing funds. Covers delay capture and pre-authorization flows with step-by-step API examples.

in-store

Terminal & Device Management

Manage payment terminals and devices via the Surfboard API. Register in-store and online terminals, configure settings, and handle device operations.

online

Cancel a Payment

Stop an in-progress payment before it completes. Use cancellation when a customer abandons checkout or a payment needs to be halted mid-process.

online

Webhooks & Notifications

Receive real-time event notifications via webhooks, email, Slack, and SFTP. Subscribe to payment events and settlement reports for merchants and partners.

online

Recurring Payments

Implement subscription billing and recurring charges using tokenization, recurring payment configuration, and Merchant Initiated Transactions.

online

Void a Payment

Reverse a completed payment before settlement. Voiding stops funds from transferring to the merchant's account, avoiding incorrect transactions.

in-store

Receipts

Generate, email, print, and customise receipts for in-store transactions using the Surfboard Receipts API.

online

Refund an Order

Process a full refund by creating a return order with negative quantities. Covers the complete refund flow with API examples and payment method requirements.

online

Partial Refund

Refund specific items or a reduced amount from a completed order. Process partial returns by creating a return order with only the items to be refunded.

in-store

Tips Configuration

Configure tipping on Surfboard payment terminals at the merchant, store, or terminal level using a hierarchical override model.

in-store

NFC Tag Reading

Use the NFC Reading API to create tag-reading sessions on payment terminals, scan NFC/RFID-tagged products, and retrieve scanned tag data.

online

Partial Payments

Split an order across multiple payment methods or transactions. Accept card, cash, and Swish in any combination to settle a single order.

in-store

Multi-Merchant Terminals

Set up shared payment terminals for multiple merchants using the Multi-Merchant Group API. Ideal for food courts, events, and co-located businesses.

online

Store Management

Create, update, verify, and manage in-store and online stores using the Surfboard Payments Store APIs.

online

Gift Cards & Promotions

Issue and manage gift cards, track transactions, and create marketing promotions using the Surfboard Payments APIs.

online

Settlements & Reporting

Retrieve settlement reports, view adjustments, manage merchant charges, and register customer profiles for reconciliation and billing.

online

Account & Service Provider Management

Create merchant and partner accounts, manage user roles, register service providers, and configure external notifications via the Surfboard API.

online

Payment Methods

Activate, deactivate, and list payment methods for a merchant. Manage card, Swish, Klarna, AMEX, Vipps, MobilePay, and more via the API or Partner Portal.

online

Client Auth Tokens

Generate client-side authentication tokens for secure API access from browsers and mobile apps without exposing your API key or secret.

online

Partner Branding

Configure white-label branding for terminals and payment pages. Set colors, fonts, logos, and cover images at the partner level via API or Partner Portal.

Ready to get started?

Create a sandbox account and start building your integration today.