Product Catalog
Create and manage product catalogs, products, variants, inventory levels, and analytics through the Catalog API.
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
| Field | Values | Description |
|---|---|---|
type | PRODUCT, SERVICE | Whether the item is a physical product or a service |
unitType | FIXED, VARIABLE, FREE_AMOUNT | How 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.
Step 4: Link Related Products
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
| Operation | Method | Endpoint |
|---|---|---|
| Create catalog | POST | /catalog |
| List catalogs | GET | /catalog |
| Create product | POST | /catalog/:catalogId/products |
| Fetch product by ID | GET | /catalog/:catalogId/products/:productId |
| List all products | GET | /catalog/:catalogId/products |
| Update product | PATCH | /catalog/:catalogId/products/:productId |
| Add variants | POST | /catalog/:catalogId/products/:productId/variants |
| Update variant | PATCH | /catalog/:catalogId/products/:productId/variants/:variantId |
| Add related products | POST | /catalog/:catalogId/products/:productId/related-products |
| Update product inventory | PATCH | /catalog/:catalogId/products/:productId/inventory |
| Update variant inventory | PATCH | /catalog/:catalogId/products/:productId/variants/:variantId/inventory |
| Product statistics | GET | /catalog/:catalogId/products/:productId/statistics |
| Catalog statistics | GET | /catalog/:catalogId/products/statistics |
Other Guides
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.
Android SoftPOS SDK
Turn Android devices into payment terminals with the Surfboard Android SoftPOS SDK. Complete integration guide from setup to production.
EMV Terminal Integration
Integrate traditional card-present terminals through Surfboard's unified API. From account setup to live payments in one guide.
Payment Page
Redirect customers to a Surfboard-hosted checkout page. The fastest way to accept online payments with minimal integration effort.
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.
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.
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.
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.
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.
Payment Lifecycle
Manage the full payment lifecycle from order creation through capture, void, cancel, and refund operations using the Surfboard Payments API.
Capture a Payment
Finalize a previously authorized payment by capturing funds. Covers delay capture and pre-authorization flows with step-by-step API examples.
Terminal & Device Management
Manage payment terminals and devices via the Surfboard API. Register in-store and online terminals, configure settings, and handle device operations.
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.
Webhooks & Notifications
Receive real-time event notifications via webhooks, email, Slack, and SFTP. Subscribe to payment events and settlement reports for merchants and partners.
Recurring Payments
Implement subscription billing and recurring charges using tokenization, recurring payment configuration, and Merchant Initiated Transactions.
Void a Payment
Reverse a completed payment before settlement. Voiding stops funds from transferring to the merchant's account, avoiding incorrect transactions.
Receipts
Generate, email, print, and customise receipts for in-store transactions using the Surfboard Receipts API.
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.
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.
Tips Configuration
Configure tipping on Surfboard payment terminals at the merchant, store, or terminal level using a hierarchical override model.
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.
Partial Payments
Split an order across multiple payment methods or transactions. Accept card, cash, and Swish in any combination to settle a single order.
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.
Store Management
Create, update, verify, and manage in-store and online stores using the Surfboard Payments Store APIs.
Gift Cards & Promotions
Issue and manage gift cards, track transactions, and create marketing promotions using the Surfboard Payments APIs.
Settlements & Reporting
Retrieve settlement reports, view adjustments, manage merchant charges, and register customer profiles for reconciliation and billing.
Account & Service Provider Management
Create merchant and partner accounts, manage user roles, register service providers, and configure external notifications via the Surfboard API.
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.
Client Auth Tokens
Generate client-side authentication tokens for secure API access from browsers and mobile apps without exposing your API key or secret.
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.