Skip to content

Catalog SDK Authentication

The Catalog SDK has a two-part authentication model:

PartyAuthenticates WithPurpose
Your backendX-Api-Key + HMAC headersCreate catalog bootstrap sessions
Your frontendbootstrapToken onlyOpen the hosted catalog through CatalogLink

The browser never receives your API key, HMAC secret, or signing material.

Session Creation

Your backend creates a catalog session with:

http
POST /v2/sdk/catalog/sessions
Content-Type: application/json
X-Api-Key: <client api key>
X-Timestamp: <unix timestamp>
X-Nonce: <unique nonce>
X-Signature: v1=<base64 hmac-sha256 signature>

{
  "platform": "web",
  "user_id": "customer-123",
  "ic_number": "900101101234",
  "phone_number": "60123456789",
  "name": "Jane Customer",
  "email": "jane@example.com"
}

The response includes a short-lived session_token. Your backend returns only that token to your frontend.

Session creation requires platform, user_id, ic_number, and phone_number. name and email are optional. IIMMPACT hashes the IC number for storage and links the session to the existing Catalog SDK user with the same user_id, or creates that user when it does not exist yet.

DANGER

HMAC signing must be server-side only. Do not expose X-Api-Key, HMAC secrets, generated signatures, or canonical signing strings in frontend code.

Runtime Flow

Catalog SDK Endpoint Surface

Client integrations need these server-to-server endpoints:

EndpointAuthCalled ByPurpose
POST /v2/sdk/catalog/sessionsAPI Key + HMACYour backendCreate or update a Catalog SDK user and return a bootstrap token
POST /v2/sdk/catalog/orders/{orderId}/paymentAPI Key + HMACYour backendConfirm verified successful payment and queue asynchronous fulfillment

DANGER

Call POST /v2/sdk/catalog/orders/{orderId}/payment only after your backend has verified that your own payment flow succeeded. This endpoint is the fulfillment trigger and may start the topup or bill payment transaction.

Order statuses are pending_payment, processing, completed, and timeout. Transaction statuses are pending, processing, successful, and failed.

Frontend Origin Allowlist

Add your web app origins in the IIMMPACT dashboard so the hosted catalog can run inside your site and make browser session requests. This applies to the hosted web Catalog SDK flow only; your backend API Key + HMAC requests do not use browser origins.

Add each exact frontend origin you use, for example:

text
https://app.example.com
https://staging.example.com

Origin matching is exact. https://app.example.com does not also allow https://www.app.example.com, https://staging.app.example.com, or http://localhost:3000.

Security Considerations

ConcernRequired Practice
Secret leakageKeep API keys and HMAC secrets on your backend only
Token reuseCreate a fresh bootstrap token for each checkout attempt
Origin mismatchAdd every exact production and staging frontend origin in the IIMMPACT dashboard
Message spoofingKeep widgetUrl pointed at the trusted IIMMPACT-hosted catalog domain
Public environment variablesDo not put secrets in VITE_*, NEXT_PUBLIC_*, or other browser-exposed env vars
Payment confirmationConfirm payment from your backend only after verified successful payment, then track asynchronous fulfillment

IIMMPACT API Documentation