Skip to main content
POST
Generate invoice

Authorizations

X-API-Key
string
header
required

Preferred authentication method. Pass the API key in the X-API-Key HTTP request header. The user account must have api_status enabled.

Body

application/json
affiliate_id
integer
required

Affiliate to generate invoice for.

currency
string
required

3-letter currency code (e.g. USD). Converted to uppercase.

Maximum string length: 3
amount
number

Invoice amount. If omitted, calculated automatically from balance.

Required range: x >= 0
start_date
string<date>

Period start date (YYYY-MM-DD).

end_date
string<date>

Period end date (YYYY-MM-DD). Must be >= start_date.

status
string

Invoice status: unpaid, paid, draft, etc.

invoice_memo
string

Memo text visible to affiliate.

internal_notes
string

Internal notes (not visible to affiliate).

offers
string

Comma-separated offer IDs to include.

commission_plan_ids
string

Comma-separated commission plan IDs.

commission_types
string

Comma-separated commission types: cpc, cpa, rev_share, cpl, lot_fee, lot_based_fee, flat_fee.

include_referral_balance
enum<integer>

Whether to include referral balance (0 or 1).

Available options:
0,
1

Response

Invoice generated.

status
string
Example:

"success"

code
integer
Example:

200

name
string
Example:

"OK"

message
string
info
object

Generated invoice details.