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: "customer@example.com",
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