Skip to main content
PATCH
/
v1
/
program
/
payment-terms
curl -X PATCH "https://api.affonso.io/v1/program/payment-terms" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "commission_rate": 25,
    "cookie_lifetime": 90,
    "auto_payout": true,
    "payment_frequency": "weekly"
  }'
{
  "success": true,
  "data": {
    "commission_type": "percentage",
    "commission_rate": 25,
    "commission_duration": "lifetime",
    "commissions_limit": null,
    "commissions_hold_days": 14,
    "payment_threshold": 5000,
    "payment_frequency": "weekly",
    "payment_methods": ["paypal", "wise"],
    "cookie_lifetime": 90,
    "auto_payout": true,
    "invoice_rule": "none",
    "invoice_prefix": null,
    "require_tax_forms": false,
    "owner_company_name": "Acme Inc.",
    "owner_address_line_1": "123 Main St",
    "owner_address_line_2": null,
    "owner_city": "San Francisco",
    "owner_postal_code": "94105",
    "owner_country": "US",
    "owner_vat_id": null,
    "owner_vat_rate": null
  }
}
Update your program’s payment terms. All fields are optional — only include the fields you want to change. If no payment terms exist yet, they will be created with sensible defaults for any fields not provided.

Body Parameters

commission_type
string
Commission type. Valid values: FIXED, PERCENTAGE, CREDITS.
commission_rate
number
Commission rate. Must be >= 0.
commission_duration
string
Duration model. Valid values: lifetime, time_limited, payment_limited.
commissions_limit
integer | null
Maximum commissions per referral. Set to null for unlimited.
commissions_hold_days
integer | null
Days to hold commissions before approval. Set to null to disable.
payment_threshold
integer
Minimum payout threshold in cents. Must be >= 0.
payment_frequency
string
Payout frequency. Valid values: weekly, monthly.
payment_methods
array
List of accepted payment method strings.
Referral cookie lifetime in days. Must be between 1 and 365.
auto_payout
boolean
Enable automatic payouts.
invoice_rule
string
Invoice handling rule. Valid values: NONE, OWNER_PROVIDES, AFFILIATE_PROVIDES, SELF_BILLING.
invoice_prefix
string | null
Invoice number prefix. Maximum 20 characters. Set to null to clear.
require_tax_forms
boolean
Require affiliates to submit tax forms before payout.
owner_company_name
string | null
Company name for invoices. Set to null to clear.
owner_address_line_1
string | null
Address line 1. Set to null to clear.
owner_address_line_2
string | null
Address line 2. Set to null to clear.
owner_city
string | null
City. Set to null to clear.
owner_postal_code
string | null
Postal code. Set to null to clear.
owner_country
string | null
ISO 3166-1 alpha-2 country code (e.g. US, DE). Must be exactly 2 characters. Set to null to clear.
owner_vat_id
string | null
VAT ID. Set to null to clear.
owner_vat_rate
number | null
VAT rate percentage (0–100). Set to null to clear.

Response

Returns the updated payment terms object. Same structure as the Get Payment Terms response.
curl -X PATCH "https://api.affonso.io/v1/program/payment-terms" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "commission_rate": 25,
    "cookie_lifetime": 90,
    "auto_payout": true,
    "payment_frequency": "weekly"
  }'
{
  "success": true,
  "data": {
    "commission_type": "percentage",
    "commission_rate": 25,
    "commission_duration": "lifetime",
    "commissions_limit": null,
    "commissions_hold_days": 14,
    "payment_threshold": 5000,
    "payment_frequency": "weekly",
    "payment_methods": ["paypal", "wise"],
    "cookie_lifetime": 90,
    "auto_payout": true,
    "invoice_rule": "none",
    "invoice_prefix": null,
    "require_tax_forms": false,
    "owner_company_name": "Acme Inc.",
    "owner_address_line_1": "123 Main St",
    "owner_address_line_2": null,
    "owner_city": "San Francisco",
    "owner_postal_code": "94105",
    "owner_country": "US",
    "owner_vat_id": null,
    "owner_vat_rate": null
  }
}