Package Exports
- shora-ai-payment-sdk
- shora-ai-payment-sdk/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shora-ai-payment-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
๐ Shora AI Payment SDK
Commerce infrastructure for the AI era
The first open-source payment SDK designed specifically for AI agents and chatbots
๐ Documentation โข ๐ฎ Live Demo โข ๐ฌ Discord โข ๐ฆ Twitter
โก Quickstart (30 seconds)
# Install the SDK
npm install shora-ai-payment-sdk
# Or with yarn
yarn add shora-ai-payment-sdkimport ShoraSDK from 'shora-ai-payment-sdk';
// Initialize with your API key
const shora = new ShoraSDK({
apiKey: 'your_api_key_here',
environment: 'sandbox' // or 'production'
});
// Create a payment session for your AI agent
const session = await shora.createPaymentSession({
amount: 2999, // $29.99 in cents
currency: 'USD',
description: 'AI Agent Subscription',
customer: {
email: 'user@example.com',
name: 'John Doe'
}
});
console.log('Payment URL:', session.payment_url);๐ฆ NPM Package
Install: npm install shora-ai-payment-sdk
Import: import ShoraSDK from 'shora-ai-payment-sdk'
TypeScript: Full TypeScript support included
Basic Usage
import ShoraSDK from 'shora-ai-payment-sdk';
const shora = new ShoraSDK({
apiKey: process.env.SHORA_API_KEY,
environment: 'sandbox'
});
// Your AI agent is ready to process payments!๐ฎ Live Demo
Try it now: demo.shora.co
- ๐ค AI Chatbot Integration - See how AI agents process payments
- ๐ณ Real Payment Flow - Complete checkout experience
- ๐ง Developer Tools - API explorer and code examples
- ๐ Analytics Dashboard - Transaction monitoring
๐ Why Shora?
| Feature | Traditional SDKs | Shora SDK |
|---|---|---|
| AI Agent Ready | โ | โ Built for AI |
| Mandate Management | โ | โ Agent Authorization |
| Token-based Payments | โ | โ Secure Tokens |
| Real-time Webhooks | โ | โ Instant Notifications |
| Multi-currency | Limited | โ Global Support |
| Open Source | โ | โ MIT License |
โจ Features
๐ค AI Agent Features
- Mandate Management: Create, activate, and cancel payment mandates for AI agents
- Token Generation: Secure payment tokens with TTL for agent transactions
- Checkout Sessions: Complete shopping cart management for AI agents
- Payment Processing: Token-based payments with PSP routing and failover
- Agent Integration: Direct integration with AI agents and chatbots
๐ Enterprise Features
- Multi-tenant Support: Isolated data per organization
- Audit Logs: Complete transaction audit trail
- Custom Webhooks: Real-time payment event notifications
- Rate Limiting: Tier-based API access control
- OAuth2 + API Key: Hybrid authentication system
๐ Global Support
- Multi-currency: USD, EUR, TRY, GBP, and more
- Turkish PSPs: PayTR, ฤฐyzico, Papara integration
- Global PSPs: Stripe, PayPal, Adyen support
- Real-time: Instant payment confirmations
๐ฏ Use Cases
๐ค AI Chatbots & Agents
// AI agent processes payment
const payment = await shora.agents.pay({
token: agentToken,
amount: 150.00,
currency: 'USD',
description: 'AI Service Subscription'
});๐ E-commerce Integration
// E-commerce checkout
const session = await shora.createPaymentSession({
amount: 9999, // $99.99
currency: 'USD',
customer: { email: 'customer@example.com' },
items: [
{ name: 'Premium Plan', price: 9999, quantity: 1 }
]
});๐ Subscription Management
// Recurring payments
const mandate = await shora.agents.createMandate({
agent_id: 'subscription-bot',
max_amount: 5000.00,
currency: 'USD',
expires_at: '2025-12-31T23:59:59Z'
});๐ Getting Started
1. Get Your API Key
Free Tier: Get started for free
- 100 transactions/month
- Sandbox environment
- Basic support
Pro Tier: Upgrade to Pro
- 10,000 transactions/month
- Production environment
- Priority support
- Advanced features
2. Install the SDK
npm install shora-ai-payment-sdk3. Initialize and Start Building
import ShoraSDK from 'shora-ai-payment-sdk';
const shora = new ShoraSDK({
apiKey: process.env.SHORA_API_KEY,
environment: 'sandbox'
});
// Your AI agent is ready to process payments!๐ API Reference
๐ค Agent Payment Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v2/agents/mandates |
POST | Create payment mandate |
/v2/agents/tokens |
POST | Generate payment token |
/v2/agents/checkout-sessions |
POST | Create checkout session |
/v2/agents/pay |
POST | Process payment |
/v2/agents/mandates/{id} |
GET | Get mandate details |
/v2/agents/payments/{id} |
GET | Get payment details |
๐ณ Payment Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v2/payments/sessions |
POST | Create payment session |
/v2/payments/process |
POST | Process payment |
/v2/payments/refund |
POST | Refund payment |
/v2/transactions/{id} |
GET | Get transaction details |
/v2/transactions |
GET | List transactions |
๐ Webhook Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v2/webhooks |
POST | Create webhook |
/v2/webhooks/{id}/test |
POST | Test webhook |
/v2/webhooks/events |
GET | List webhook events |
๐ก Example Usage
Basic Payment Flow
// 1. Create payment session
const session = await shora.createPaymentSession({
amount: 2999, // $29.99
currency: 'USD',
description: 'AI Service Subscription',
customer: {
email: 'user@example.com',
name: 'John Doe'
}
});
// 2. Process payment
const payment = await shora.processPayment({
sessionId: session.id,
paymentMethod: 'card',
cardToken: 'tok_1234567890'
});
// 3. Handle webhook
app.post('/webhook', (req, res) => {
const event = req.body;
if (event.type === 'payment.completed') {
console.log('Payment completed:', event.data);
}
});AI Agent Integration
// AI agent creates mandate
const mandate = await shora.agents.createMandate({
agent_id: 'chatbot-123',
max_amount: 1000.00,
currency: 'USD',
expires_at: '2025-12-31T23:59:59Z'
});
// Generate secure token
const token = await shora.agents.generateToken({
mandate_id: mandate.id,
amount: 150.00,
currency: 'USD'
});
// Process payment with token
const payment = await shora.agents.pay({
token: token.value,
amount: 150.00,
currency: 'USD'
});๐ฎ Demo & Examples
Live Demo
Try it now: demo.shora.co
Local Demo
# Clone the repository
git clone https://github.com/shoraco/shora-ai-payment-sdk
cd shora-ai-payment-sdk
# Install dependencies
npm install
# Run the demo
npm run demoDemo Features
- ๐ค AI Chatbot - Interactive payment flow
- ๐ณ Payment Processing - Real payment simulation
- ๐ Webhook Handling - Real-time notifications
- ๐ Analytics - Transaction monitoring
- ๐ง Developer Tools - API explorer
๐ข Enterprise Features
๐ Advanced Security
- OAuth2 + API Key: Hybrid authentication system
- Multi-tenant: Isolated data per organization
- Audit Logs: Complete transaction audit trail
- Rate Limiting: Tier-based API access control
๐ Analytics & Monitoring
- Real-time Dashboard: app.shora.cloud
- Transaction Analytics: Revenue tracking and insights
- Webhook Management: Custom event notifications
- Performance Monitoring: API response times and uptime
๐ Global Infrastructure
- Multi-currency: USD, EUR, TRY, GBP, and more
- Turkish PSPs: PayTR, ฤฐyzico, Papara integration
- Global PSPs: Stripe, PayPal, Adyen support
- Cloudflare CDN: Worldwide low-latency access
๐ฐ Pricing
| Plan | Price | Transactions | Features |
|---|---|---|---|
| Free | $0/month | 100/month | Sandbox, Basic Support |
| Pro | $99/month | 10,000/month | Production, Priority Support, Analytics |
| Enterprise | $499/month | 100,000/month | Custom Integration, SLA, Dedicated Support |
Get started: app.shora.cloud/signup
Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ AI Agent โโโโโถโ Shora SDK โโโโโถโ Shora Core โ
โ (Chatbot) โ โ โ โ (Payment โ
โ โ โ Mandate โ โ Processing) โ
โ โ โ Management โ โ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Turkish PSPs โ
โ (PayTR, โ
โ ฤฐyzico, โ
โ Papara) โ
โโโโโโโโโโโโโโโโโโโSecurity
- Token-based Authentication: Secure payment tokens with TTL
- Mandate Validation: AI agent authorization verification
- PCI Compliance: No PCI data exposure
- Rate Limiting: Built-in request rate limiting
- Webhook Security: HMAC signature verification
Development
Prerequisites
- Node.js 18+
- npm or yarn
- Shora Core API access
Local Development
# Install dependencies
npm install
# Copy environment file
cp env.example .env
# Start development server
npm run dev
# Run tests
npm test
# Run demo
npm run demoEnterprise Development
# Run all tests
npm run test
# Run load tests
npm run test:load
# Run security tests
npm run test:security
# Run linting
npm run lint
# Build for production
npm run buildEnvironment Variables
SHORA_API_KEY=your_api_key_here
SHORA_BASE_URL=https://api.shora.cloud
SHORA_WEBHOOK_SECRET=your_webhook_secretLicense
MIT License - see LICENSE file for details.
Support
- Documentation: https://docs.shora.co
- API Reference: https://api.shora.cloud/docs
- Support Email: dev@shora.co
- GitHub Issues: https://github.com/shora-ai/shora-ai-payment-sdk/issues
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
Roadmap
- Webhook handling for payment events
- Multi-currency support
- Advanced fraud detection
- Real-time payment status updates
- Integration with popular AI frameworks
๐ Community & Support
๐ Resources
- ๐ Documentation: docs.shora.co
- ๐ฎ Live Demo: demo.shora.co
- ๐ฌ Discord: discord.gg/shora
- ๐ฆ Twitter: @shora_co
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Support
- Email: dev@shora.co
- GitHub Issues: Create an issue
- Discord: Join our community
Shora AI Payment SDK - Commerce infrastructure for the AI era