TypeScript SDK
For the complete TypeScript SDK documentation, please visit our GitHub repository:
📦 @streamsdk/typescript on GitHub →
Quick Links
Overview
The Stream TypeScript SDK provides a complete Node.js/TypeScript interface for:
- 🔐 Secure API Key authentication
- 👥 Customer (Consumer) management
- 📦 Product catalog management
- 💳 Payment link creation
- 🔄 Subscription handling
- 🧾 Invoice generation
- 🎟️ Coupon & discount management
Installation
npm install @streamsdk/typescript
Quick Example
import StreamSDK from "@streamsdk/typescript";
const client = StreamSDK.init(process.env.STREAM_API_KEY!);
const result = await client.createSimplePaymentLink({
name: "Monthly Subscription",
amount: 99.99,
consumer: {
email: "[email protected]",
name: "Ahmad Ali",
phone: "+966501234567",
},
product: {
name: "Premium Plan",
price: 99.99,
},
successRedirectUrl: "https://yourapp.com/success",
failureRedirectUrl: "https://yourapp.com/failure",
});
console.log("Payment URL:", result.paymentUrl);
For complete documentation, examples, and API reference, visit the GitHub repository.
Related SDKs
- Express.js SDK - Framework adapter for Express.js applications
- API Reference - REST API documentation