PayNow

UpdateAffiliateLinkDto

apply_for_subscriptionsbooleanOptional
Whether the affiliate earns commission on subscription renewals. Must be enabled for 'commission_amount_steps' past the first cycle to apply - when disabled, only the initial purchase earns commission.
codestringOptional
The unique code associated with the affiliate link.
commission_amountintegerOptional
The commission amount, in tenths of a percent (e.g., 125 = 12.5%) for percentage commissions.
commission_amount_stepsAffiliateLinkCommissionAmountStepDto[]Optional
Per-cycle commission overrides. Requires 'apply_for_subscriptions' to be enabled for billing cycles past 1. When empty, the base commission amount applies to every renewal. When steps are defined, each renewal cycle pays its matching steps amount. Cycles without a matching step earn no commission, except cycles past the last step when 'last_commission_amount_step_repeats' is true.
billing_cycle_sequenceintegerRequired
The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.
commission_amountintegerRequired
The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).
commission_typeenumOptional
Specifies the type of commission an affiliate earns from referred purchases.
Possible enum values
  • none

    No commission is earned.

  • fixed

    A fixed amount commission (e.g., $5 per purchase). Not yet supported by the affiliate service.

  • percentage

    A percentage-based commission (e.g., 10% of the purchase).

discount_amountintegerOptional
The discount amount, in the smallest currency unit (e.g., cents) for fixed discounts, or tenths of a percent (e.g., 125 = 12.5%) for percentage discounts.
discount_typeenumOptional
Specifies the type of discount offered to customers referred through an affiliate link.
Possible enum values
  • none

    No discount is offered.

  • fixed

    A fixed amount discount (e.g., $5 off).

  • percentage

    A percentage-based discount (e.g., 10% off).

enabledbooleanOptional
Indicates whether the affiliate link is enabled.
last_commission_amount_step_repeatsbooleanOptional
Whether the last commission amount steps rate continues to apply to all billing cycles past the last step. When false, cycles past the last step earn no commission.
referer_typeenumOptional
Specifies which affiliate link is credited when a customer follows multiple links before purchasing.
Possible enum values
  • invalid

    No referer type specified. This value is typically used as a default or uninitialized state.

  • first_referer

    The first affiliate link the customer followed is credited.

  • last_referer

    The most recent affiliate link the customer followed is credited.

tracking_length_daysintegerOptional
The number of days a customer's referral is tracked after following the affiliate link.
wallet_idstringOptional
The identifier of the wallet that receives the affiliate commission payouts.
Example
{
  "apply_for_subscriptions": true,
  "code": "string",
  "commission_amount": 0,
  "commission_amount_steps": [
    {
      "billing_cycle_sequence": 0,
      "commission_amount": 0
    }
  ],
  "commission_type": "none",
  "discount_amount": 0,
  "discount_type": "none",
  "enabled": true,
  "last_commission_amount_step_repeats": true,
  "referer_type": "invalid",
  "tracking_length_days": 0,
  "wallet_id": "string"
}