The source test decides it
The key question is not who paid you, but where you earned it. Under Section 9, commission or brokerage is Indian-source, and taxable here, where the services that gave rise to it were rendered or utilised in India, or where you have a business connection in India. So a commission for work you did in India, or for arranging something used in India, is taxable here.
But the flip side is well established. Where a non-resident earns commission for services performed entirely outside India, the classic case being an agent abroad who sources export orders for an Indian exporter, that commission is generally not taxable in India, because there is no business connection in India and the income is not deemed to arise here. The Supreme Court confirmed this long ago in the Toshoku case, and it still holds. So a genuinely offshore commission can fall wholly outside Indian tax.
The withholding, and why it is now case by case
The tax deducted at source follows the same logic. The resident commission section that deducts on brokerage does not apply to a non-resident. An Indian payer's obligation is under Section 195, and the Supreme Court has confirmed that Section 195 requires deduction only on a sum that is chargeable to tax in India. So if the commission is for services done entirely abroad and is not chargeable here, the payer should not withhold at all, and can seek the department's confirmation of that.
There is one point of history to know. The tax office used to have circulars that plainly said no tax need be deducted on such export commission, but those were withdrawn in 2009. The withdrawal did not make the income taxable; it simply removed the automatic comfort, so now it is decided case by case on the source facts rather than by a blanket rule. That means the position needs to be established on your specific facts, that the services were genuinely rendered abroad with no business connection here, rather than assumed. A practising CA establishes the source position, handles the Section 195 question so a genuinely offshore commission is not needlessly withheld, and documents it against the withdrawal of the old circulars.