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. Valid values: FIXED, PERCENTAGE, CREDITS.
Commission rate. Must be >= 0.
Duration model. Valid values: lifetime, time_limited, payment_limited.
Maximum commissions per referral. Set to null for unlimited.
Days to hold commissions before approval. Set to null to disable.
Minimum payout threshold in cents. Must be >= 0.
Payout frequency. Valid values: weekly, monthly.
List of accepted payment method strings.
Referral cookie lifetime in days. Must be between 1 and 365.
Enable automatic payouts.
Invoice handling rule. Valid values: NONE, OWNER_PROVIDES, AFFILIATE_PROVIDES, SELF_BILLING.
Invoice number prefix. Maximum 20 characters. Set to null to clear.
Require affiliates to submit tax forms before payout.
Company name for invoices. Set to null to clear.
Address line 1. Set to null to clear.
Address line 2. Set to null to clear.
City. Set to null to clear.
Postal code. Set to null to clear.
ISO 3166-1 alpha-2 country code (e.g. US, DE). Must be exactly 2 characters. Set to null to clear.
VAT ID. Set to null to clear.
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
}
}