Skip to content

SDK API reference

Published release: SDK 0.1.3 is publicly available on npm. Package installation does not activate new backend features.

The publicly available 0.1.3 package set is: @kordiva/sdk, @kordiva/checkout and @kordiva/react. Use @kordiva/sdk in Node server code for authenticated Store API calls; the two browser-safe helpers do not grant payment authority or Store API access.

All paths below are relative to the configured API origin. The SDK unwraps data and throws a sanitized KordivaError for failures.

MethodRouteResult
products.list(query?, options?)GET /public/catalog/stores/:storeId/productsProductPage: items, total, limit, offset
products.get(productId, options?)GET same base /products/:productIdProduct
categories.list(options?)GET same base /categoriesCategoryDetail[]
attributes.list(options?)GET same base /attributesAttribute[]
shippingMethods.list(options?)GET same base /shipping-methodsShippingMethod[], Business use
checkout.createHosted(input, options?)POST same base /checkout-sessionsLIVE CheckoutSession
checkout.createTest(input, options?)POST same base /test-checkoutTEST { environment, url }
payments.confirm(query, options?)GET same base /payment-confirmationsLIVE PaymentConfirmation
subscriptions.get(id, options?)GET /business/v1/stores/:storeId/subscriptions/:idBusinessSubscription
subscriptions.list(query?, options?)GET /business/v1/stores/:storeId/subscriptionsSubscriptionPage
checkout.createSubscription(input, options?)POST /business/v1/stores/:storeId/subscription-checkoutsLIVE Business SubscriptionCheckout

HostedCheckoutInput requires 1–50 lineItems and an 8–128-character idempotencyKey. Each item requires product UUID and integer quantity 1–50; variant UUID is optional. Optional fields: checkoutLanguage (mk/en), orderRef, customerRef (1–128 characters), HTTPS successUrl/returnUrl, expiresInMinutes (5–120, server default 30).

Confirmation needs at least one of session UUID, orderRef or idempotencyKey. Prefer the session UUID. Result states are paid, pending, expired; read isPaid and keep fulfillment eligibility separate. Replay responses may omit orderRef/customerRef: those properties are optional in the SDK type.

RequestOptions accepts signal. The browser package exposes checkoutHref(handoff, allowedOrigins, options?) and redirectToCheckout(handoff, allowedOrigins, navigate?, options?). CheckoutButton accepts onCheckout, allowedOrigins, onError, and optional children/pendingLabel/disabled/className/navigate/checkoutOptions. No public key-management, refund or payout method is exported.

SDK · Checkout · Security · API

subscriptions.get/list are store/environment-scoped reads; checkout.createSubscription creates a LIVE recurring checkout from a CMS recurring Checkout Link. No public subscription change/cancel or refund mutation is exported. Subscription amounts are integer minor units with uppercase ISO currency, separate from catalog decimals. See filters, identity and checkout inputs.

@kordiva/sdk/merchant-webhooks exports verifyMerchantWebhook for Business HMAC lifecycle events; @kordiva/sdk/webhooks remains the separate P-256 agentic order verifier. See Business events and raw-body verification. Business refunds use supported merchant controls, not an SDK refund method.