braintree / braintree_node

Braintree Node.js library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
334 stars 104 forks source link

Sandbox - Creating a merchant account always returns 82607 #160

Closed kavyavsagar closed 4 years ago

kavyavsagar commented 4 years ago

I have created new merchant account id for my app. Why this error showing always? Whether this braintree marketplace was worked in sandbox account?

Request

var merchantAccountParams = {
  individual: {
    firstName: "Jane",
    lastName: "Doe",
    email: "jane@14ladders.com",
    phone: "5553334444",
    dateOfBirth: "1981-11-19",
    ssn: "456-45-4567",
    address: {
      streetAddress: "111 Main St",
      locality: "Chicago",
      region: "IL",
      postalCode: "60622"
    }
  },
  funding: {
    descriptor: "Blue Ladders",
    destination: braintree.MerchantAccount.FundingDestination.Bank,
    email: "funding@blueladders.com",
    mobilePhone: "5555555555",
    accountNumber: "1123581321",
    routingNumber: "071101307"
  },
  tosAccepted: true,
  masterMerchantAccountId: "12ink_tattoo",
  id: "blue_ladders_store"
};

gateway.merchantAccount.create(merchantAccountParams, function (err, result) {
    if (err) res.status(403).json(err);
});

Responds

"data": {
    "errors": {
        "validationErrors": {},
        "errorCollections": {
            "merchantAccount": {
                "validationErrors": {
                    "masterMerchantAccountId": [
                        {
                            "attribute": "master_merchant_account_id",
                            "code": "82607",
                            "message": "Master merchant account ID is invalid."
                        }
                    ]
                },
                "errorCollections": {}
            }
        }
    },
    "params": {
        "merchantAccount": {
            "individual": {
                "firstName": "Jane",
                "lastName": "Doe",
                "email": "jane@14ladders.com",
                "phone": "5553334444",
                "address": {
                    "streetAddress": "111 Main St",
                    "locality": "Chicago",
                    "region": "IL",
                    "postalCode": "60622"
                }
            },
            "business": {
                "legalName": "Jane's Ladders",
                "dbaName": "Jane's Ladders",
                "address": {
                    "streetAddress": "111 Main St",
                    "locality": "Chicago",
                    "region": "IL",
                    "postalCode": "60622"
                }
            },
            "funding": {
                "descriptor": "Blue Ladders",
                "destination": "bank",
                "email": "funding@blueladders.com",
                "mobilePhone": "5555555555"
            },
            "tosAccepted": "true",
            "masterMerchantAccountId": "test",
            "id": "blue_ladders_store"
        },
        "merchantId": "p7cg27qszffyy3vp"
    },
    "message": "Master merchant account ID is invalid.",
    "success": false
}
crookedneighbor commented 4 years ago

That error is found here: https://developers.braintreepayments.com/reference/general/validation-errors/all/ruby#code-82607

Master merchant account ID is invalid. You'll get this error if we cannot find a master merchant account with the id specified.

Please review the master merchant account you are passing in and verify that it matches the id of the one you are trying to use. If you need further assistance, contact our support team. https://help.braintreepayments.com/

kavyavsagar commented 4 years ago

I have used the proper merchant id's mentioned in the document, still i'm getting this error. Thats why i wonder about this issue

crookedneighbor commented 4 years ago

It looks to me like you're using the sample merchant id in the documentation, rather than your own merchant account id. Please contact support and they can help you set up your Braintree gateway and find the correct merchant account id.

kavyavsagar commented 4 years ago

I was tried with both sample one and newly created merchant account id. I can able to do the normal checkout and client token creation with my sandbox account, but only problem is using with the marketplace functionality (create sub merchant)

Anyways thanks for the quick responds. Let me contact the support team.

Shashank001122 commented 4 years ago

Hi Kavya, Even I am facing issues with creating sub merchants and I tried contacting the team, I'd deeply appreciate if you could tell me how did you solve the issue?

DevTechnosysTeam commented 3 years ago

Master merchant account ID is invalid. what is problem

crookedneighbor commented 3 years ago

@Shashank001122 @DevTechnosysTeam reach out to our support team for help. https://developer.paypal.com/braintree/help