Overview
The Royalti.io API provides comprehensive payment management capabilities for distributing royalty earnings to collaborators. This guide covers creating payment requests, recording payments, tracking payment history, and managing payment settings.Key Features
- Payment requests - Users can request payments for their earnings
- Payment records - Track all payment transactions with receipts
- Multi-currency support - Handle payments in various currencies with automatic USD conversion
- Payment settings - Configure minimum thresholds and payment methods per user
- Bulk operations - Process multiple payments efficiently
Prerequisites
Required Setup
Before processing payments, ensure you have:- User earnings data - Calculated royalties with amounts due to users
- Payment settings configured - Each user should have payment preferences
- Payment method integration - Connect your payment provider (bank transfer, PayPal, Wise, etc.)
Authentication
All payment endpoints require authentication with a Bearer token.
Node.js
Python
Quick Start: Payment Workflow
1
Check Who's Owed Payment
Get list of users with outstanding balances.
Node.js
Python
2
Create Payment Record
Record a payment transaction with details and optional receipt upload.
Node.js
Python
3
Verify Accounting Updated
Check that the user’s balance was reduced.
Node.js
When a payment is created, the user’s “paid” amount automatically increases and “due” amount decreases.
Payment Requests
Users can create payment requests for their earnings. Admins can review and approve these requests.User Creates Payment Request
Users request payment for their available balance. API keys and admins can create requests on behalf of users.Node.js
Python
Payment Request Fields:
PaymentSettingId(Optional) - Reference to a configured payment method. Required for VertoFX or standard payment processing during approval.currency(Required) - Currency code (USD, EUR, GBP, etc.)amountUSD(Required) - USD amount for accounting and reportingamount(Optional) - Amount in the specified currencymemo(Optional) - Description of the payment request- Constraint: Users can only have one
pendingpayment request at a time - Status flow:
pending→approvedordeclined(terminal states)
Create for Specific User (Admin/API Key)
Admins and workspace API keys can create payment requests on behalf of specific users:Node.js
Python
Admin/API Key Only: Only workspace admins and API keys can specify a different user. Regular users creating payment requests will always create for themselves, even if a
user parameter is provided.List All Payment Requests
Admins can view all payment requests:Node.js
status- Filter by status:pending,approved,declined,processing,completeduserId- Filter by specific userpage- Page number (default: 1)size- Items per page (default: 20)
Approve Payment Request
When you approve a payment request, the system automatically:- Creates a Payment record
- Generates a PDF receipt
- Uploads the receipt to cloud storage
- Updates the request status to “approved”
- Optionally processes international payments via VertoFX
- Standard Approval
- VertoFX International Payment
- With File Attachments
Basic approval creates a payment record with automatic receipt generation:
Node.js
Python
All optional parameters default to the values from the payment request if not provided.
Decline Payment Request
Admins can decline requests with a reason:Node.js
Python
Bulk Delete Payment Requests
Delete multiple payment requests efficiently:Node.js
Python
Bulk Delete Notes:
- Delete up to 100 requests per operation
- Partially successful deletes are allowed (some succeed, some fail)
- Check the errors array for failed deletes
- Deleted requests cannot be recovered
VertoFX Integration
VertoFX enables international wire transfers to beneficiaries worldwide with competitive FX rates and fast processing times.Prerequisites
Before using VertoFX for payments, you need:- VertoFX Account - Sign up at verto.co
- API Credentials - Obtain your API key from VertoFX dashboard
- Workspace Integration - Connect your VertoFX account to Royalti.io
1
Connect VertoFX Account
Link your VertoFX account to your workspace:
Node.js
Python
2
Create Beneficiary
Add beneficiary bank details for the payment recipient:
Node.js
Bank details vary by country. The API validates requirements for each region.
3
Link Beneficiary to User
Associate the VertoFX beneficiary with a Royalti.io user:
Node.js
Payment Purpose Codes
VertoFX requires a purpose code for compliance. Available codes:Node.js
ROYALTY_PAYMENT- Music royalty distributionsINVOICE_PAYMENT- Invoice settlementsSERVICE_FEE- Service chargesCOMMISSION- Commission payments
Processing International Payments
Once setup is complete, approve payment requests with the VertoFX method:Node.js
VertoFX payments are processed asynchronously. The system creates the payment record immediately and updates it with the transfer details once VertoFX confirms the transaction.
Managing Beneficiaries
View and update beneficiary information:Node.js
Automatic Receipt Generation
When you approve a payment request, the system automatically generates a professional PDF receipt and attaches it to the payment record.How It Works
1
Approval Triggers Generation
When you call the approve endpoint, receipt generation starts automatically:
Node.js
2
Receipt Details
The generated PDF receipt includes:
- Payment amount and currency
- Recipient information
- Transaction date
- Payment method details
- Unique payment ID for reference
- Company branding (if configured)
3
Access the Receipt
The receipt URL is included in the payment record:
Node.js
Receipt Format
The PDF receipt follows this structure:Customization
Downloading Receipts
Single Receipt:Node.js
Node.js
Troubleshooting Receipts
Receipt not generated
Receipt not generated
Possible Causes:
- Approval request failed before completion
- Network timeout during generation
- Payment created manually (not from request)
Receipt URL not accessible
Receipt URL not accessible
Cause: Receipt URLs are temporary and expire after 24 hours.Solution: Request a fresh URL by fetching the payment details again:
Payment Records
Create Payment
Record a payment transaction:Node.js
user- TenantUserId receiving the paymenttransactionDate- When the payment was madecurrency- Currency code (USD, EUR, GBP, etc.)amount- Amount in the specified currencyamountUSD- Amount converted to USD
title- Description of the paymentmemo- Additional notesconversionRate- Exchange rate usedpaymentRequestId- Link to payment requestfiles- Receipt or proof of payment files
List Payments
Get paginated list of all payments:Node.js
page- Page numbersize- Items per page (max: 100)userId- Filter by recipientstartDate- Filter by date range (YYYY-MM-DD)endDate- Filter by date range (YYYY-MM-DD)
Get Payment Details
Retrieve specific payment with full details:Node.js
Update Payment
Modify payment details:Node.js
Delete Payment
Remove a payment record:Node.js
Bulk Payment Processing
Create Multiple Payments
Process batch payments efficiently:Node.js
Payment Settings
Payment Settings store bank account details, PayPal information, and other payment methods for each user. These settings are used when creating payment requests and processing payments.Supported Payment Types
Create Payment Settings
- Bank Wire Transfer
- PayPal
- Admin: Create for Other Users
Configure bank account details for wire transfers:Required Fields:
Node.js
Python
bankName- Name of the bankaccountNumber- Bank account numberbankCode- Bank code or sort codecountry- Country namecountryCode- ISO country codecurrency- Currency code
List Payment Settings
Get all payment settings for filtering and management:Node.js
user- Filter by TenantUserIddefault- Filter by isDefault (true/false)type- Filter by payment typeq- Search by name or memopage- Page numbersize- Items per page
Get Payment Setting Details
Retrieve specific setting:Node.js
Update Payment Settings
Modify existing payment preferences:Node.js
Multi-Currency Handling
Currency Conversion
When paying in non-USD currency, specify conversion rate:Node.js
USD- US DollarEUR- EuroGBP- British PoundCAD- Canadian DollarAUD- Australian DollarNGN- Nigerian Naira
Always provide both the original amount and USD conversion. The system uses
amountUSD for accounting calculations.Payment History & Reports
Payment Summary
Get aggregate payment statistics:Node.js
Monthly Payment Report
Get month-by-month payment breakdown:Node.js
Export Payment Data
Download payment records as CSV:Node.js
Best Practices
Payment Workflow
- Regular payment cycles - Establish consistent monthly/quarterly payment schedules
- Minimum thresholds - Set reasonable minimum amounts to reduce transaction fees
- Batch processing - Group payments by payment method for efficiency
- Clear communication - Notify users before and after payment processing
Record Keeping
- Attach receipts - Upload proof of payment for all transactions
- Detailed memos - Include payment period, method, and any relevant notes
- Transaction IDs - Store external payment processor transaction IDs
- Currency clarity - Always specify both original and USD amounts
Error Handling
Always verify payment creation and handle errors:Node.js
Reconciliation
Regularly reconcile payments with accounting:Node.js
Troubleshooting
User balance not updated after payment
User balance not updated after payment
Checklist:
- Payment was successfully created (check response)
- Payment amount is positive
- User ID is correct
- Payment is linked to correct workspace
- Verify payment was created:
GET /payment/{id} - Check user stats:
GET /accounting/{userId}/stats - Force refresh:
GET /accounting/{userId}/stats?forceRefresh=true - If still incorrect, delete and recreate payment
Payment request shows 'pending' but user can't create new request
Payment request shows 'pending' but user can't create new request
Cause: Users can only have one pending payment request at a time.Solution:
- Check existing request:
GET /payment-request/?userId={userId}&status=pending - Complete or decline the existing request
- User can then create a new request
Currency conversion not working correctly
Currency conversion not working correctly
Common issues:
- Wrong conversion rate direction (e.g., using USD/EUR instead of EUR/USD)
- Missing
conversionRatefield amountUSDdoesn’t match calculation
Bulk payment partially failed
Bulk payment partially failed
Expected behavior: Bulk operations continue processing even if some fail.Check response:Solution: Review errors array and retry failed payments individually.
Payment request created but approval fails - 'PaymentSettingId is required'
Payment request created but approval fails - 'PaymentSettingId is required'
Cause: Payment request was created without a If already created without PaymentSettingId:
PaymentSettingId, but approval requires one to process the payment.Prevention:
Always provide PaymentSettingId when creating payment requests (unless you plan to update it before approval):- User must configure payment settings first via Payment Settings API
- Create a new payment request with the
PaymentSettingId - Or contact support to manually update the request
API Reference
For complete endpoint documentation, see: Payment Requests:- POST /payment-request - Create request
- GET /payment-request - List requests
- PATCH /payment-request//approve - Approve
- PATCH /payment-request//decline - Decline
- POST /payment-request/bulk/delete - Bulk Delete
- POST /payment - Create payment
- GET /payment - List payments
- GET /payment/ - Get details
- PUT /payment/ - Update payment
- DELETE /payment/ - Delete payment
- POST /payment/bulk - Bulk create
- POST /payment-setting - Create settings
- GET /payment-setting - Get settings
- PUT /payment-setting/ - Update settings
- Financial Data & Management - View earnings
- User Management - Manage collaborators
- Integrated Workflows - Complete payment workflows