Skip to main content

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
Important: While PaymentSettingId is technically optional during creation, it must be provided before approval if you intend to process the payment via standard methods or VertoFX. Approving without a PaymentSettingId will create a payment record but won’t be able to process it through any payment method.
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 reporting
  • amount (Optional) - Amount in the specified currency
  • memo (Optional) - Description of the payment request
  • Constraint: Users can only have one pending payment request at a time
  • Status flow: pendingapproved or declined (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
Query Parameters:
  • status - Filter by status: pending, approved, declined, processing, completed
  • userId - Filter by specific user
  • page - Page number (default: 1)
  • size - Items per page (default: 20)

Approve Payment Request

When you approve a payment request, the system automatically:
  1. Creates a Payment record
  2. Generates a PDF receipt
  3. Uploads the receipt to cloud storage
  4. Updates the request status to “approved”
  5. Optionally processes international payments via VertoFX
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.
Approval Parameters:

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:
  1. VertoFX Account - Sign up at verto.co
  2. API Credentials - Obtain your API key from VertoFX dashboard
  3. 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
Common Codes:
  • ROYALTY_PAYMENT - Music royalty distributions
  • INVOICE_PAYMENT - Invoice settlements
  • SERVICE_FEE - Service charges
  • COMMISSION - 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

Receipt templates are configured at the workspace level. Contact support to customize your receipt branding and layout.

Downloading Receipts

Single Receipt:
Node.js
Bulk Receipt Download:
Node.js

Troubleshooting Receipts

Possible Causes:
  • Approval request failed before completion
  • Network timeout during generation
  • Payment created manually (not from request)
Solution: Manually upload a receipt using the payment update endpoint:
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
Required Fields:
  • user - TenantUserId receiving the payment
  • transactionDate - When the payment was made
  • currency - Currency code (USD, EUR, GBP, etc.)
  • amount - Amount in the specified currency
  • amountUSD - Amount converted to USD
Optional Fields:
  • title - Description of the payment
  • memo - Additional notes
  • conversionRate - Exchange rate used
  • paymentRequestId - Link to payment request
  • files - Receipt or proof of payment files

List Payments

Get paginated list of all payments:
Node.js
Query Parameters:
  • page - Page number
  • size - Items per page (max: 100)
  • userId - Filter by recipient
  • startDate - 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
Deleting a payment does NOT automatically adjust user balances. You must manually recalculate accounting after deleting payments.

Bulk Payment Processing

Create Multiple Payments

Process batch payments efficiently:
Node.js
Response Format:

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

Configure bank account details for wire transfers:
Node.js
Python
Required Fields:
  • bankName - Name of the bank
  • accountNumber - Bank account number
  • bankCode - Bank code or sort code
  • country - Country name
  • countryCode - ISO country code
  • currency - Currency code

List Payment Settings

Get all payment settings for filtering and management:
Node.js
Query Parameters:
  • user - Filter by TenantUserId
  • default - Filter by isDefault (true/false)
  • type - Filter by payment type
  • q - Search by name or memo
  • page - Page number
  • size - 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
Common Currencies:
  • USD - US Dollar
  • EUR - Euro
  • GBP - British Pound
  • CAD - Canadian Dollar
  • AUD - Australian Dollar
  • NGN - 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

  1. Regular payment cycles - Establish consistent monthly/quarterly payment schedules
  2. Minimum thresholds - Set reasonable minimum amounts to reduce transaction fees
  3. Batch processing - Group payments by payment method for efficiency
  4. Clear communication - Notify users before and after payment processing

Record Keeping

  1. Attach receipts - Upload proof of payment for all transactions
  2. Detailed memos - Include payment period, method, and any relevant notes
  3. Transaction IDs - Store external payment processor transaction IDs
  4. 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

Checklist:
  • Payment was successfully created (check response)
  • Payment amount is positive
  • User ID is correct
  • Payment is linked to correct workspace
Solutions:
  1. Verify payment was created: GET /payment/{id}
  2. Check user stats: GET /accounting/{userId}/stats
  3. Force refresh: GET /accounting/{userId}/stats?forceRefresh=true
  4. If still incorrect, delete and recreate payment
Cause: Users can only have one pending payment request at a time.Solution:
  1. Check existing request: GET /payment-request/?userId={userId}&status=pending
  2. Complete or decline the existing request
  3. User can then create a new request
Common issues:
  • Wrong conversion rate direction (e.g., using USD/EUR instead of EUR/USD)
  • Missing conversionRate field
  • amountUSD doesn’t match calculation
Solution:
Expected behavior: Bulk operations continue processing even if some fail.Check response:
Solution: Review errors array and retry failed payments individually.
Cause: Payment request was created without a 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):
If already created without PaymentSettingId:
  1. User must configure payment settings first via Payment Settings API
  2. Create a new payment request with the PaymentSettingId
  3. Or contact support to manually update the request

API Reference

For complete endpoint documentation, see: Payment Requests: Payments: Payment Settings: Related Guides: