Tool Guides
Tool Guides
Section titled “Tool Guides”Welcome to our comprehensive tool guides for subscription management, billing automation, and customer success platforms. These guides will help you maximize the value of ToroSachi’s subscription billing platform and integrate seamlessly with your existing tools.
Getting Started with Tools
Section titled “Getting Started with Tools”Prerequisites
Section titled “Prerequisites”- ToroSachi account with API access
- Basic understanding of subscription billing concepts
- Development environment set up (for API integrations)
Platform Integration Tools
Section titled “Platform Integration Tools”API Documentation Tools
Section titled “API Documentation Tools”REST API Client
Section titled “REST API Client”Configure your REST API client for optimal performance:
# Set base URLBASE_URL=https://api.torosachi.com/v1
# Authentication headerAuthorization: Bearer YOUR_API_KEYContent-Type: application/jsonGraphQL Playground
Section titled “GraphQL Playground”Access our GraphQL endpoint for advanced queries:
query GetSubscriptions { subscriptions { id status customer { email name } plan { name price } }}Webhook Configuration Tools
Section titled “Webhook Configuration Tools”Webhook Testing
Section titled “Webhook Testing”Use these tools to test webhook endpoints:
- ngrok - For local development
- Webhook.site - For testing webhook payloads
- Postman - For API testing and monitoring
Sample Webhook Handler
Section titled “Sample Webhook Handler”// Express.js webhook handlerapp.post("/webhooks/torosachi", (req, res) => { const event = req.body;
switch (event.type) { case "subscription.created": handleSubscriptionCreated(event.data); break; case "payment.succeeded": handlePaymentSucceeded(event.data); break; default: console.log("Unhandled event type:", event.type); }
res.status(200).send("OK");});Analytics and Reporting Tools
Section titled “Analytics and Reporting Tools”Dashboard Configuration
Section titled “Dashboard Configuration”Custom Metrics Setup
Section titled “Custom Metrics Setup”Configure custom metrics for your subscription business:
- Monthly Recurring Revenue (MRR)
- Annual Recurring Revenue (ARR)
- Customer Lifetime Value (LTV)
- Churn Rate
- Expansion Revenue
Data Export Tools
Section titled “Data Export Tools”Export your subscription data using our CLI tool:
# Install ToroSachi CLInpm install -g @torosachi/cli
# Export subscription datatorosachi export subscriptions --format csv --date-range last-30-days
# Export revenue datatorosachi export revenue --format json --include-forecastsBusiness Intelligence Integration
Section titled “Business Intelligence Integration”Tableau Connector
Section titled “Tableau Connector”Connect ToroSachi data to Tableau:
- Download the ToroSachi Tableau connector
- Configure your API credentials
- Import pre-built subscription dashboards
Power BI Integration
Section titled “Power BI Integration”Set up Power BI for subscription analytics:
let Source = Web.Contents("https://api.torosachi.com/v1/analytics/revenue", [Headers=[Authorization="Bearer " & API_Key]] ), JsonData = Json.Document(Source)in JsonDataCustomer Portal Tools
Section titled “Customer Portal Tools”Customization Tools
Section titled “Customization Tools”CSS Customization
Section titled “CSS Customization”Customize your customer portal appearance:
/* Portal theme customization */:root { --primary-color: #your-brand-color; --secondary-color: #your-secondary-color; --font-family: "Your Brand Font", sans-serif;}
.portal-header { background: var(--primary-color); color: white;}JavaScript Extensions
Section titled “JavaScript Extensions”Add custom functionality to your portal:
// Custom portal widgetToroSachi.Portal.addWidget({ id: "usage-metrics", title: "Usage Metrics", component: UsageMetricsComponent, position: "dashboard",});Self-Service Configuration
Section titled “Self-Service Configuration”Portal Features Checklist
Section titled “Portal Features Checklist”- Subscription plan changes
- Payment method updates
- Billing history access
- Invoice downloads
- Pause/resume functionality
- Usage tracking
- Support ticket creation
Automation Tools
Section titled “Automation Tools”Workflow Automation
Section titled “Workflow Automation”Zapier Integration
Section titled “Zapier Integration”Connect ToroSachi with 3,000+ apps using Zapier:
- Set up ToroSachi trigger (e.g., “New Subscription”)
- Configure action in another app (e.g., “Add to CRM”)
- Test and activate your Zap
Custom Automation Scripts
Section titled “Custom Automation Scripts”Automate common subscription tasks:
# Python script for subscription lifecycle automationimport requestsfrom datetime import datetime, timedelta
def check_trial_expiry(): trials = get_trial_subscriptions() for trial in trials: if trial['expires_at'] <= datetime.now() + timedelta(days=3): send_trial_reminder(trial['customer_email'])
def send_trial_reminder(email): # Send personalized trial reminder passBilling Automation
Section titled “Billing Automation”Dunning Management Setup
Section titled “Dunning Management Setup”Configure intelligent dunning workflows:
-
Soft Decline Handling
- Retry after 3 days
- Send customer notification
- Update payment method reminder
-
Hard Decline Processing
- Immediate retry
- Fallback payment method
- Account suspension logic
Revenue Recognition
Section titled “Revenue Recognition”Prepare finance exports for accounting review:
-- SQL query for finance export reviewSELECT subscription_id, recognized_revenue, deferred_revenue, recognition_dateFROM revenue_recognitionWHERE recognition_date >= DATE_SUB(NOW(), INTERVAL 1 MONTH);Testing Tools
Section titled “Testing Tools”Subscription Testing
Section titled “Subscription Testing”Test Environment Setup
Section titled “Test Environment Setup”Use our sandbox environment for testing:
# Switch to sandbox modeexport TOROSACHI_ENV=sandboxexport TOROSACHI_API_KEY=sk_test_your_test_key
# Create test subscriptioncurl -X POST https://api-sandbox.torosachi.com/v1/subscriptions \ -H "Authorization: Bearer $TOROSACHI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "test_customer_123", "plan_id": "plan_basic_monthly", "trial_days": 14 }'Payment Testing
Section titled “Payment Testing”Test different payment scenarios:
- Successful payments - Use test card
4242 4242 4242 4242 - Declined payments - Use test card
4000 0000 0000 0002 - Insufficient funds - Use test card
4000 0000 0000 9995
Load Testing
Section titled “Load Testing”Performance Testing
Section titled “Performance Testing”Test your integration under load:
// Artillery.js load test configurationmodule.exports = { config: { target: "https://api.torosachi.com", phases: [ { duration: "2m", arrivalRate: 10 }, { duration: "5m", arrivalRate: 20 }, { duration: "2m", arrivalRate: 10 }, ], }, scenarios: [ { name: "Create subscription", weight: 100, engine: "http", flow: [ { post: { url: "/v1/subscriptions", headers: { Authorization: "Bearer {{ $env.API_KEY }}", "Content-Type": "application/json", }, json: { customer_id: "load_test_{{ $uuid() }}", plan_id: "plan_basic_monthly", }, }, }, ], }, ],};Troubleshooting Tools
Section titled “Troubleshooting Tools”Debug Mode
Section titled “Debug Mode”Enable debug logging for detailed insights:
// Enable debug modeToroSachi.config({ debug: true, logLevel: "verbose",});Health Check Tools
Section titled “Health Check Tools”Monitor your integration health:
# Check API statuscurl https://status.torosachi.com/api
# Verify webhook endpointcurl -X POST https://your-domain.com/webhooks/torosachi \ -H "Content-Type: application/json" \ -d '{"test": true}'Best Practices
Section titled “Best Practices”Security Guidelines
Section titled “Security Guidelines”- Always use HTTPS for API communications
- Rotate API keys regularly
- Validate webhook signatures
- Implement proper error handling
- Use environment variables for sensitive data
Performance Optimization
Section titled “Performance Optimization”- Implement proper caching strategies
- Use pagination for large data sets
- Batch API requests when possible
- Monitor API rate limits
- Implement retry logic with exponential backoff
Monitoring and Alerting
Section titled “Monitoring and Alerting”Set up monitoring for:
- Failed webhook deliveries
- API error rates
- Subscription churn spikes
- Payment failure rates
- System response times
Support Resources
Section titled “Support Resources”Documentation Links
Section titled “Documentation Links”Community
Section titled “Community”Getting Help
Section titled “Getting Help”- Email: developers@torosachi.com
- Chat: Available in your dashboard
- Documentation: docs.torosachi.com
Last updated: November 2024