Billing Setup and Budget Proposal (Always pending approval issue)

152 views
Skip to first unread message

Miguel Graciá

unread,
Oct 2, 2019, 8:53:35 AM10/2/19
to AdWords API and Google Ads API Forum
Hi all

I have problems setting the billing setup and budget proposal configuration. I explain the situation:

I have a parent MCC account where I have another MCC child account. Within that MCC child account I created users using the new Google Ads API. The billing configuration of those users that I create through API is done as follows (attached extract of the simplified code)

<?php
$customer = (new Customer)
            ->setDescriptiveNameUnwrapped($this->parameters->get('name'))
            ->setTimeZoneUnwrapped($this->parameters->get('dateTimeZone'))
            ->setCurrencyCodeUnwrapped($this->parameters->get('currencyCode'));

$mccCustomerId = env('MCC_CLIENT_CUSTOMER_ID');

$result = $this->getCustomerServiceClient()->createCustomerClient(
    $mccCustomerId,
    $customer
);

$customerIdCreated = \basename($result->getResourceName());

$clientPaymentsAccountId = env('MCC_CLIENT_PAYMENTS_ACCOUNT_ID');

$billingSetup = (new BillingSetup())
    ->setPaymentsAccountUnwrapped("customers/$customerIdCreated/paymentsAccounts/$clientPaymentsAccountId")
    ->setStartDateTimeUnwrapped(date('Y-m-d H:i:s'))
    ->setStartTimeType(TimeType::NOW)
;

$billingSetupOperation = (new BillingSetupOperation)
    ->setCreate($billingSetup);

$billingSetupResult = $this->getBillingSetupServiceClient()->mutateBillingSetup(
    $customerIdCreated,
    $billingSetupOperation
)->getResult();

$billingSetupResource = $billingSetupResult->getResourceName();

$accountBudgetProposal = (new AccountBudgetProposal())
    ->setBillingSetupUnwrapped($billingSetupResource)
    ->setProposedNameUnwrapped('Proposal for customer ' . $customerIdCreated)
    ->setProposalType(AccountBudgetProposalType::CREATE)
    ->setProposedStartTimeType(TimeType::NOW)
    ->setProposedEndTimeType(TimeType::FOREVER)
    ->setApprovedSpendingLimitType(SpendingLimitType::INFINITE)
    ->setProposedSpendingLimitMicrosUnwrapped(0)
;

$accountBudgetProposalOperation =
    (new AccountBudgetProposalOperation)->setCreate($accountBudgetProposal);

$accountBudgetProposalResult = $this->getAccountBudgetProposalServiceClient()
    ->mutateAccountBudgetProposal(
        $customerIdCreated,
        $accountBudgetProposalOperation
    );



When I enter the configuration of the billing setup, it appears as pending approval. I've been waiting for several days and it hasn't changed status yet. What I can be doing wrong? Do I have to complete another step?

Please, if I have to provide more information, let me know.

Thank you very much for your help.



Google Ads API Forum Advisor Prod

unread,
Oct 2, 2019, 11:39:48 AM10/2/19
to miguelgra...@gmail.com, adwor...@googlegroups.com
Hello Miguel,

Even though the Billing setup is created via the API, Google Ads product team should approve them before using otherwise the status will be in pending only. You can reach out to the Google Ads product team from the help button on the top right corner for this, please share the billing setup id along with the account id for them to work on this concern.

Regards,
Sai Teja, Google Ads API Team

ref:_00D1U1174p._5001UKLshG:ref
Reply all
Reply to author
Forward
0 new messages