Overview
The Get Earning endpoint returns comprehensive information about a single earning. This is useful for:- Viewing earning details in dashboards
- Checking earning status before processing payouts
- Verifying earning information for customer support
- Building earning detail pages
- Tracking payout progress
Authentication
This endpoint requires authentication using a Bearer token in the Authorization header:Path Parameters
The unique identifier of the earning you want to retrieve. This ID is returned when you create an earning or list earnings.Example:
earn_123abcRequest Example
Response
The API returns a detailed earning object:Unique identifier for the earning.
ID of the referral that generated this earning.
Amount in cents (e.g., 1000 = $10.00).
Currency code (ISO 4217 format).
Type of earning (e.g., “purchase”, “subscription”, “recurring”).
Description of the earning.
Current status:
pending, processing, paid, or failed.External reference (e.g., Stripe payout ID, transaction ID).
ISO 8601 timestamp of when the earning was created.
ISO 8601 timestamp of when the earning was paid out, if applicable.
Additional metadata associated with the earning.
Response Example
Error Responses
Unauthorized - Invalid or missing API key
Not Found - The earning with the specified ID does not exist
Use Cases
Checking Earning Status
Before processing a payout, verify the earning status:Building Earning Detail View
Display complete earning information:Best Practices
- Cache earning data - Earning information doesn’t change frequently
- Handle 404 errors - Always check if the earning exists
- Convert amounts for display - Remember amounts are in cents
- Monitor status changes - Use webhooks or polling to track status updates
- Link to referrals - Use referral_id to fetch related referral information
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.
Path Parameters
Earning ID
Response
Earning details