Braintree payment error 500

I’m trying to setup Braintree payment gateway
it works with sandbox API credentials in test mode
but with production API credentials I get error 500 after submitting card details, and nothing appears in system logs and no failed transactions can be seen on Braintree

(other invoicing platform works ok with the same API credentials)

I also tried different combination of required fields, which did not help

@david @ben any thoughts?

Are there any error messages in your Braintree account that you can inspect?

there is nothing can be seen in Braintree, at all
by the way, not sure what “Test mode” is for, but I just tried again with different options:

with sandbox API credentials:
and test mode “On”
Braintree: transaction is OK
System log: is OK

with sandbox API credentials:
and test mode “Off”
doesn’t even ask for card detail, after clicking Pay Now produces message " There was an error processing your payment [0]. Please try again later."
Braintree: nothing
System log: nothing

with production API credentials
and test mode “On”
doesn’t even ask for card detail, after clicking Pay Now produces message " There was an error processing your payment [0]. Please try again later."
Braintree: nothing
System log: nothing

with production API credentials
and test mode “Off”
error 500 — Server Error after submitting card details
Braintree: nothing
System log: nothing

I get more details on self hosted

Braintree support responded:

"I was able to identify several 403 authorization errors in the gateway related to the suspension of your default merchant account:
https://developer.paypal.com/braintree/docs/reference/forward-api/vault-errors/index#vault-status-403
the transaction attempt did not pass a specified merchant account ID, so it processed to your default MAID:

I recommend specifying the active MAID (mycompanyEUR) in your API calls so that these authorization errors can be avoided. I would recommend contacting Invoiceninja so they can help you specify the correct MAID as they are a third-party service and we don’t have any insight into their integration.
https://developer.paypal.com/braintree/articles/control-panel/important-gateway-credentials#merchant-account-id "

basically I have 2 merchant account IDs
mycompanyEUR - Active
mycompanyGBP - Suspended (default)

suspended because I’m not using it, and only accepting payment in Euro…
is it possible to add this additional parameter?

this is how it looks at other invoicing system (I was hoping to move from it asap…)
image

In the latest release we have added in the Merchant Account Id!

1 Like

great
I added my Merchant Account ID but payment still doesn’t go through
image

I will ask Braintree to have a look again…

paganini,

we’ve updated the hosted app, the error will return cleaner now for you.

Braintree responded that "Looking at the parameters passed we can see that the MAID isn’t being specified: "
and I just tried again and it produces this image

so Merchant Account ID is still missing
But I have specified it
image

Thats not what the error is referring to. It looks like your account is limited for this function.

Braintree confirmed that this error is due to “Merchant Account ID” still not being passed…
image

@paganini

Is this when paying or when verifying a card?

paying
right after I click on Pay Now

@paganini,

can you send us an email contact@invoiceninja.com

we’ll check your configuration.

@ben

I believe we need to inject the MAID also with the client/customer creation

Can we bundle the MAID injection into the gateway init() so it is available everywhere instead of just at the point of purchase?