Behio Storefront SDK
Getting Started

Installation & Setup

Install the SDK and create your first storefront client

Install

npm install @behio/storefront-sdk

Create Client

import { BehioStorefront } from '@behio/storefront-sdk';

const client = new BehioStorefront({
  apiKey: 'pk_live_your_key',
});

Options

OptionTypeDefaultDescription
apiKeystringrequiredYour public API key (pk_live_...)
localestringDefault locale for all requests
currencystringDefault currency for all requests
timeoutnumber30000Request timeout in ms
retriesnumber1Retry count on 5xx / network errors
retryDelaynumber1000Base delay between retries in ms
fetchtypeof fetchglobalThis.fetchCustom fetch implementation (for SSR)

Modules

client.catalog    // Products, categories, search, bundles
client.auth       // Register, login, tokens
client.cart       // Cart items, discounts, gift cards
client.checkout   // Create orders
client.orders     // Order list, detail, tracking
client.customer   // Profile, addresses
client.wishlist   // Wishlist management
client.reviews    // Product reviews
client.returns    // Return requests
client.consent    // Cookie consent (GDPR)
client.quotes     // B2B quotes
client.pages      // CMS pages

Next Steps

On this page