cancel
Showing results for 
Search instead for 
Did you mean: 

Paypal Checkout through Braintree SDK not working in live (422 unprocessable entity)

Highlighted
Contributor

Paypal Checkout through Braintree SDK not working in live (422 unprocessable entity)

Hi,

We are having problems with LIVE payments processing through Paypal Checkout using Braintree SDK.

 

There seems to be a problem with the configuration in the communication / authorization between Braintree and Paypal, potentially because because of us deleting the default REST API app that was created by default by Paypal when our account was setup (we thought this app was not being used).

 

At the moment, our integration works perfectly in sandbox environment but it doesn't work with LIVE credentials. The braintree js library reports the following error: "422 unprocessable entity" when sending a js create_payment_resource request to https://api.braintreegateway.com/merchants/fjsqd97bjtwpnr59/client_api/v1/paypal_hermes/create_payme... and the following json:

 

{"paymentResource":{"errorName":"invalid_client","errorMessage":"Client Authentication failed","errorDetails":null,"debugId":"a872a349ce421","paypalHttpStatus":401}}

 

After researching a lot about this problem it seems that, in fact, it's related with the REST API app. Even in Braintree's documentation it's recommended not to delete any REST API app:

https://articles.braintreepayments.com/guides/payment-methods/paypal/setup-guide "We recommend that you do not delete the REST API app at any time"

 

More comments about the problem with braintree SDK and deleting the REST API app: https://stackoverflow.com/questions/43374930/paypal-express-checkout-through-braintree-sdk-suddenly-...

 

I have contacted Paypal support and discussed about the problem for days, but unfortunately they don't seem to know how to solve the problem.

 

Any help would be very appreciated.

 

Regards