Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* [Python example](#python-example)
* [Javascript example](#javascript-example)
* [PHP library](#php-library)
* [JavaScript & TypeScript SDK](#javascript--typescript-sdk)
* [Example webhook callback handlers](#example-webhook-callback-handlers)
* [python + bottle](#python--bottle)
* [nodejs + express](#nodejs--express)
Expand Down Expand Up @@ -547,6 +548,34 @@ $api = new \Rainedot\PhpNlMarket\MarketAPI('YOUR_API_KEY', 1);
$api->validateRequest(array $request); // Returns true if request is valid
```


### JavaScript & TypeScript SDK

[🔗 nl-market-sdk on GitHub](https://github.com/Walkaisa/nl-market-sdk) • [📖 Full Documentation](https://github.com/Walkaisa/nl-market-sdk#readme)

```bash
# npm
npm install nl-market-sdk

# pnpm (recommended)
pnpm add nl-market-sdk
```

*…or yarn / bun – pick your package manager.*

```ts
import { MarketClient } from "nl-market-sdk";

const client = new MarketClient({
userId: "12345", // Your user ID from API settings.
secret: "SUPER_SECRET_KEY", // Your secret from API settings.
// integrationId: 100 // Only needed if using checkout integration.
});

const res = await client.getBalance();
if (res.success) console.log(`💰 ${res.balance} NLE left`);
```

## Example webhook callback handlers

### python + bottle
Expand Down