Overview
Access comprehensive financial reporting and management tools through the Royalti.io API. View real-time earnings calculations, track expenses and revenue, manage payments, and maintain accurate accounting records across your music catalog.Key Features
- Real-time earnings - View current earnings and payment status for all users
- Automatic calculations - Earnings updated automatically when royalties upload or splits change
- Expense tracking - Record costs at any level (user, artist, product, asset, general)
- Revenue management - Track additional income sources beyond streaming royalties
- Transaction history - Complete audit trail of all financial activity
- Flexible reporting - Monthly breakdowns, summaries, and custom date ranges
- Multi-currency support - Handle international transactions with automatic USD conversion
Prerequisites
Required Data
Before accessing financial features, ensure you have:- User accounts - Collaborators with earnings
- Configured splits - Revenue distribution defined with percentages
- Royalty data uploaded - Revenue data processed from DSPs/distributors
- Payment settings - Bank accounts or payment methods configured (for payments)
Authentication
All financial endpoints require authentication with a Bearer token.
- Node.js
- Python
Quick Start: Complete Financial Cycle
1
Check User Earnings
View earnings breakdown for a specific user:
- Node.js
- Python
2
Track an Expense
Record costs associated with a product release:
- Node.js
- Python
3
Record Additional Revenue
Track income beyond streaming royalties:
- Node.js
- Python
4
Review Updated Balances
Verify accounting reflects all transactions:
- Node.js
- Python
Viewing Earnings & Accounting
Get User Accounting Statistics
Retrieve comprehensive earnings data for a specific user:- Node.js
- Python
Royalty_Share- Gross earnings from all splitspaid- Total amount paid to userdue- Outstanding balance (Royalty_Share - paid)
include=royalty- Include detailed royalty breakdownforceRefresh=true- Recalculate from source data
Get Detailed Royalty Breakdown
Include royalty summary for streams, downloads, and rates:- Node.js
- Python
Current Balances for All Users
Get list of all users with their outstanding balances:- Node.js
- Python
q- Search by user namepage- Page number (default: 1)size- Page size (default: 10, max: 100)sort- Sort field:gross,net,paid,due(default:due)order- Sort order:ASCorDESC(default:DESC)
Total Outstanding for Workspace
Get aggregate due amount across all users:- Node.js
- Python
Transaction History
Get paginated list of all financial transactions:- Node.js
- Python
page- Page number (default: 1)size- Items per page (default: 10, max: 100)start- Start date filter (ISO format: YYYY-MM-DD)end- End date filter (ISO format: YYYY-MM-DD)
payment- Payment made to userrevenue- Revenue receivedexpense- Expense recordedpaymentRequest- Payment request created
- Node.js
- Python
Transaction Summary
Get aggregated totals across all transaction types:- Node.js
- Python
The summary provides all-time totals for the workspace. Use the monthly breakdown endpoint for time-series analysis.
Monthly Transaction Breakdown
Analyze transactions by month with type breakdown:- Node.js
- Python
start- Start date (ISO format: YYYY-MM-DD)stop- End date (ISO format: YYYY-MM-DD)
Expense Management
Track costs associated with releases, artists, and operations. Expenses reduce user earnings in accounting calculations.Flexible Expense Association
Expenses can be associated with different types of entities in your catalog:
How It Works:
- Specify the
typefield to indicate the entity type - Provide the
idfield with the entity’s UUID - For
generalexpenses, omit theidfield
- Track costs at any level of granularity
- Generate expense reports by artist, product, or asset
- Allocate expenses to the appropriate earnings calculations
Create Product Expense
- Node.js
- Python
Create Artist Expense
- Node.js
- Python
Create Asset Expense
Track costs for individual tracks or recordings:- Node.js
- Python
Create General Expense
- Node.js
- Python
List Expenses
- Node.js
- Python
Expense Splits
Distribute expenses among multiple users:- Node.js
- Python
Expense splits reduce user earnings in accounting calculations. The total share should equal 100.
Bulk Expense Creation
Create multiple expenses in a single request:- Node.js
- Python
Revenue Management
Track additional income sources beyond streaming royalties.Create Sync Licensing Revenue
- Node.js
- Python
Create Merchandise Revenue
- Node.js
- Python
List Revenue
- Node.js
- Python
Bulk Revenue Creation
Create multiple revenue records in a single request:- Node.js
- Python
Accounting Operations
When to Refresh Accounting Data
Accounting data is automatically calculated when:- Royalty files are uploaded and processed
- Splits are created or modified
- Payments are recorded
- Expenses or revenue entries are created
- You’ve made multiple split changes
- You need guaranteed latest data
- You suspect calculations are out of sync
Refresh for Specific User
Request updated calculations for a single user:- Node.js
- Python
forceRefresh=true- Force recalculation even if data is recent
Refresh All Users in Workspace
Request recalculation for all users:- Node.js
- Python
batchSize- Users per batch (default: 100, min: 1, max: 500)
For workspaces with many users (100+), recalculation is processed in batches to ensure reliability. Check the status endpoint to monitor progress.
Immediate Refresh (Small Workspaces)
For small workspaces with fewer than 100 users, you can use the immediate refresh:- Node.js
- Python
Check Recalculation Status
Monitor the progress of recalculation operations:- Node.js
- Python
waiting- Job queued, not yet startedactive- Currently processingcompleted- Successfully finishedfailed- Encountered an errordelayed- Temporarily delayed, will retry
Queue Overview
View overall queue status without specifying a job ID:- Node.js
- Python
Statistics Pipeline
Refresh all statistics and accounting data in the correct order:- Node.js
- Python
This endpoint ensures all statistics are recalculated in the correct dependency order. Use this after bulk data uploads or major catalog changes.
Multi-Currency Handling
All financial records support multi-currency transactions with automatic USD conversion:- Node.js
- Python
- Node.js
- Python
The system uses
amountUSD for all accounting calculations to ensure consistency across currencies.Best Practices
Data Accuracy
- Trust automatic calculations - The system updates accounting when royalties upload or splits change
- Use forceRefresh sparingly - Only when you need guaranteed fresh data
- Validate splits first - Ensure splits total 100% before expecting accurate earnings
- Regular reconciliation - Compare accounting data with actual payments monthly
- Verify amounts - Always double-check USD conversion rates
- Detailed memos - Include transaction context for audit trails
Performance Optimization
- Use default cached data - Faster response times for most queries
- Batch operations - Use bulk endpoints for multiple records
- Monitor queue status - Track long-running recalculation operations
- Paginate results - Use reasonable page sizes (10-50 items)
- Async processing - Don’t wait for recalculation to complete
Reporting Workflows
- Use date filters - Filter transactions by specific periods for reports
- Export for analysis - Use transaction endpoints for external reporting tools
- Monitor monthly trends - Track revenue and payment patterns over time
- Check user balances - Regularly review who is owed payment
- Weekly reviews - Check user balances and pending items
- Monthly cycles - Establish consistent payment schedules
- Quarterly audits - Reconcile all transactions against external records
Error Handling
Always implement robust error handling for financial operations:- Node.js
- Python
Troubleshooting
Earnings don't match expected amount
Earnings don't match expected amount
Checklist:
- Verify split configurations are active
- Check split date ranges include relevant periods
- Review conditional split logic (territory, DSP-specific splits)
- Ensure royalty data uploaded successfully
- Check for expenses reducing earnings
- Check user stats:
GET /accounting/{userId}/stats - Force refresh:
GET /accounting/{userId}/stats?forceRefresh=true - Verify splits:
GET /split?userId={userId} - Check royalty data:
GET /royalty?userId={userId} - Review expenses:
GET /expense?userId={userId}
Data seems outdated
Data seems outdated
Possible causes:
- Recent split changes not yet reflected
- Royalty file just uploaded
- Manual refresh needed
- Cache delay
- Use
forceRefresh=trueparameter - Check recent uploads:
GET /file?status=completed - Verify split changes saved:
GET /split/{splitId} - Request recalculation:
POST /accounting/users/{userId}/recalculate
Refresh job stuck or failed
Refresh job stuck or failed
Check job status:Common causes:
- Invalid split data (doesn’t total 100%)
- Missing royalty data
- Database connection issues
- Large dataset processing
- Check error details in job status
- Verify split configurations
- Retry with smaller batch size
- Contact support if error persists
- Small workspaces (<100 users): 1-2 minutes
- Medium workspaces (100-1000 users): 2-10 minutes
- Large workspaces (1000+ users): 10-30 minutes
User missing from current due list
User missing from current due list
Checklist:
- User has at least one active split
- Split date ranges include current period
- Asset/Product has royalty data uploaded
- Split percentages are valid (0-100)
- User actually has positive balance
- Check user splits:
GET /split?userId={userId} - Check user stats:
GET /accounting/{userId}/stats - Verify user exists:
GET /user/{userId} - Force recalculation if needed
Transaction totals don't match
Transaction totals don't match
Reconciliation steps:If mismatched:
- Check for deleted payments
- Verify all payments recorded correctly
- Review expenses and revenue entries
- Force full workspace refresh
Currency conversion incorrect
Currency conversion incorrect
Common Mistakes:
- Wrong conversion direction (USD/EUR vs EUR/USD)
- Missing conversionRate
- amountUSD doesn’t match calculation
Expense not reducing user earnings
Expense not reducing user earnings
Checklist:
- Expense split configured correctly
- User IDs in split are valid
- Share percentages total 100
- Expense transaction date is within accounting period
- Verify expense:
GET /expense/{id} - Check split configuration in expense record
- Force user recalculation:
POST /accounting/users/{userId}/recalculate - Review accounting stats:
GET /accounting/{userId}/stats?forceRefresh=true
Revenue not increasing user earnings
Revenue not increasing user earnings
Checklist:
- Revenue splits configured correctly
- User IDs in splits are valid
- Share percentages total 100
- Revenue amount is positive
- Verify revenue:
GET /revenue/{id} - Check split configuration
- Force user recalculation:
POST /accounting/users/{userId}/recalculate - Review accounting stats:
GET /accounting/{userId}/stats?forceRefresh=true
API Reference
For complete endpoint documentation, see: Accounting & Earnings:- GET /accounting//stats - User earnings statistics
- GET /accounting/getcurrentdue - Users with balances
- GET /accounting/gettotaldue - Workspace total due
- GET /accounting/transactions - List transactions
- GET /accounting/transactions/summary - Aggregate summary
- GET /accounting/transactions/monthly - Monthly breakdown
- GET /accounting/refresh - Immediate refresh (small workspaces)
- GET /accounting/refreshstats - Statistics pipeline
- POST /accounting/users//recalculate - Single user refresh
- POST /accounting/tenant/recalculate - Workspace refresh
- GET /accounting/queue/status - Monitor progress
- POST /expense - Create expense
- GET /expense - List expenses
- GET /expense/ - Get expense details
- PUT /expense/ - Update expense
- POST /expense/bulk - Bulk create
- POST /expense/bulk-delete - Bulk delete
- POST /revenue - Create revenue
- GET /revenue - List revenue
- GET /revenue/ - Get revenue details
- PUT /revenue/ - Update revenue
- DELETE /revenue/ - Delete revenue
- POST /revenue/bulk - Bulk create
- POST /revenue/bulk-delete - Bulk delete
- Payment Processing - Detailed payment workflows and VertoFX integration
- Splits Management - Configure revenue distribution
- Royalty Management - Upload and process royalty data
- User Management - Manage collaborators
- Integrated Workflows - End-to-end examples
Support
Need help with financial management?- Documentation: apidocs.royalti.io
- API Status: status.royalti.io
- Support Email: support@royalti.io
- Developer Community: community.royalti.io