Skip to main content
GET
Retrieve detailed information about a specific earning by its unique ID. Use this endpoint to fetch complete earning details including amount, status, and associated referral.

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

string
required
The unique identifier of the earning you want to retrieve. This ID is returned when you create an earning or list earnings.Example: earn_123abc

Request Example

Response

The API returns a detailed earning object:
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).
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 associated with the earning.

Response Example

Error Responses

object
Unauthorized - Invalid or missing API key
object
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

  1. Cache earning data - Earning information doesn’t change frequently
  2. Handle 404 errors - Always check if the earning exists
  3. Convert amounts for display - Remember amounts are in cents
  4. Monitor status changes - Use webhooks or polling to track status updates
  5. 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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Earning ID

Response

Earning details