Earnings
List Earnings
Retrieve a list of all earnings from your programs
GET
Retrieve a list of all earnings from your programs. This endpoint helps you track commissions, monitor payout status, and analyze earnings performance across programs and ambassadors.
Each earning object contains:
Overview
The List Earnings endpoint returns a paginated list of all earnings created when referred customers spend money on your platform. Use this endpoint to:- Track all earnings across programs
- Monitor earnings by referral or program
- Filter earnings by status (pending, processing, paid, failed)
- Build earnings dashboards and reports
- Calculate total commissions owed to ambassadors
Authentication
This endpoint requires authentication using a Bearer token in the Authorization header:Query Parameters
string
Filter results to only include earnings from a specific referral. Useful when tracking earnings for a particular signup.Example:
referral_id=ref_123abcstring
Filter results to only include earnings from a specific program. Useful when analyzing earnings for individual programs.Example:
program_id=prog_123abcstring
Filter earnings by their current status. Valid values are:
pending- Earning created but not yet processedprocessing- Earning is being processed for payoutpaid- Earning has been paid outfailed- Earning payment failed
status=paid returns only paid earningsinteger
default:"50"
Maximum number of results to return per page. Default is 50, maximum is typically 100.Example:
limit=25integer
default:"0"
Number of results to skip before starting to return results. Use for pagination.Example:
offset=50 skips the first 50 resultsRequest Example
Response
The API returns a JSON object containing an array of earning objects:array
required
Array of earning objects, each containing information about a commission or payout.
string
required
Unique identifier for the earning.
string
required
ID of the referral that generated this earning.
number
required
Amount in cents (e.g., 1000 = $10.00).
string
required
Currency code (ISO 4217 format, e.g., “USD”, “EUR”).
string
Type of earning (e.g., “purchase”, “subscription”, “recurring”).
string
Description of the earning.
string
required
Current status:
pending, processing, paid, or failed.string
External reference (e.g., Stripe payout ID, transaction ID).
string
required
ISO 8601 timestamp of when the earning was created.
string
ISO 8601 timestamp of when the earning was paid out, if applicable.
object
Additional metadata about the earning.
Response Example
Use Cases
Building an Earnings Dashboard
Fetch all earnings and display them in a dashboard:Calculating Total Earnings
Calculate total earnings for a program or ambassador:Tracking Pending Payouts
Get all earnings that need to be paid out:Exporting Earnings Data
Fetch all earnings for export:Best Practices
- Use filters effectively - Combine filters to narrow results and improve performance
- Implement pagination - Always use
limitandoffsetfor large datasets - Track status changes - Monitor earnings status to ensure timely payouts
- Store reference IDs - Use reference_id to link to external payment systems
- Calculate totals carefully - Remember amounts are in cents, convert to dollars for display
Error Responses
object
Unauthorized - Invalid or missing API key
Rate Limits
This endpoint is subject to rate limiting. Check response headers for rate limit information.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by referral ID
Filter by program ID
Filter by earning status
Available options:
pending, processing, paid, failed Maximum number of results to return
Number of results to skip
Response
List of earnings