Skip to main content
PATCH
PHP

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

id
string
required

The commission's unique ID on Dub.

Example:

"cm_1JVR7XRCSR0EDBAF39FZ4PMYE"

Body

application/json
earnings
number

The new earnings amount for the commission. Paid commissions cannot be updated. If provided, will override the earnings calculated based on the sale amount and currency.

Required range: x >= 0
saleAmount
number

The new absolute amount for the sale. Paid commissions cannot be updated.

Required range: x >= 0
modifySaleAmount
number

Modify the current sale amount: use positive values to increase the amount, negative values to decrease it. Takes precedence over saleAmount. Paid commissions cannot be updated.

currency
string
default:usd

The currency of the sale amount to update. Accepts ISO 4217 currency codes.

status
enum<string>

Useful for marking a commission as pending, refunded, duplicate, canceled, or fraudulent. Takes precedence over saleAmount and modifySaleAmount. When a commission is marked as pending, refunded, duplicate, canceled, or fraudulent, it will be omitted from the payout, and the payout amount will be recalculated accordingly. Paid commissions cannot be updated.

Available options:
pending,
refunded,
duplicate,
canceled,
fraud
amount
number
deprecated

Deprecated. Use saleAmount instead.

Required range: x >= 0
modifyAmount
number
deprecated

Deprecated. Use modifySaleAmount instead.

Response

The updated commission.

id
string
required

The commission's unique ID on Dub.

Example:

"cm_1JVR7XRCSR0EDBAF39FZ4PMYE"

type
enum<string>
required

The type of commission. Can be click, lead, sale, referral, or custom.

Available options:
click,
lead,
sale,
referral,
custom
amount
number
required

The associated event amount in cents. For sale commissions, this is the sale amount.

earnings
number
required

The amount earned by the partner, in cents.

currency
string
required

The currency of the commission, as an ISO 4217 currency code.

status
enum<string>
required

The current status of the commission.

Available options:
pending,
processed,
paid,
refunded,
duplicate,
fraud,
canceled,
hold
invoiceId
string | null
required

The associated invoice ID. Only set for sale commissions.

description
string | null
required

An optional description of the commission.

quantity
number
required

The event quantity. Used for click and lead commissions; typically 1 for sale and custom commissions.

metadata
object | null
required

User-provided metadata from the associated lead or sale event (lead.metadata / sale.metadata).

createdAt
string
required

The date and time when the commission was created.

updatedAt
string
required

The date and time when the commission was last updated.

paidAt
string | null
required

The date the commission was paid out to the partner. Null if not paid yet.

partner
object
required
userId
string | null

The user who created the manual commission.

customer
object | null