Skip to main content

Retrieve a payment

GET 

https://api.freemius.com/v1/products/{product_id}/affiliate_payments/{affiliate_payment_id}.json

Auth:Bearer TokenSCOPE: PRODUCT

Product-scoped API tokens allow you to operate on the product itself. This token usually allows read-only access to the product configuration and write access to several operations on subscriptions, customers, payments, and more. For most SaaS or app integrations, this is the token you will need.

  1. Go to the Freemius Developer Dashboard.
  2. Open the Settings page of the relevant product.
  3. Click the API & Keys tab.
  4. Copy the API Bearer Authorization Token from the UI.

Retrieve a specific affiliate payment by its ID.

Request​

Path Parameters

    product_id integer<int64>required

    The ID of the product.

    Possible values: >= 1

    Example: 1234
    affiliate_payment_id integer<int64>required

    The ID of the payment of an affiliate.

    Possible values: >= 1

    Example: 1234

Query Parameters

    fields string

    Comma separated list of fields to return in the response. If not specified, all fields are returned.

    Example: id,name,slug

Responses​

The retrieved affiliate payment.

Schema
idstring<int64>

The unique identifier of the entity.

Possible values: >= 1

Example: 123456
createdstring<date-time>

The date and time the entity was created, under UTC timezone.

Example: 2025-01-01 00:00:00
updatedstring<date-time>nullable

The date and time the entity was updated, under UTC timezone. If null then the entity was never updated since its creation.

Example: 2025-01-01 00:00:00
user_idstring<int64>

The ID of the user the entity belongs to.

Possible values: >= 1

Example: 123456
referred_user_idstring<int64>

The ID of the user the entity belongs to.

Possible values: >= 1

Example: 123456
affiliate_idstring<int64>

The ID of the user the entity belongs to.

Possible values: >= 1

Example: 123456
affiliate_visit_idstring<int64>nullable

The ID of the associated affiliate visit. This value is null when the payment is attributed through an affiliate coupon rather than a tracked visit.

Possible values: >= 1

Example: 12345
install_idstring<int64>nullable

The ID of the installation or site the entity is associated with, a null value means it has not been associated with an installation yet.

Possible values: >= 1

Example: 123456
plugin_idstring<int64>

The ID of the product the entity belongs to.

Possible values: >= 1

Example: 123456
payment_idstring<int64>nullable

The ID of the payment associated to the entity.

Possible values: >= 1

Example: 123456
commissioninteger

The earnings attributed to an affiliate for a qualifying purchase or payment.

Example: 12
statusstring
Default value: pending

The status of the payment.

Possible values: [pending, rejected, paid, unpaid]

currencystring

3-char currency code.

Possible values: >= 3 characters and <= 3 characters, [usd, eur, gbp]

visited_atstring<date-time>

The date and time the entity was created, under UTC timezone.

Example: 2025-01-01 00:00:00
grossnumber<float>

The associated payment amount (not including taxes).

Example: 2075.45
plan_titlestring

The title of the associated plan.

Example: Basic Plan
environmentnumber

The environment the entity belongs to. 0 means it belongs to the production environment, 1 means it belongs to the sandbox environment.

Possible values: [1, 0]

Example: 0
billing_cyclenumber

The billing cycle of the subscription in number of months. 1 means monthly, 12 means annually, 0 means lifetime usually when subscriptions are created for lifetime trials.

Possible values: [1, 12, 0]

firststring

The first name of the associated affiliate.

Example: John
laststring

The last name of the associated affiliate.

Example: Doe

Built for the success of software sellers and their products

Get started
We use essential cookies to enable our site to function. With your consent, we also use analytics and advertising cookies to understand how visitors interact with our site and to improve our services.