How to Convert currency into Adwords Money object

72 views
Skip to first unread message

mubbashar husain

unread,
Nov 9, 2018, 6:58:57 AM11/9/18
to AdWords API and Google Ads API Forum
Hi,

I am confused about converting currency value to Adwords Money Object

To convert USD into Money I am using this code

$amount = round($newCpc * 1000000);
$Money = new cm\Money(null, $amount);

I have an account having currency in "Colombian Peso" COP

According to documentation 

The minimum unit is 1000000 but when I multiply this and send API call I got the error

[trigger:protected] => The bid of 125.400000 must be a whole multiple of 1.000000
                    [errorString:protected] => BiddingErrors.BID_TOO_MANY_FRACTIONAL_DIGITS
                    [ApiErrorType:protected] => BiddingErrors

So can you please help me in getting the money value for any country. Right now I am not able to convert it as this is very confusing.


The table on the above link show 10000 for USD but here it says  One million is equivalent to one unit

currency.png




Teja Makani

unread,
Nov 9, 2018, 1:59:40 PM11/9/18
to AdWords API and Google Ads API Forum
Hello,

Could you please share the SOAP logs(request and response) of the operation you are performing without redacting any information. You could enable logging by following the instructions shown in this README.md file for Java client library, for other client libraries refer here. You could use reply privately to the author option while sharing the details requested.

Regards,
Sai Teja, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages