$masterMerchantAccountId = $this->config->item('merchantId_sandbox');
$merchantAccountParams = [
'individual' => [
'firstName' => $inputData['firstName'],
'lastName' => $inputData['lastName'],
'email' => $merchantIndividualEmail,
'dateOfBirth' => $inputData['dob'],
'address' => [
'streetAddress' => $merchantIndividualAddress,
'locality' => $merchantAccountLocality,
'region' => $merchantAccountRegion,
'postalCode' => $inputData['zipCode'],
]
],
'funding' => [
'descriptor' => $merchantFundDescriptor,
'destination' => Braintree\MerchantAccount::FUNDING_DESTINATION_BANK,
'accountNumber' => $merchantFundAccount,
'routingNumber' => $merchantFundRoutingNo,
],
'tosAccepted' => true,
'masterMerchantAccountId' => $masterMerchantAccountId
];
$merchantAccountResponse = $gateway->merchantAccount()->create($merchantAccountParams);
I am using this code to create sub merchant account through braintree sandbox, but i receive error from Braintree. Error is given below.
"Master merchant account id is invalid"
How can I resolve this issue?
I want to do sub merchant accounts in my master merchant accounts and customer will do payment to sub merchants.
Customer created through braintree sandbox working correctly. it gives no error only sub merchant account create gives error.