@hualiglobal/kirimel-node-sdk 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -436,18 +436,22 @@ The Loyalty API uses HMAC SHA256 signature authentication for secure POS integra
|
|
|
436
436
|
### Authentication
|
|
437
437
|
|
|
438
438
|
```typescript
|
|
439
|
-
//
|
|
440
|
-
const client = new Client({
|
|
441
|
-
apiKey: 'sk_test_xxx'
|
|
442
|
-
});
|
|
439
|
+
// Method 1: API Key (recommended for Email API only)
|
|
440
|
+
const client = new Client({ apiKey: 'sk_test_xxx' });
|
|
443
441
|
|
|
444
|
-
//
|
|
442
|
+
// Method 2: Environment variable
|
|
443
|
+
// Set KIRIMEL_API_KEY=sk_test_xxx in your environment
|
|
444
|
+
const client = new Client();
|
|
445
|
+
|
|
446
|
+
// Method 3: For Loyalty API, use environment variables
|
|
447
|
+
// Set these in your environment:
|
|
448
|
+
// KIRIMEL_LOYALTY_API_KEY=kl_test_xxx
|
|
449
|
+
// KIRIMEL_LOYALTY_KEY_SECRET=your_secret
|
|
445
450
|
const client = new Client({
|
|
446
|
-
|
|
447
|
-
clientKey: 'cli_test_xxx', // Or KIRIMEL_LOYALTY_CLIENT_KEY env var
|
|
448
|
-
clientSecret: 'your_secret_here' // Or KIRIMEL_LOYALTY_CLIENT_SECRET env var
|
|
451
|
+
keySecret: 'your_secret_here' // Only pass keySecret if not using env var
|
|
449
452
|
});
|
|
450
453
|
```
|
|
454
|
+
```
|
|
451
455
|
|
|
452
456
|
### Customers
|
|
453
457
|
|