Yes, as far as I know they would tax you based on what they think would be a fair price.
Example:
Your corporation A is in a country with 25% CIT rate and 10% withholding tax on dividends. This company invoices the customer C for digital marketing services. The client pays 100k.
You have another company B in a tax-free country and company A subcontracts company B for "providing digital marketing services for customer C", for a f
The question the tax inspector will ask is: "What was the role of company A, what value has company A added?"
Questions would be things like, if something goes wrong, which company is liable? What is the role of company A vs. B? You could say that the role of company A is to create trust with the customer, because A is in the same company as the customer. A has a good brand that the customer trusts. This has a value.
If company A instead bought the same services not from B, but from some random company (not owned by you), would A really pay 100k, so that there is no profit? Ok, the other company does the work, but it wouldn't make sense for A to have 0 profit - company A still has meetings with the client, still sends invoices and so on - certainly A wants to have some profit from this.
They could say that it's reasonable that A would have at least 20% profit for doing these things, that A would never have paid a third party more than 85k for this work.
So then they could say that only 80k are OK as a market price for providing the services and that 20k is "realistic profit". Since you paid 100k to your own company, they can say that this was a hidden profit distribution.
They can say that only 80k are deductible and on the 20k profit, you should pay 25% tax (=4k). Also, there is 10% withholding, so on the remaining after-tax profit of 16k, you have to pay 1.6k withholding tax.
In the end company A has to pay 5.6k tax in this example.
If they think that there was foul play, they could probably fine you on top of that.
So it's important that the contracts between A and B are designed well and that you have good documentation for everything, maybe you should even try to get an advance ruling from the tax authorities for such a setup.
Typically they would even say that you can only pay a little bit less than to a third party, because B doesn't have to do any work to get the contract with C - company A is handling all the business development, etc.
Whereas a third party company would first have to do work to get the contract with company A... And so on.
Or another typical example is that you have company in a low-tax country that owns the brand. Like Starbucks and you have a company in the Cayman Islands that owns the Starbucks trademark.
Then you have Starbucks US that pays $100M (10% of the revenue) every year in license fees to Starbucks in the Cayman Islands for being allowed to use the Starbucks brand.
In the case of Starbucks, the tax authorities may say that's OK because Starbucks is a well-known brand, so it's a realistic value.
But if it's the KKein brand - maybe they would say 10% of the revenue is not a fair price because no company would pay 10% of its revenue only for being allowed to use a brand that no one has heard about...
I guess you understand now why there are lawyers that do nothing else than design such contracts (expert lawyers for transfer pricing), make sure that everything is compliant and so on...