Skip to content
Platform Docs

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.

  • ToroSachi account with API access
  • Basic understanding of subscription billing concepts
  • Development environment set up (for API integrations)

Configure your REST API client for optimal performance:

Terminal window
# Set base URL
BASE_URL=https://api.torosachi.com/v1
# Authentication header
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Access our GraphQL endpoint for advanced queries:

query GetSubscriptions {
subscriptions {
id
status
customer {
email
name
}
plan {
name
price
}
}
}

Use these tools to test webhook endpoints:

  1. ngrok - For local development
  2. Webhook.site - For testing webhook payloads
  3. Postman - For API testing and monitoring
// Express.js webhook handler
app.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");
});

Configure custom metrics for your subscription business:

  • Monthly Recurring Revenue (MRR)
  • Annual Recurring Revenue (ARR)
  • Customer Lifetime Value (LTV)
  • Churn Rate
  • Expansion Revenue

Export your subscription data using our CLI tool:

Terminal window
# Install ToroSachi CLI
npm install -g @torosachi/cli
# Export subscription data
torosachi export subscriptions --format csv --date-range last-30-days
# Export revenue data
torosachi export revenue --format json --include-forecasts

Connect ToroSachi data to Tableau:

  1. Download the ToroSachi Tableau connector
  2. Configure your API credentials
  3. Import pre-built subscription dashboards

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
JsonData

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;
}

Add custom functionality to your portal:

// Custom portal widget
ToroSachi.Portal.addWidget({
id: "usage-metrics",
title: "Usage Metrics",
component: UsageMetricsComponent,
position: "dashboard",
});
  • Subscription plan changes
  • Payment method updates
  • Billing history access
  • Invoice downloads
  • Pause/resume functionality
  • Usage tracking
  • Support ticket creation

Connect ToroSachi with 3,000+ apps using Zapier:

  1. Set up ToroSachi trigger (e.g., “New Subscription”)
  2. Configure action in another app (e.g., “Add to CRM”)
  3. Test and activate your Zap

Automate common subscription tasks:

# Python script for subscription lifecycle automation
import requests
from 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
pass

Configure intelligent dunning workflows:

  1. Soft Decline Handling

    • Retry after 3 days
    • Send customer notification
    • Update payment method reminder
  2. Hard Decline Processing

    • Immediate retry
    • Fallback payment method
    • Account suspension logic

Prepare finance exports for accounting review:

-- SQL query for finance export review
SELECT
subscription_id,
recognized_revenue,
deferred_revenue,
recognition_date
FROM revenue_recognition
WHERE recognition_date >= DATE_SUB(NOW(), INTERVAL 1 MONTH);

Use our sandbox environment for testing:

Terminal window
# Switch to sandbox mode
export TOROSACHI_ENV=sandbox
export TOROSACHI_API_KEY=sk_test_your_test_key
# Create test subscription
curl -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
}'

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

Test your integration under load:

// Artillery.js load test configuration
module.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",
},
},
},
],
},
],
};

Enable debug logging for detailed insights:

// Enable debug mode
ToroSachi.config({
debug: true,
logLevel: "verbose",
});

Monitor your integration health:

Terminal window
# Check API status
curl https://status.torosachi.com/api
# Verify webhook endpoint
curl -X POST https://your-domain.com/webhooks/torosachi \
-H "Content-Type: application/json" \
-d '{"test": true}'
  • Always use HTTPS for API communications
  • Rotate API keys regularly
  • Validate webhook signatures
  • Implement proper error handling
  • Use environment variables for sensitive data
  • 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

Set up monitoring for:

  • Failed webhook deliveries
  • API error rates
  • Subscription churn spikes
  • Payment failure rates
  • System response times

Last updated: November 2024